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

Lukas Bulwahn lukas.bulwahn at gmail.com
Wed Oct 14 11:16:51 UTC 2020


On Wed, Oct 14, 2020 at 12:34 PM Dwaipayan Ray <dwaipayanray1 at gmail.com> wrote:
>
> On Tue, Oct 13, 2020 at 12:00 PM Dwaipayan Ray <dwaipayanray1 at gmail.com> 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'
> >
> > For example:
> > WARNING: Possible repeated word: 'git'
> > +T:     git git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git
> >
> > So, the pattern "git git://..." is a false positive in this case.
> >
> > Add 'git' to the exception list for repeated word check. This effectively
> > fixes all the newly generated false positives.
> >
> > Fixes: 4f6ad8aa1eac ("checkpatch: move repeated word test")
> > Link: https://lore.kernel.org/linux-kernel-mentees/b6cd81b936671a8868fe98536d7c80771bdfd61c.camel@perches.com/
> >
> > Suggested-by: Joe Perches <joe at perches.com>
> > Suggested-by: Lukas Bulwahn <lukas.bulwahn at gmail.com>
> > Signed-off-by: Dwaipayan Ray <dwaipayanray1 at gmail.com>
> > ---
> >  scripts/checkpatch.pl | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > index f1a4e61917eb..b55d83360366 100755
> > --- 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)$/);
> >
> >                                 if (WARN("REPEATED_WORD",
> >                                          "Possible repeated word: '$first'\n" . $herecurr) &&
> > --
> > 2.27.0
> >
>
> Hi,
> Should I send this out or has this reached a dead end here?
>

All good; I must have overlooked that mail. It looks good to me. Send
it to the larger group. Joe will probably just quickly ack that.

Lukas


More information about the Linux-kernel-mentees mailing list