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

Lint does not report missing license #286

Closed
paddy-hack opened this issue Dec 13, 2020 · 4 comments
Closed

Lint does not report missing license #286

paddy-hack opened this issue Dec 13, 2020 · 4 comments

Comments

@paddy-hack
Copy link
Contributor

I noticed that removing LICENSES/CC-BY-SA-4.0.txt did not result in this license being reported as missing. This despite the license being used in the front matter of my project's LICENSE.md file.

This was tested against the same project and project state as reported in #285.

@mxmehl
Copy link
Member

mxmehl commented Dec 15, 2020

Hah, try removing the AGPL license and you'll see that it works ;)

Actually, you project does not use CC-BY-SA-4.0 in any file, so removing it doesn't change something. So in the end, you can into the same problem as in #285.

@mxmehl mxmehl closed this as completed Dec 15, 2020
@paddy-hack
Copy link
Contributor Author

Removing the AGPL license does trigger a missing license error, yes.

My beef is with removing the CC-BY-SA-4.0 license, which, contrary to your comment, is used in LICENSE.md, not triggering a missing license error.

I copied LICENSE.md to about.md and re-ran after removing the CC-BY-SA-4.0 license. Lo and behold, now it complains about the license being missing. Same thing if I move about.md to README.md. Looks like the LICENSE.md file is ignored for some reason (and not because git ignores it).

🔍 👀 Found it! It's in src/reuse/__init__.py:

_IGNORE_FILE_PATTERNS = [
    re.compile(r"^LICENSE"),
    re.compile(r"^COPYING"),

While I can understand the desire to use these file ignore patterns, my LICENSE.md aims to document the project's licensing policy as well as license related practices and advice for the project, not stipulate the project's licensing terms. Anyway, aren't licensing terms normally covered by terms on their own use as well. The GPL only allows verbatim copying, for example. Now wouldn't it be neat to have the terms on your licensing terms specified by an SPDX-License-Identifier too? Anyway, that getting off-topic, back to my "problem" of an unexpectedly ignored document file.

🤔 Is there a way to override the ignore patterns for specific files? Should the pattern be anchored? Should the check for missing licenses consider all files with an SPDX-License-Identifier:? Or should I perhaps rename my file to LICENSING.md?

BTW, I'm using the fsfe/reuse Docker image which reports 0.11.1 as its version (and noticed the documentation is still at 0.8.0).

@mxmehl
Copy link
Member

mxmehl commented Dec 16, 2020

Ah, I didn't see the LICENSE.md file. Indeed, it's not checked by the tool because it's considered to contain a license text (which per definition is excluded from the obligation to contain copyright and licensing info).

We conciously abstained from demanding to state the license and copyright of license texts. On the one hand, because this sometimes is a tricky question – ask 3 lawyers, you will get 5 opinions, and a huge discussion whether licenses are actually copyrightable. On the other hand, we'd run into practical problems, as not all license text licenses have SPDX identifiers.

Is there a way to override the ignore patterns for specific files?

Not for these files at the moment. Because the ignore pattern list is quite short, I'd also like to keep it that way to reduce complexity.

Should the check for missing licenses consider all files with an SPDX-License-Identifier:?

I quite like the short list of exceptions in the REUSE spec. Of course, the assumption that a file name starting with LICENSE contains a license text was a false-negative in your case, but we'd run into big trouble if we just searched for the SPDX identifier, and ignore things like .gitignore.

Or should I perhaps rename my file to LICENSING.md?

That's indeed the recommendation I'd also give to you. LICENSE/COPYING is a rather reserved file name which many tools look for, so a rename, perhaps even clearer (LICENSE-SITUATION.md), might make sense in the long run.

@paddy-hack
Copy link
Contributor Author

Thanks for thinking along and pointing to the documentation for ignored files. My problem probably was that I interpreted "The License files" as LICENSES/*.*. Oh well, I'll give renaming LICENSE.md some thought. I probably end up adding a README.md under the CC-BY-SA-4.0 sometime before the end of the year anyway, making this a non-issue for my project.

As for copyrightability of licenses, the FSF clearly thinks you can (or at least try to). Just look at the GPL, any version 😉

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