From f21c97a9c546e5db73bd8fffe50ddd9683962337 Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Fri, 28 Jun 2024 08:20:45 +0200 Subject: [PATCH] scripts: ci: check_compliance.py: Allow multiline annotations Encode annotation message to allow multiline messages. Signed-off-by: Pieter De Gendt --- scripts/ci/check_compliance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ci/check_compliance.py b/scripts/ci/check_compliance.py index b654e0f9ec2..33ba1436766 100755 --- a/scripts/ci/check_compliance.py +++ b/scripts/ci/check_compliance.py @@ -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)