Skip to content

Commit f21c97a

Browse files
pdgendtnashif
authored andcommitted
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>
1 parent 6901343 commit f21c97a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/ci/check_compliance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1533,10 +1533,11 @@ def annotate(res):
15331533
"""
15341534
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#about-workflow-commands
15351535
"""
1536+
msg = res.message.replace('%', '%25').replace('\n', '%0A').replace('\r', '%0D')
15361537
notice = f'::{res.severity} file={res.file}' + \
15371538
(f',line={res.line}' if res.line else '') + \
15381539
(f',col={res.col}' if res.col else '') + \
1539-
f',title={res.title}::{res.message}'
1540+
f',title={res.title}::{msg}'
15401541
print(notice)
15411542

15421543

0 commit comments

Comments
 (0)