mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
checkpatch: Print subject field if misspelled or missing.
This narrows down spelling errors that are in the commit subject. It also provides a subject if the subject line is missing. The provisional subject is the name of the patch file, which should provide some context about the patch. Acked-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Chandan Somani <csomani@redhat.com> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
This commit is contained in:
committed by
Eelco Chaudron
parent
9a50170a80
commit
799f697e51
@@ -1024,6 +1024,19 @@ def ovs_checkpatch_file(filename):
|
||||
result = ovs_checkpatch_parse(part.get_payload(decode=False), filename,
|
||||
mail.get('Author', mail['From']),
|
||||
mail['Commit'])
|
||||
if spellcheck:
|
||||
if not mail['Subject'] or not mail['Subject'].strip():
|
||||
if mail['Subject']:
|
||||
mail.replace_header('Subject', sys.argv[-1])
|
||||
else:
|
||||
mail.add_header('Subject', sys.argv[-1])
|
||||
|
||||
print("Subject missing! Your provisional subject is",
|
||||
mail['Subject'])
|
||||
|
||||
if check_spelling(mail['Subject'], False):
|
||||
print("Subject: %s" % mail['Subject'])
|
||||
|
||||
ovs_checkpatch_print_result()
|
||||
return result
|
||||
|
||||
|
Reference in New Issue
Block a user