Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63031 )
Change subject: util/lint: Add commit message parsing to checkpatch_json script ......................................................................
util/lint: Add commit message parsing to checkpatch_json script
The commit message wasn't being parsed because there's no filename associated with it in the patch output. This change adds the filename for the commit message in Gerrit for any errors that have a line number but no filename.
Change-Id: Ie7a2ef06419c7090c8e44b3b734b1edf966597cc Signed-off-by: Martin Roth martin@coreboot.org --- M util/lint/checkpatch_json.py 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/63031/1
diff --git a/util/lint/checkpatch_json.py b/util/lint/checkpatch_json.py index 81946ca..2915052 100755 --- a/util/lint/checkpatch_json.py +++ b/util/lint/checkpatch_json.py @@ -10,6 +10,7 @@ import os import sys import json +import re
data = {} data['comments'] = [] @@ -38,6 +39,10 @@ file_path = temp[1].split(":")[0] line_number = temp[1].split(":")[1] update_struct( file_path.strip(), msg_output, str(line_number) ) + elif re.search("^\d+:\Z",line) != "None": + file_path="COMMIT_MESSAGE" + line_number = line.split(":") + update_struct( file_path.strip(), msg_output, str(line_number) ) else: continue fp.close()