diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml index 708e811..19fb3aa 100644 --- a/.github/workflows/compliance.yml +++ b/.github/workflows/compliance.yml @@ -57,19 +57,28 @@ jobs: exit 1; fi + warns=("ClangFormat") files=($($ZEPHYR_BASE/scripts/ci/check_compliance.py -l)) + for file in "${files[@]}"; do f="${file}.txt" if [[ -s $f ]]; then - errors=$(cat $f) - errors="${errors//'%'/'%25'}" - errors="${errors//$'\n'/'%0A'}" - errors="${errors//$'\r'/'%0D'}" - echo "::error file=${f}::$errors" - exit=1 + results=$(cat $f) + results="${results//'%'/'%25'}" + results="${results//$'\n'/'%0A'}" + results="${results//$'\r'/'%0D'}" + + if [[ "${warns[@]}" =~ "${file}" ]]; then + echo "::warning file=${f}::$results" + else + echo "::error file=${f}::$results" + exit=1 + fi fi done if [ "${exit}" == "1" ]; then + echo "Compliance error, check for error messages in the \"Run Compliance Tests\" step" + echo "You can run this step locally with the ./scripts/ci/check_compliance.py script." exit 1; fi