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

Case-sensitivity of license IDs in download #46

Open
mxmehl opened this issue Jul 9, 2019 · 5 comments
Open

Case-sensitivity of license IDs in download #46

mxmehl opened this issue Jul 9, 2019 · 5 comments
Labels
enhancement New feature or request priority/low Low priority

Comments

@mxmehl
Copy link
Member

mxmehl commented Jul 9, 2019

The SPDX-License-Identifier given as a parameter for reuse download is case-sensitive. I wonder whether this is actually necessary since there is no conflict. Especially for manual downloads, some users might appreciate the tool being less strict about this.

However, I think that we should stay case-sensitive when checking the identifiers with reuse lint.

@mxmehl mxmehl added the priority/low Low priority label Jul 9, 2019
@carmenbianca
Copy link
Member

Quite doable if I use a case-insensitive dictionary (I think requests has one). Requires a bit of fiddling though, so not going to touch it yet because of the low priority.

@mxmehl
Copy link
Member Author

mxmehl commented Feb 5, 2020

As far as I can see, the IDs are all upper-case. Can the tool just transpose all characters for the ID to upper for this specific command?

However, on the other hand, we should perhaps continue to be strict about this, otherwise people may start using lower/mixed-case chars with addheader. So perhaps rather a warning or suggestion?

@carmenbianca
Copy link
Member

the IDs are all upper-case

They aren't. Apache-2.0 is a good example.

However, on the other hand, we should perhaps continue to be strict about this, otherwise people may start using lower/mixed-case chars with addheader

addheader does not verify the user's input at all. Perhaps it should? It might also be possible to implement the same functionality for addheader, e.g., addheader --license Gpl-3.0-or-later would get auto-corrected. I'm not sure how desireable that is, though.

@mxmehl
Copy link
Member Author

mxmehl commented Feb 6, 2020

Oh, you are so right 🤦‍♂️

I agree that correcting the user is not really desireable. So perhaps an extra information to the error message of "Error: Failed to download license." along the lines of "Please notice that SPDX License Identifiers are case-sensitive" would suffice?

@nicorikken
Copy link
Member

I've found some details on this issue from a SPDX discussion thread:

Case sensitivity is important for tools to operate properly, so producing the correct header is desired. But for human input and matching this is not needed, as case shouldn't matter.

So with that background, I'd like REUSE to autocorrect (only case-wise) the ids that are input by humans.

@floriansnow floriansnow added the enhancement New feature or request label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority/low Low priority
Projects
None yet
Development

No branches or pull requests

4 participants