-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
False positive for LICENSE file #91
Comments
The error mentions that "the license is not detected by GitHub. This leads me to believe that MAYBE you scan for the license on the default branch, not the branch of the PR? That would seem odd to me, as a linter should look at the source of the current branch, right? |
Bumped into the same thing with https://github.com/nschloe/awesome-scientific-computing. I now just added a CC0 file, pushed it, and activated awesome-lint for tests in a second PR. |
@nschloe—so you confirm it only detects the license after it has been pushed to the default branch? |
@jessevdp Yes indeed. Not that there was any doubt about that. I mean, how else is awesome-lint going to do it? First, you'll have to push a license to the default branch, GitHub can then check it, and only then can the linter do anything. |
So I took a look at the source to figure out what is happening. The linting error comes from From looking at that return value of an API endpoint I concluded that (as @nschloe mentioned) GitHub checks the license on the repository level, not on the branch level. I don't know if there is any way to check this on branch level. The workaround that @nschloe suggested should work fine. Figuring out how to check the license depending on the branch is probably not worth the effort. |
Fixed by #123 |
In an effort to remove all linting errors from the awesome-jamstack repository...
Awesome-lint is showing an error regarding the fact that there is no LICENSE for the awesome-jamstack repository. The project already has a license, which is linked to from the README, but this is not detected. In an effort to resolve this issue I've copied their license from its source and added it in a
LICENSE
file in the root of the repository. And opened a PR: automata/awesome-jamstack#33Unfortunately, even after deliberately adding the license in a separate file, the build for that repository still fails because the license is not detected. You can check out the build on any commit in that PR, or see here.
How does the linter scan for the LICENSE? And how can I make it detect it? Or is this a bug?
The text was updated successfully, but these errors were encountered: