reuse-tool icon indicating copy to clipboard operation
reuse-tool copied to clipboard

Feature: Warning when there is both a .license file and a license statement within a file

Open cordlandwehr opened this issue 5 years ago • 4 comments

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.

cordlandwehr avatar Feb 09 '20 11:02 cordlandwehr

Hey @cordlandwehr, that makes a lot of sense to me! I'll look into it soon-ish.

carmenbianca avatar Feb 09 '20 11:02 carmenbianca

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.

mxmehl avatar Apr 27 '21 15:04 mxmehl

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.

cordlandwehr avatar Apr 27 '21 19:04 cordlandwehr

I tend to agree. lint should always warn about conflicts, and explain which source is authoritative according to the defined precedence.

mxmehl avatar Apr 28 '21 08:04 mxmehl