On 9 Sep 2023, at 1:11, Ilya Maximets wrote:
> On 9/5/23 14:40, Eelco Chaudron wrote:
>> This patch adds WARNINGs for the subject line length and the format,
>> i.e., the sentence should start with a capital and end with a dot.
>>
>> Signed-off-by: Eelco Chaudron <echau...@redhat.com>
>> ---
>> utilities/checkpatch.py | 30 ++++++++++++++++++++++++++++++
>> 1 file changed, 30 insertions(+)
>>
>> diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
>> index 5c4aaefb3..57959595f 100755
>> --- a/utilities/checkpatch.py
>> +++ b/utilities/checkpatch.py
>> @@ -792,6 +792,33 @@ def run_file_checks(text):
>> check['check'](text)
>>
>>
>> +def run_subject_checks(subject, spellcheck=False):
>> + print_subject = False
>> +
>> + if spellcheck and check_spelling(subject, False):
>> + print_subject = True
>> +
>> + summary = subject[subject.rindex(': ') + 2:]
>> + summary_len = len(summary)
>> + if summary_len > 50:
>> + print_warning("The subject summary is over 50 characters, i.e.,
>> %u." %
>
> Also, 50 seems like too low of a number. It looks like about
> 25% of all commits in OVS will fail this check. If we make it
> 65, for example, it will be only 2%. 7% with 60.
Yes, I noticed, but took the 50 from our documentation. Maybe we should limit
the total length to 70 like they do in the kernel?
> What do you think?
Will add the test cases and send out a v2.
//Eelco
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev