Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Readme.txt License Warning #178

Open
BinaryMoon opened this issue Aug 7, 2019 · 7 comments
Open

Readme.txt License Warning #178

BinaryMoon opened this issue Aug 7, 2019 · 7 comments

Comments

@BinaryMoon
Copy link

Hi - when I use the theme sniffer I am seeing a license warning:

jarvis/readme.txt
WARNING	No matching license critera could be determined from: GNU General Public License v2 or later!
WARNING	Unable to determine License URI with an invalid License supplied in readme.txt!

As far as I know the license information is valid. You can see the actual readme.txt I am testing here: https://github.com/BinaryMoon/jarvis/blob/master/readme.txt

@dingo-d
Copy link
Member

dingo-d commented Aug 7, 2019

We're using: https://github.com/timelsass/wp-license-compatibility to check for the license compatibility. The theme sniffer will look at the License and License URI from the readme.txt and try to compare them with an item in this list.

So for GPL2 or later you'd put:

License: GPL-2.0+
License URI: https://www.gnu.org/licenses/license-list.html#GPLv2

It's because the package is using an SPDX license identifier to identify licenses, to have everything standardised.

Try changing the readme with what I provided and see if the same thing happens.

@BinaryMoon
Copy link
Author

Thanks - that's helpful. Unfortunately it doesn't fix it. I now get the following error:

0	WARNING	The license identification provided, $s, indicates a deprecated license! Please use a valid SPDX Identifier!
0	WARNING	Unable to determine License URI with an invalid License supplied in readme.txt!

Is it possible to add a link to the allowed values in the error message to make it easier for people to understand/ fix?

@djallet
Copy link

djallet commented Aug 20, 2019

According to the list provided, GPL-2.0+ IS deprecated. You should use GPL-2.0-or-later instead.

@BinaryMoon
Copy link
Author

Thank you!

@timelsass
Copy link
Member

We're using: https://github.com/timelsass/wp-license-compatibility to check for the license compatibility. The theme sniffer will look at the License and License URI from the readme.txt and try to compare them with an item in this list.

So for GPL2 or later you'd put:

License: GPL-2.0+
License URI: https://www.gnu.org/licenses/license-list.html#GPLv2

It's because the package is using an SPDX license identifier to identify licenses, to have everything standardised.

Try changing the readme with what I provided and see if the same thing happens.

I had started working on doing a scan to try to get some more information as to some common strings that themes might already be using. Didn't get very far on that and have been caught up in some other work lately. Hopefully I'll be able to work on the license compatibility definitions a bit more since I know there's a few "commonly used by themes" strings that do "identify" the license despite not being SPDX.

Thanks - that's helpful. Unfortunately it doesn't fix it. I now get the following error:

0	WARNING	The license identification provided, $s, indicates a deprecated license! Please use a valid SPDX Identifier!
0	WARNING	Unable to determine License URI with an invalid License supplied in readme.txt!

eek yeah - overlooked $s though, didn't get the placeholder for a printf/sprintf in there correctly, so it's still a good catch!

Is it possible to add a link to the allowed values in the error message to make it easier for people to understand/ fix?

Yeah, the deprecated check, doesn't have data associated with any sort of recommended identifier. I'd have to do some research on that, but I initially was wanting this also. Anytime we can tell someone what they should put that will make it easier for future iterations to even auto correct something like this if the they click a "fix" button or something of that nature.

@dingo-d
Copy link
Member

dingo-d commented Sep 23, 2019

Glad to have you back @timelsass 🙂

@Kudratullah
Copy link
Contributor

If anyone still having this issue please take a look on the licenses.json and update your readme files accordingly.

You can use any of the licenses in your theme where isDeprecatedLicenseId is false & isGpl2Compatible or isGpl3Compatible is true

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants