From 39891c00da70187d1046c9b6cbb966ed450953b0 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Mon, 15 Mar 2021 21:07:05 +0100 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/51504 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Paul Menzel --- util/lint/checkpatch_json.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'util/lint/checkpatch_json.py') 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] + " ") + print(sys.argv[0] + " ") 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) -- cgit v1.2.3