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 <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76392
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
This commit is contained in:
Yu-Ping Wu 2023-07-10 16:07:17 +08:00 committed by Felix Held
parent d1d17908fa
commit d5e336720d
1 changed files with 2 additions and 2 deletions

View File

@ -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")