@@ -84,14 +84,14 @@ jobs:
8484 working-directory : nrf-bm
8585 if : contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
8686 run : |
87- export PATH="$HOME/.local/bin:$PATH"
88- export PATH="$HOME/bin:$PATH"
8987 export ZEPHYR_BASE="$(dirname "$(pwd)")/zephyr"
9088 # debug
9189 ls -la
9290 git log --pretty=oneline | head -n 10
9391 exec 2> compliance_errors.txt
94- $ZEPHYR_BASE/scripts/ci/check_compliance.py -m Codeowners -m Devicetree -m Identity -m Nits -m Gitlint -m pylint -c origin/${BASE_REF}..
92+ $ZEPHYR_BASE/scripts/ci/check_compliance.py --annotate \
93+ -e KconfigBasicNoModules -e ClangFormat -e SysbuildKconfigBasicNoModules \
94+ -c origin/${BASE_REF}..
9595 if [[ $? -ne 0 ]]; then
9696 echo "$?" >&2
9797 fi
@@ -103,31 +103,30 @@ jobs:
103103 with :
104104 name : compliance.xml
105105 path : nrf-bm/compliance.xml
106+ overwrite : true
106107
107108 - name : check-warns
108109 working-directory : nrf-bm
110+ if : contains(github.event.pull_request.user.login, 'dependabot[bot]') != true
109111 run : |
110- if [[ -s 'compliance_errors.txt' ]]; then
111- echo "ERRORS FOUND! Exiting"
112- echo "$(<compliance_errors.txt )"
113- exit 1;
112+ export ZEPHYR_BASE="$(dirname "$(pwd)")/zephyr"
113+ if [[ ! -s "compliance.xml" ]]; then
114+ exit 1;
114115 fi
115116
116- - name : check-warns
117- working-directory : nrf-bm
118- run : |
119- for file in Codeowners.txt Devicetree.txt Gitlint.txt Identity.txt Nits.txt pylint.txt
120- do
121- if [[ -s $file ]]; then
122- errors=$(cat $file)
117+ files=($($ZEPHYR_BASE/scripts/ci/check_compliance.py -l))
118+ for file in "${files[@]}"; do
119+ f="${file}.txt"
120+ if [[ -s $f ]]; then
121+ errors=$(cat $f)
123122 errors="${errors//'%'/'%25'}"
124123 errors="${errors//$'\n'/'%0A'}"
125124 errors="${errors//$'\r'/'%0D'}"
126- echo "::error file=${file }::$errors"
125+ echo "::error file=${f }::$errors"
127126 exit=1
128127 fi
129128 done
130129
131- if [[ $ exit == 1 ] ]; then
132- exit 1
130+ if [ "${ exit}" == "1" ]; then
131+ exit 1;
133132 fi
0 commit comments