diff mbox series

[1/2] scripts/checkpatch: Avoid author email mangled by qemu-trivial@

Message ID 20240402113015.66280-2-philmd@linaro.org
State Superseded
Headers show
Series scripts/checkpatch: Do not use mailmap and check qemu-trivial@ author | expand

Commit Message

Philippe Mathieu-Daudé April 2, 2024, 11:30 a.m. UTC
Commit f5177798d8 ("scripts: report on author emails
that are mangled by the mailing list") added a check
for qemu-devel@ list, complete with qemu-trivial@.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Maydell April 2, 2024, 11:52 a.m. UTC | #1
On Tue, 2 Apr 2024 at 12:30, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Commit f5177798d8 ("scripts: report on author emails
> that are mangled by the mailing list") added a check
> for qemu-devel@ list, complete with qemu-trivial@.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  scripts/checkpatch.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 7026895074..4fe4cfd631 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1573,7 +1573,7 @@ sub process {
>                         $is_patch = 1;
>                 }
>
> -               if ($line =~ /^(Author|From): .* via .*<qemu-devel\@nongnu.org>/) {
> +               if ($line =~ /^(Author|From): .* via .*<qemu-(devel|trivial)\@nongnu\.org>/) {

I recommend checking against qemu-.* rather than trying
to capture explicitly all the suffixes we have. (For instance
there's a line in mailmap for a commit that was attributed
to qemu-block@, which this change still wouldn't catch.)

thanks
-- PMM
Philippe Mathieu-Daudé April 2, 2024, 11:53 a.m. UTC | #2
On 2/4/24 13:52, Peter Maydell wrote:
> On Tue, 2 Apr 2024 at 12:30, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> Commit f5177798d8 ("scripts: report on author emails
>> that are mangled by the mailing list") added a check
>> for qemu-devel@ list, complete with qemu-trivial@.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   scripts/checkpatch.pl | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 7026895074..4fe4cfd631 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -1573,7 +1573,7 @@ sub process {
>>                          $is_patch = 1;
>>                  }
>>
>> -               if ($line =~ /^(Author|From): .* via .*<qemu-devel\@nongnu.org>/) {
>> +               if ($line =~ /^(Author|From): .* via .*<qemu-(devel|trivial)\@nongnu\.org>/) {
> 
> I recommend checking against qemu-.* rather than trying
> to capture explicitly all the suffixes we have. (For instance
> there's a line in mailmap for a commit that was attributed
> to qemu-block@, which this change still wouldn't catch.)

Oh, good point.
Philippe Mathieu-Daudé April 2, 2024, 11:56 a.m. UTC | #3
On 2/4/24 13:53, Philippe Mathieu-Daudé wrote:
> On 2/4/24 13:52, Peter Maydell wrote:
>> On Tue, 2 Apr 2024 at 12:30, Philippe Mathieu-Daudé 
>> <philmd@linaro.org> wrote:
>>>
>>> Commit f5177798d8 ("scripts: report on author emails
>>> that are mangled by the mailing list") added a check
>>> for qemu-devel@ list, complete with qemu-trivial@.
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> ---
>>>   scripts/checkpatch.pl | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>>> index 7026895074..4fe4cfd631 100755
>>> --- a/scripts/checkpatch.pl
>>> +++ b/scripts/checkpatch.pl
>>> @@ -1573,7 +1573,7 @@ sub process {
>>>                          $is_patch = 1;
>>>                  }
>>>
>>> -               if ($line =~ /^(Author|From): .* via 
>>> .*<qemu-devel\@nongnu.org>/) {
>>> +               if ($line =~ /^(Author|From): .* via 
>>> .*<qemu-(devel|trivial)\@nongnu\.org>/) {
>>
>> I recommend checking against qemu-.* rather than trying
>> to capture explicitly all the suffixes we have. (For instance
>> there's a line in mailmap for a commit that was attributed
>> to qemu-block@, which this change still wouldn't catch.)
> 
> Oh, good point.

And also qemu-ppc@nongnu.org:

commit 5cbd51a5a58098444ffa246ece2013849be04299
Author: BALATON Zoltan via <qemu-ppc@nongnu.org>
Date:   Sun Jan 3 02:09:33 2021 +0100
diff mbox series

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 7026895074..4fe4cfd631 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1573,7 +1573,7 @@  sub process {
 			$is_patch = 1;
 		}
 
-		if ($line =~ /^(Author|From): .* via .*<qemu-devel\@nongnu.org>/) {
+		if ($line =~ /^(Author|From): .* via .*<qemu-(devel|trivial)\@nongnu\.org>/) {
 		    ERROR("Author email address is mangled by the mailing list\n" . $herecurr);
 		}