linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] checkpatch: improve MAINTAINERS file update test
       [not found] <20200727205856.28343-1-ddadap@nvidia.com>
@ 2020-07-27 21:07 ` Joe Perches
  2020-07-27 22:02   ` Daniel Dadap
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2020-07-27 21:07 UTC (permalink / raw)
  To: Daniel Dadap, apw; +Cc: LKML

On Mon, 2020-07-27 at 15:58 -0500, Daniel Dadap wrote:
> Add an additional regular expression to detect updates to the
> MAINTAINERS file as reported in the unified diffs generated by
> `git format-patch`. This suppresses the "does MAINTAINERS need
> updating" message when MAINTAINERS is updated with this format.

Please cc at least LKML.

> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -2621,7 +2621,8 @@ sub process {
>  
>  # Check if MAINTAINERS is being updated.  If so, there's probably no need to
>  # emit the "does MAINTAINERS need updating?" message on file add/move/delete
> -		if ($line =~ /^\s*MAINTAINERS\s*\|/) {
> +		if ($line =~ /^\s*MAINTAINERS\s*\|/ ||
> +		    $line =~ /^[-+]{3} [ab]\/MAINTAINERS$/) {

I don't believe this works well as any test
for a file modification to MAINTAINERS occurs
after the block that would show a diffstat
where the warning is emitted.



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

* Re: [PATCH] checkpatch: improve MAINTAINERS file update test
  2020-07-27 21:07 ` [PATCH] checkpatch: improve MAINTAINERS file update test Joe Perches
@ 2020-07-27 22:02   ` Daniel Dadap
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Dadap @ 2020-07-27 22:02 UTC (permalink / raw)
  To: Joe Perches, apw; +Cc: LKML


On 7/27/20 4:07 PM, Joe Perches wrote:
> External email: Use caution opening links or attachments
>
>
> On Mon, 2020-07-27 at 15:58 -0500, Daniel Dadap wrote:
>> Add an additional regular expression to detect updates to the
>> MAINTAINERS file as reported in the unified diffs generated by
>> `git format-patch`. This suppresses the "does MAINTAINERS need
>> updating" message when MAINTAINERS is updated with this format.
> Please cc at least LKML.


Oops; thanks for adding the list. I'll be sure to include it for any 
revised patches.


>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
>> @@ -2621,7 +2621,8 @@ sub process {
>>
>>   # Check if MAINTAINERS is being updated.  If so, there's probably no need to
>>   # emit the "does MAINTAINERS need updating?" message on file add/move/delete
>> -             if ($line =~ /^\s*MAINTAINERS\s*\|/) {
>> +             if ($line =~ /^\s*MAINTAINERS\s*\|/ ||
>> +                 $line =~ /^[-+]{3} [ab]\/MAINTAINERS$/) {
> I don't believe this works well as any test
> for a file modification to MAINTAINERS occurs
> after the block that would show a diffstat
> where the warning is emitted.


Hmm. It must have worked for me because the MAINTAINERS file appeared 
earlier in the patch than a newly added file in a patch I was checking 
that triggers this warning before this change, but doesn't after this 
change. This needn't be the case, though. Would it make sense to move 
the check for a diffstat-style /^\sMAINTAINERS\s*\|/ as well as a 
unidiff-style /^[-+]{3} [ab]\/MAINTAINERS$/ to the pre-scan sanitize phase?


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

end of thread, other threads:[~2020-07-27 22:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200727205856.28343-1-ddadap@nvidia.com>
2020-07-27 21:07 ` [PATCH] checkpatch: improve MAINTAINERS file update test Joe Perches
2020-07-27 22:02   ` Daniel Dadap

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).