Skip to content

Commit 892c436

Browse files
committed
github: workflows: Update compliance to match what upstream does
Downgrade ClangFormat errors to warnings. Signed-off-by: Johan Hedberg <[email protected]>
1 parent 4bd2e0f commit 892c436

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/compliance.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,28 @@ jobs:
5757
exit 1;
5858
fi
5959
60+
warns=("ClangFormat")
6061
files=($($ZEPHYR_BASE/scripts/ci/check_compliance.py -l))
62+
6163
for file in "${files[@]}"; do
6264
f="${file}.txt"
6365
if [[ -s $f ]]; then
64-
errors=$(cat $f)
65-
errors="${errors//'%'/'%25'}"
66-
errors="${errors//$'\n'/'%0A'}"
67-
errors="${errors//$'\r'/'%0D'}"
68-
echo "::error file=${f}::$errors"
69-
exit=1
66+
results=$(cat $f)
67+
results="${results//'%'/'%25'}"
68+
results="${results//$'\n'/'%0A'}"
69+
results="${results//$'\r'/'%0D'}"
70+
71+
if [[ "${warns[@]}" =~ "${file}" ]]; then
72+
echo "::warning file=${f}::$results"
73+
else
74+
echo "::error file=${f}::$results"
75+
exit=1
76+
fi
7077
fi
7178
done
7279
7380
if [ "${exit}" == "1" ]; then
81+
echo "Compliance error, check for error messages in the \"Run Compliance Tests\" step"
82+
echo "You can run this step locally with the ./scripts/ci/check_compliance.py script."
7483
exit 1;
7584
fi

0 commit comments

Comments
 (0)