[PATCH 0/2] scripts/spelling.txt: add GPL-2.0+

The correct SPDX identifier for the 'GNU General Public License v2.0 or later' is GPL-2.0-or-later.
Checkpatch.pl uses the misspelled words from spelling.txt both as keys of a hash and as part of a regular expression. For usage in the regular expression special characters like the plus sign need to be escaped.
Heinrich Schuchardt (2): scripts/checkpatch.pl: allow special characters in spelling.txt scripts/spelling.txt: add GPL-2.0+
scripts/checkpatch.pl | 2 +- scripts/spelling.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)

Checkpatch.pl uses the misspelled words from spelling.txt both as keys of a hash and as part of a regular expression. For usage in the regular expression special characters like the plus sign need to be escaped.
Escape special characters in the list of misspelled words.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b8eb57f38c7..cee60e390e7 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -942,7 +942,7 @@ if ($codespell) { } }
-$misspellings = join("|", sort keys %spelling_fix) if keys %spelling_fix; +$misspellings = join("|", map{quotemeta($_)} sort keys %spelling_fix) if keys %spelling_fix;
sub read_words { my ($wordsRef, $file) = @_;

The correct SPDX identifier for the 'GNU General Public License v2.0 or later' is GPL-2.0-or-later.
Link: https://spdx.org/licenses/GPL-2.0-or-later.html Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- scripts/spelling.txt | 1 + 1 file changed, 1 insertion(+)
diff --git a/scripts/spelling.txt b/scripts/spelling.txt index 17fdc620d54..61a3e86deef 100644 --- a/scripts/spelling.txt +++ b/scripts/spelling.txt @@ -694,6 +694,7 @@ genereate||generate genereted||generated genric||generic globel||global +gpl-2.0+||GPL-2.0-or-later grabing||grabbing grahical||graphical grahpical||graphical

On 12/15/24 03:37, Heinrich Schuchardt wrote:
The correct SPDX identifier for the 'GNU General Public License v2.0 or later' is GPL-2.0-or-later.
Checkpatch.pl uses the misspelled words from spelling.txt both as keys of a hash and as part of a regular expression. For usage in the regular expression special characters like the plus sign need to be escaped.
Heinrich Schuchardt (2): scripts/checkpatch.pl: allow special characters in spelling.txt scripts/spelling.txt: add GPL-2.0+
scripts/checkpatch.pl | 2 +- scripts/spelling.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
I sent similar patches send to the Linux kernel list:
https://lore.kernel.org/lkml/20241215025104.70096-1-heinrich.schuchardt@cano...
Best regards
Heinrich

On Sun, Dec 15, 2024 at 03:55:35AM +0100, Heinrich Schuchardt wrote:
On 12/15/24 03:37, Heinrich Schuchardt wrote:
The correct SPDX identifier for the 'GNU General Public License v2.0 or later' is GPL-2.0-or-later.
Checkpatch.pl uses the misspelled words from spelling.txt both as keys of a hash and as part of a regular expression. For usage in the regular expression special characters like the plus sign need to be escaped.
Heinrich Schuchardt (2): scripts/checkpatch.pl: allow special characters in spelling.txt scripts/spelling.txt: add GPL-2.0+
scripts/checkpatch.pl | 2 +- scripts/spelling.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
I sent similar patches send to the Linux kernel list:
https://lore.kernel.org/lkml/20241215025104.70096-1-heinrich.schuchardt@cano...
Thanks for trying this upstream. As they seem uninterested, adding this to the existing function of "sub u_boot_line" in our checkpatch.pl is fine as an alternative.

On 16.12.24 16:38, Tom Rini wrote:
On Sun, Dec 15, 2024 at 03:55:35AM +0100, Heinrich Schuchardt wrote:
On 12/15/24 03:37, Heinrich Schuchardt wrote:
The correct SPDX identifier for the 'GNU General Public License v2.0 or later' is GPL-2.0-or-later.
Checkpatch.pl uses the misspelled words from spelling.txt both as keys of a hash and as part of a regular expression. For usage in the regular expression special characters like the plus sign need to be escaped.
Heinrich Schuchardt (2): scripts/checkpatch.pl: allow special characters in spelling.txt scripts/spelling.txt: add GPL-2.0+
scripts/checkpatch.pl | 2 +- scripts/spelling.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
I sent similar patches send to the Linux kernel list:
https://lore.kernel.org/lkml/20241215025104.70096-1-heinrich.schuchardt@cano...
Thanks for trying this upstream. As they seem uninterested, adding this to the existing function of "sub u_boot_line" in our checkpatch.pl is fine as an alternative.
u_boot_line() is not called for *.rst files.
Best regards
Heinrich
participants (2)
-
Heinrich Schuchardt
-
Tom Rini