All of lore.kernel.org
 help / color / mirror / Atom feed
* checkpatch.pl: REPEATED_WORD: massive false positive in MAINTAINERS
@ 2020-10-08 11:50 ` Lukas Bulwahn
  0 siblings, 0 replies; 6+ messages in thread
From: Lukas Bulwahn @ 2020-10-08 11:50 UTC (permalink / raw)
  To: Joe Perches, Dwaipayan Ray; +Cc: linux-kernel-mentees, linux-kernel

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:

$ ./scripts/checkpatch.pl --show-types -f MAINTAINERS

results in 625 warnings of the following kind:

WARNING:REPEATED_WORD: Possible repeated word: 'git'
#XYZ: FILE: MAINTAINERS:XYZ:
+T:	git git://...

That pattern above is of course intentional and perfectly fine, so now the 
REPEATED_WORD check should not complain here.


Joe, would you accept a suitable refinement of the REPEATED_WORD check 
that address the issue above?

Dwaipayan, is that another good issue for you to look into and improve?
There are multiple ways to handle it either directly checking for that 
pattern or excluding MAINTAINERS or both or something completely 
different.


Lukas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Linux-kernel-mentees] checkpatch.pl: REPEATED_WORD: massive false positive in MAINTAINERS
@ 2020-10-08 11:50 ` Lukas Bulwahn
  0 siblings, 0 replies; 6+ messages in thread
From: Lukas Bulwahn @ 2020-10-08 11:50 UTC (permalink / raw)
  To: Joe Perches, Dwaipayan Ray; +Cc: linux-kernel-mentees, linux-kernel

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:

$ ./scripts/checkpatch.pl --show-types -f MAINTAINERS

results in 625 warnings of the following kind:

WARNING:REPEATED_WORD: Possible repeated word: 'git'
#XYZ: FILE: MAINTAINERS:XYZ:
+T:	git git://...

That pattern above is of course intentional and perfectly fine, so now the 
REPEATED_WORD check should not complain here.


Joe, would you accept a suitable refinement of the REPEATED_WORD check 
that address the issue above?

Dwaipayan, is that another good issue for you to look into and improve?
There are multiple ways to handle it either directly checking for that 
pattern or excluding MAINTAINERS or both or something completely 
different.


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

* Re: checkpatch.pl: REPEATED_WORD: massive false positive in MAINTAINERS
  2020-10-08 11:50 ` [Linux-kernel-mentees] " Lukas Bulwahn
@ 2020-10-08 12:48   ` Joe Perches
  -1 siblings, 0 replies; 6+ messages in thread
From: Joe Perches @ 2020-10-08 12:48 UTC (permalink / raw)
  To: Lukas Bulwahn, Dwaipayan Ray; +Cc: linux-kernel-mentees, linux-kernel

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)$/);




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Linux-kernel-mentees] checkpatch.pl: REPEATED_WORD: massive false positive in MAINTAINERS
@ 2020-10-08 12:48   ` Joe Perches
  0 siblings, 0 replies; 6+ messages in thread
From: Joe Perches @ 2020-10-08 12:48 UTC (permalink / raw)
  To: Lukas Bulwahn, Dwaipayan Ray; +Cc: linux-kernel-mentees, linux-kernel

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)$/);



_______________________________________________
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: checkpatch.pl: REPEATED_WORD: massive false positive in MAINTAINERS
  2020-10-08 12:48   ` [Linux-kernel-mentees] " Joe Perches
@ 2020-10-08 13:35     ` Dwaipayan Ray
  -1 siblings, 0 replies; 6+ messages in thread
From: Dwaipayan Ray @ 2020-10-08 13:35 UTC (permalink / raw)
  To: Joe Perches; +Cc: Lukas Bulwahn, linux-kernel-mentees, linux-kernel

On Thu, Oct 8, 2020 at 6:18 PM Joe Perches <joe@perches.com> wrote:
>
> 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)$/);
>
>
>

Hi,
It does resolve all the warnings concerned.
But could we also exclude documentation type blocks like:
/**
* @size size of access
*/
There were quite a few of these in include/linux/instrumented.

And also it isn't case sensitive. So the line
"the the word is repeated" generates a warning, but
"The the word is repeated" doesn't generate anything.

Thanks,
Dwaipayan.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Linux-kernel-mentees] checkpatch.pl: REPEATED_WORD: massive false positive in MAINTAINERS
@ 2020-10-08 13:35     ` Dwaipayan Ray
  0 siblings, 0 replies; 6+ messages in thread
From: Dwaipayan Ray @ 2020-10-08 13:35 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel-mentees, linux-kernel

On Thu, Oct 8, 2020 at 6:18 PM Joe Perches <joe@perches.com> wrote:
>
> 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)$/);
>
>
>

Hi,
It does resolve all the warnings concerned.
But could we also exclude documentation type blocks like:
/**
* @size size of access
*/
There were quite a few of these in include/linux/instrumented.

And also it isn't case sensitive. So the line
"the the word is repeated" generates a warning, but
"The the word is repeated" doesn't generate anything.

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-08 13:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08 11:50 checkpatch.pl: REPEATED_WORD: massive false positive in MAINTAINERS Lukas Bulwahn
2020-10-08 11:50 ` [Linux-kernel-mentees] " Lukas Bulwahn
2020-10-08 12:48 ` Joe Perches
2020-10-08 12:48   ` [Linux-kernel-mentees] " Joe Perches
2020-10-08 13:35   ` Dwaipayan Ray
2020-10-08 13:35     ` [Linux-kernel-mentees] " Dwaipayan Ray

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.