-
Notifications
You must be signed in to change notification settings - Fork 124
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
Detect licenses names like MIT-LICENSE.txt #142
Comments
We may need to split up to multiple regex patterns. For some, it doesn't make sense to remove the PR welcomed! |
FWIW, Github does detect the license correctly on that repo. Maybe their code that does it is open-source, not sure. Edit: It is https://github.com/licensee/licensee as per this. It uses a scoring system with multiple regexes. |
Be careful with directly using other open source project's code, there are license issues. It's good to know someone else also uses multiple patterns. To add to that, the patterns can have different confidence level. If a file named LICENSE doesn't have a recognized license, we should raise an error. But if a file abcd-licenser.txt doesn't have license content, we can log a debug message instead. Current behavior: we check for all files matching the regex, but we don't log an error at all for individual files. |
Asked the author to rename in mrjones/oauth#74. |
`github.com/mrjones/oauth` uses a non-standard-named filename for the `LICENSE` file (`MIT-LICENSE.txt` instead of `LICENSE.txt`). go-license-detector cannot handle such a case, as seen here: https://github.com/QuesmaOrg/quesma/actions/runs/11327943230/job/31500069625 The problem was reported to both the go-license library (google/go-licenses#142) and the oath library (mrjones/oauth#74), but it's not fixed yet. Fix the problem by adding an override entry to `overrides.ndjson`.
`github.com/mrjones/oauth` uses a non-standard-named filename for the `LICENSE.txt` file (`MIT-LICENSE.txt` instead of `LICENSE.txt`). `go-license-detector` cannot handle such a case, as seen here: https://github.com/QuesmaOrg/quesma/actions/runs/11327943230/job/31500069625 The problem was already reported to both the `go-licenses` library (google/go-licenses#142) and the `oauth` library (mrjones/oauth#74), but it's not fixed yet. Fix the problem by adding an override entry to `overrides.ndjson`.
https://github.com/mrjones/oauth has a MIT-LICENSE.txt in its root but it's currently not detected:
Maybe the
^
should be removed from the regex.The text was updated successfully, but these errors were encountered: