scripts: ci: check_compliance.py: Allow multiline annotations
Encode annotation message to allow multiline messages. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
690134356c
commit
f21c97a9c5
1 changed files with 2 additions and 1 deletions
|
|
@ -1533,10 +1533,11 @@ def annotate(res):
|
|||
"""
|
||||
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#about-workflow-commands
|
||||
"""
|
||||
msg = res.message.replace('%', '%25').replace('\n', '%0A').replace('\r', '%0D')
|
||||
notice = f'::{res.severity} file={res.file}' + \
|
||||
(f',line={res.line}' if res.line else '') + \
|
||||
(f',col={res.col}' if res.col else '') + \
|
||||
f',title={res.title}::{res.message}'
|
||||
f',title={res.title}::{msg}'
|
||||
print(notice)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue