WordPress/gutenberg

`check-licenses`: GPLv3 isn't recognized as a compatible license

Open

#20701 opened on Mar 8, 2020

View on GitHub
 (10 comments) (0 reactions) (0 assignees)JavaScript (9,607 stars) (3,893 forks)batch import
Good First Issue[Tool] WP Scripts[Type] Developer Documentation

Description

Re: https://github.com/WordPress/gutenberg/blob/%40wordpress/scripts%407.1.2/packages/scripts/scripts/check-licenses.js#L36

May be related: #7821

Describe the bug

GPLv3+ should be recognized as compatible, per: A) https://github.com/WordPress/WordPress/blob/5.3.2/readme.html#L94-L95

WordPress is free software, and is released under the terms of the GPL (GNU General Public License) version 2 or (at your option) any later version.

and

B) https://www.gnu.org/licenses/license-list.en.html#GNUGPL

Please note that GPLv3 is not compatible with GPLv2 by itself. However, most software released under GPLv2 allows you to use the terms of later versions of the GPL as well. When this is the case, you can use the code under GPLv3 to make the desired combination. ... links to https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility ... screenshot of it:

image

To reproduce

In your plugin's package.json, set "license": "GPL-3.0-or-later", then run wp-scripts check-licenses and you'll get this message:

ERROR Module your-plugin has an incompatible license 'GPL-3.0-or-later'.

Change the package.json to "license": "GPL-2.0-or-later", re-run, and no messages.

Expected behavior

No error message with GPLv3+.

See comment from @pento to learn about the proposed solution: https://github.com/WordPress/gutenberg/issues/20701#issuecomment-761961307.

Contributor guide