Open silverwind opened 2 years ago
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 https://github.com/mrjones/oauth/issues/74.
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.