From d5e336720d80d2285d30ee334de29f1b2af54fb2 Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Mon, 10 Jul 2023 16:07:17 +0800 Subject: util/lint/checkpatch_json.py: Make output message verbatim Some of the error messages of checkpatch.pl contain "*". Since now Gerrit supports markdown, messages with "*" will be rendered incorrectly. For example, foo* bar should be foo *bar will be shown as foo bar should be foo bar with "bar should be foo" being in italics. Fix the problem by surrounding the output message with "`" to make it verbatim. Change-Id: I02d0e894adf7f94a9e154f99321f51d4097963a5 Signed-off-by: Yu-Ping Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/76392 Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) Reviewed-by: Yidi Lin --- util/lint/checkpatch_json.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/lint/checkpatch_json.py') diff --git a/util/lint/checkpatch_json.py b/util/lint/checkpatch_json.py index 341bc57733..967e898817 100755 --- a/util/lint/checkpatch_json.py +++ b/util/lint/checkpatch_json.py @@ -24,8 +24,8 @@ def update_struct( file_path, msg_output, line_number): "robot_run_id" : sys.argv[3], "url" : sys.argv[4], "line" : line_number, - "message" : msg_output,} - ) + "message" : "`" + msg_output + "`", + }) def parse_file(input_file): fp = open (input_file, "r") -- cgit v1.2.3