summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2021-03-15 21:07:05 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-04-15 19:08:00 +0000
commit39891c00da70187d1046c9b6cbb966ed450953b0 (patch)
treed06f24a18b1f2c81bdfe5d2f8730bb585ebda9f8
parentb97e6f713e1e2891b7ea8b76b34cfb24a2d74f64 (diff)
checkpatch_json: Mark robotic comments as robotic
Gerrit now knows to differentiate between "regular" comments and "robot" comments, with some later changes to the UI in the pipeline (e.g. to filter out robot messages) Change-Id: I3a545d1cf6c04b331964becd2b24eb38018394eb Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51504 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
-rwxr-xr-xutil/lint/checkpatch_json.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/util/lint/checkpatch_json.py b/util/lint/checkpatch_json.py
index 8102c114b9..81946cabc7 100755
--- a/util/lint/checkpatch_json.py
+++ b/util/lint/checkpatch_json.py
@@ -19,6 +19,9 @@ def update_struct( file_path, msg_output, line_number):
if file_path not in list_temp:
list_temp[file_path] = []
list_temp[file_path].append({
+ "robot_id" : "checkpatch",
+ "robot_run_id" : sys.argv[3],
+ "url" : sys.argv[4],
"line" : line_number,
"message" : msg_output,}
)
@@ -40,14 +43,14 @@ def parse_file(input_file):
fp.close()
def main():
- if (len(sys.argv) < 3) or (sys.argv[1] == "-h"):
+ if (len(sys.argv) < 5) or (sys.argv[1] == "-h"):
print("HELP:")
- print(sys.argv[0] + " <input file> <output file in json>")
+ print(sys.argv[0] + " <input file> <output file in json> <job-id> <job-url>")
sys.exit()
print(sys.argv[1])
parse_file(sys.argv[1])
- data['comments'] = list_temp
+ data['robot_comments'] = list_temp
print(json.dumps(data))
out_file = open( sys.argv[2] , "w")
json.dump(data, out_file, sort_keys=True, indent=4)