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

--unknown flag is not respected when license is guessed as "Undefined", "UNLICENSED", or "Public Domain" #122

Open
mtlewis opened this issue Sep 30, 2024 · 0 comments

Comments

@mtlewis
Copy link

mtlewis commented Sep 30, 2024

The --unknown flag is described as having the following effect:

report guessed licenses as unknown licenses

From reviewing the code, it looks like this works by appending a * to guessed licenses (e.g. here), and then replacing licenses that end in * with UNKNOWN.

However, in a few cases the getLicenseTitle function doesn't append a '*', which means those license strings propagate even when --unknown is passed. The ones I can spot are "Undefined", "Public Domain", "Custom: " and "UNLICENSED".

The naive solution here would be to append a '*' onto those licenses too - but I wonder if it's worth considering a refactor here. Rather than trying to detect guessed licenses, could we consider skipping the guessing functionality entirely when --unknown is passed?

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

1 participant