Fix project glob handling to support just filename filtering#430
Fix project glob handling to support just filename filtering#430theolivenbaum wants to merge 1 commit into
Conversation
WalkthroughThe project filtering logic in Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
@theolivenbaum the multi pattern is a new feature that is not yet in 4.0.6. Therefore it's expected to not work in that version. I'm planning to release 4.0.7 fairly soon. Obviously there may still be issues in the beta version.... |
|
Makes sense why it didn't work then 😄 If I could suggest another small thing, a flag to ignore this kind of errors would be nice: "ValidationErrors": [
{
"Error": "Unable to determine license from the given license file",
"Context": "..."
},I'm seeing this often for licenses that are correctly extracted as text, but don't match a "known" license - which is fine for my use-case and not an error. If that's ok, happy to submit another PR with the flag |
As I already said in my comments to the other PR. I'm very reluctant removing any of the regidity of the project. You can already specify additional licenses the file matcher matches against as well as overwriting licenses by package..... |
|
@theolivenbaum thank you so much for your contribution. Your changes have been incooperated into #431 whith additional testing around this topic. |



Hi again @sensslen,
Did another round of testing now that I've the source-code locally to test, and it seems that in 4.0.6 release, passing multiple patterns is failing:
While passing them separately seems to work (in the sense that they don't fail due to the filtered project anymore):
In the latest preview version, passing multiple patterns work fine:
So my guess is that the previous SystemCommandLine parsing was not correctly handling the array (probably the target property should have been a
string[]), but the move to a new package handles this fine.While reviewing it, I noticed that the glob-like matching is not handling only file-name matching, which is a bit surprising. This PR adds a second branch to the check that will also try to match the pattern against the file-name separatelly.
This way, it is also fine to pass a pattern such as
Project.Name*, and have that match as one would expect.Summary by CodeRabbit