qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH v2] checkpatch: Flag suspicious a


From: Eric Blake
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH v2] checkpatch: Flag suspicious attribution lines
Date: Mon, 4 Feb 2019 20:14:22 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 2/4/19 5:29 PM, Philippe Mathieu-Daudé wrote:
> On 2/4/19 11:55 PM, Eric Blake wrote:
>> Flag commit attribution tags that are unusual (often because they
>> were a typo), but only as a warning (because sometimes a humorous
>> or otherwise useful tag is intentionally supplied).
>>
>> This picks the 6-most popular tags, each with 700 or more uses (well,
>> S-o-b was already checked for case-sensitivity and typos, leaving
>> only 5 new tags being checked), as determined by:
>> $ git log | sed -n 's/^ *\([A-Za-z-]*-by:\).*/\1/p' | \
>>   sort | uniq -c | sort -k1,1n | tail

Use of [bB][yY] finds a few more interesting spellings...

>>
>> Most of the rejected lines were obvious typos (among others, we've
>> had 4 cases of someone being burnt, based on Singed-off-by; and 2
>> cases of list-reading via an e-reader, based on eviewed-by; there
>> are also lines forgetting a space after the ':') or otherwise
>> tongue-in-check (3 Approximately-suggested-by). A few lines not
>> whitelisted here may be legitimate, but as they are orders of
>> magnitude rarer, it is therefore not worth worrying about
>> (7 Requested-by, 3 Co-authored-by, 1 Inspired-by, etc.).

Among others, 48 Reviewed-By.


>> @@ -1470,6 +1470,10 @@ sub process {
>>                              ERROR("space required after Signed-off-by:\n" .
>>                                      $herecurr);
>>                      }
>> +            } elsif($line =~ /^\s*([A-Za-z-]*)-by:/ &&
> 
> I guess we don't mind about angry typewriters who Ack-BY ;)

I can send a v3 that makes this line case-insensitive,

> 
>> +                    ($1 !~ /(Suggest|Report|Test|Ack|Review)ed/ ||
>> +                     $line !~ /^\s*[a-z-]*-by:\s/i)) {

although making this line require lower-case '-by' gets a bit trickier.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]