[Linux-kernel-mentees] checkpatch.pl: REPEATED_WORD: massive false positive in MAINTAINERS

Joe Perches joe at perches.com
Thu Oct 8 12:48:46 UTC 2020

On Thu, 2020-10-08 at 13:50 +0200, Lukas Bulwahn wrote:
> Dear Joe, dear Dwaipayan,
> while maintaining MAINTAINERS, I noticed that the REPEATED_WORD check, 
> which in general is a great addition to checkpatch.pl, generates a massive
> number of warnings due to one specific pattern in the MAINTAINERS file:

I didn't actually check if there were many
new false positives, but
clearly that's one.

Maybe exclude the MAINTAINERS file?

-		if ($rawline =~ /^\+/ || $in_commit_log) {
+		if (($rawline =~ /^\+/ || $in_commit_log) && $realfile ne "MAINTAINERS") {

Maybe add git to the check for "long long"?

-				next if ($first eq 'long');
+				next if ($first =~ /^(?:long|git)$/);

More information about the Linux-kernel-mentees mailing list