reuse-tool
reuse-tool copied to clipboard
Feature: Warning when there is both a .license file and a license statement within a file
I had the situation of having both a license statement (SPDX-License-Identifier) inside a file and additionally a ".license" file for the respective file. (in this situation it was an XML file where it was not clear originally how to put a license statement inside the source file). In such a situation it would be very helpful to have linter warnings produced.
Hey @cordlandwehr, that makes a lot of sense to me! I'll look into it soon-ish.
Should we also warn if a file has a .license file or in-file declarations, and if it is covered via dep5 at the same time?
This is somewhat connected to the precedence discussion. So via the spec it would hopefully become clear what's the effective information, but I also see the benefit of informing users about a "conflict". However, I am not sure whether this should happen by default, and on which specific combinations.
When running reuse lint, i.e. in the "linter" mode IMO the tool user's assumption is that warnings are on per default. That could be different when e.g. "reuse spdx" is run.
I tend to agree. lint
should always warn about conflicts, and explain which source is authoritative according to the defined precedence.