Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/51504 )
Change subject: checkpatch_json: Mark robotic comments as robotic ......................................................................
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 --- M util/lint/checkpatch_json.py 1 file changed, 6 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Stefan Reinauer: Looks good to me, approved Paul Menzel: Looks good to me, but someone else must approve
diff --git a/util/lint/checkpatch_json.py b/util/lint/checkpatch_json.py index 8102c11..81946ca 100755 --- a/util/lint/checkpatch_json.py +++ b/util/lint/checkpatch_json.py @@ -19,6 +19,9 @@ 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 @@ 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)