[Linux-kernel-mentees] [PATCH] checkpatch: add new exception to repeated word check

Joe Perches joe at perches.com
Wed Oct 14 16:17:46 UTC 2020


On Wed, 2020-10-14 at 19:26 +0530, Dwaipayan Ray wrote:
> Recently, commit 4f6ad8aa1eac ("checkpatch: move repeated word test")
> moved the repeated word test to check for more file types. But after
> this, if checkpatch.pl is run on MAINTAINERS, it generates several
> new warnings of the type:
> 
> WARNING: Possible repeated word: 'git'
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -3063,7 +3063,7 @@ sub process {
>  				}
>  
>  				next if ($first ne $second);
> -				next if ($first eq 'long');
> +				next if ($first =~ /(?:long|git)$/);

Nak.  This needs a leading ^ otherwise words
like "belong" and "digit" match as well.

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




More information about the Linux-kernel-mentees mailing list