* [Linux-kernel-mentees] [PATCH] checkpatch: add new exception to repeated word check
@ 2020-10-13 6:30 Dwaipayan Ray
2020-10-14 10:34 ` Dwaipayan Ray
0 siblings, 1 reply; 6+ messages in thread
From: Dwaipayan Ray @ 2020-10-13 6:30 UTC (permalink / raw)
To: lukas.bulwahn; +Cc: dwaipayanray1, linux-kernel-mentees
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@perches.com>
Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Dwaipayan Ray <dwaipayanray1@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
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Linux-kernel-mentees] [PATCH] checkpatch: add new exception to repeated word check
2020-10-13 6:30 [Linux-kernel-mentees] [PATCH] checkpatch: add new exception to repeated word check Dwaipayan Ray
@ 2020-10-14 10:34 ` Dwaipayan Ray
2020-10-14 11:16 ` Lukas Bulwahn
0 siblings, 1 reply; 6+ messages in thread
From: Dwaipayan Ray @ 2020-10-14 10:34 UTC (permalink / raw)
To: Lukas Bulwahn; +Cc: linux-kernel-mentees
On Tue, Oct 13, 2020 at 12:00 PM Dwaipayan Ray <dwaipayanray1@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@perches.com>
> Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
> Signed-off-by: Dwaipayan Ray <dwaipayanray1@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?
Thanks,
Dwaipayan.
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Linux-kernel-mentees] [PATCH] checkpatch: add new exception to repeated word check
2020-10-14 10:34 ` Dwaipayan Ray
@ 2020-10-14 11:16 ` Lukas Bulwahn
0 siblings, 0 replies; 6+ messages in thread
From: Lukas Bulwahn @ 2020-10-14 11:16 UTC (permalink / raw)
To: Dwaipayan Ray; +Cc: linux-kernel-mentees
On Wed, Oct 14, 2020 at 12:34 PM Dwaipayan Ray <dwaipayanray1@gmail.com> wrote:
>
> On Tue, Oct 13, 2020 at 12:00 PM Dwaipayan Ray <dwaipayanray1@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@perches.com>
> > Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
> > Signed-off-by: Dwaipayan Ray <dwaipayanray1@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
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Linux-kernel-mentees] [PATCH] checkpatch: add new exception to repeated word check
@ 2020-10-14 13:56 Dwaipayan Ray
2020-10-14 16:17 ` Joe Perches
0 siblings, 1 reply; 6+ messages in thread
From: Dwaipayan Ray @ 2020-10-14 13:56 UTC (permalink / raw)
To: joe; +Cc: dwaipayanray1, linux-kernel-mentees, linux-kernel
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@perches.com>
Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Dwaipayan Ray <dwaipayanray1@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
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Linux-kernel-mentees] [PATCH] checkpatch: add new exception to repeated word check
2020-10-14 13:56 Dwaipayan Ray
@ 2020-10-14 16:17 ` Joe Perches
2020-10-14 16:33 ` Dwaipayan Ray
0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2020-10-14 16:17 UTC (permalink / raw)
To: Dwaipayan Ray; +Cc: linux-kernel-mentees, linux-kernel
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)$/);
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Linux-kernel-mentees] [PATCH] checkpatch: add new exception to repeated word check
2020-10-14 16:17 ` Joe Perches
@ 2020-10-14 16:33 ` Dwaipayan Ray
0 siblings, 0 replies; 6+ messages in thread
From: Dwaipayan Ray @ 2020-10-14 16:33 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel-mentees, linux-kernel
On Wed, Oct 14, 2020 at 9:47 PM Joe Perches <joe@perches.com> wrote:
>
> 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)$/);
>
>
Yikes, that was silly of me. I will correct and send you the
updated version.
Thanks,
Dwaipayan.
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-14 16:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 6:30 [Linux-kernel-mentees] [PATCH] checkpatch: add new exception to repeated word check Dwaipayan Ray
2020-10-14 10:34 ` Dwaipayan Ray
2020-10-14 11:16 ` Lukas Bulwahn
2020-10-14 13:56 Dwaipayan Ray
2020-10-14 16:17 ` Joe Perches
2020-10-14 16:33 ` Dwaipayan Ray
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).