diff --git a/util/lint/checkpatch_json.py b/util/lint/checkpatch_json.py index 81946cabc7..341bc57733 100755 --- a/util/lint/checkpatch_json.py +++ b/util/lint/checkpatch_json.py @@ -10,6 +10,7 @@ OUTPUT: json format output that can be used to post comment in gerrit import os import sys import json +import re data = {} data['comments'] = [] @@ -38,6 +39,11 @@ def parse_file(input_file): 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" and line.startswith("#"): + file_path="/COMMIT_MSG" + line = line.replace('#', '') + line_number = int(line.split(":")[0]) + 2 + update_struct( file_path.strip(), msg_output, str(line_number) ) else: continue fp.close()