Re: [PATCH RESEND v2] checkpatch: use utf-8 match for spell checking

From: Clement LE GOFFIC
Date: Tue Jun 17 2025 - 03:36:55 EST


On 6/17/25 02:31, Andrew Morton wrote:
On Mon, 16 Jun 2025 09:59:13 +0200 Clément Le Goffic <clement.legoffic@xxxxxxxxxxx> wrote:

From: Antonio Borneo <antonio.borneo@xxxxxxxxxxx>

The current code that checks for misspelling verifies, in a more
complex regex, if $rawline matches [^\w]($misspellings)[^\w]

Being $rawline a byte-string, a utf-8 character in $rawline can
match the non-word-char [^\w].
E.g.:
./scripts/checkpatch.pl --git 81c2f059ab9
WARNING: 'ment' may be misspelled - perhaps 'meant'?
#36: FILE: MAINTAINERS:14360:
+M: Clément Léger <clement.leger@xxxxxxxxxxx>
^^^^

Use a utf-8 version of $rawline for spell checking.

Signed-off-by: Antonio Borneo <antonio.borneo@xxxxxxxxxxx>
Reported-by: Clément Le Goffic <clement.legoffic@xxxxxxxxxxx>
---
Signed-off-by: Clément Le Goffic <clement.legoffic@xxxxxxxxxxx>

Oh, there it is, after the "^---$", which marks end-of-changelog!

Hi, Oh right sorry !
Thank you for making the change.

Clément