Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignoredGroups matches artifact substrings #397

Open
shashachu opened this issue Jan 18, 2024 · 1 comment
Open

ignoredGroups matches artifact substrings #397

shashachu opened this issue Jan 18, 2024 · 1 comment

Comments

@shashachu
Copy link

shashachu commented Jan 18, 2024

Not sure if this is intended or a bug.

If my app has artifacts:
foo:bar:baz
foo:bar:baz-qux

and I configure the following exclusion:

licenseReport {
    ignoredPatterns = ["foo:bar:baz"]
}

then foo:bar:baz-qux will be omitted from the output.

My first thought is that if an ignoredPattern has a full artifact name, we should take that as an exact match pattern vs a substring, but this could break existing users if they're depending on that behavior, and also possibly break the version matching. We could also introduce some fancy wildcard or regex support.

cc @mudkiplex since they authored the PR

@mudkiplex
Copy link
Contributor

It was intended in the sense that I did not consider the use case you are describing. I didn't reckon anyone would want to include a sub artifact (which I assume foo:bar:bas-qux is) among the licenses, but not the main artifact (foo:bar:bas), while still depending on both in the project.

Then again, "ignoredPatterns" should perhaps refer to complete regex pattern matches, not just a contains check, as it's currently implemented. This would be a breaking change though, as you point out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants