fsfe / reuse-tool

reuse is a tool for compliance with the REUSE recommendations.
https://reuse.software
410 stars 149 forks source link

Add option to verify that contents of the license file is valid #1107

Open sorairolake opened 2 days ago

sorairolake commented 2 days ago

I think it would be useful if reuse lint has an option to verify that contents of the license file is valid.

This means that an error will be returned in the following cases:

However, I think this feature should be an option since it's not always possible to correctly guess the contents of the license file.

silverhook commented 2 days ago

I think this is a great idea!

Just yesterday I ran into a surprise whereupon reuse download --all, I ended up with two empty license files in the LICENSES/ folder.

However, I think this feature should be an option since it's not always possible to correctly guess the contents of the license file.

I’ve half a mind that it would make sense to enable it by default.

Any licenses that do not start with LicenseRef- are by definition part of the SPDX License List and correspond to the canonical plaintext versions from https://github.com/spdx/license-list-data/tree/main/text. So testing that (or with more work even against the templates) should be doable, I think.