mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
static-tests: add shellcheck (but don't fail)
This commit is contained in:
parent
688b89ba40
commit
79301c623d
2
dist/tools/ci/static_tests.sh
vendored
2
dist/tools/ci/static_tests.sh
vendored
@ -22,6 +22,7 @@ DEPS["./dist/tools/coccinelle/check.sh"]="spatch"
|
||||
DEPS["./dist/tools/flake8/check.sh"]="python3 flake8"
|
||||
DEPS["./dist/tools/codespell/check.sh"]="codespell"
|
||||
DEPS["./dist/tools/uncrustify/uncrustify.sh"]="uncrustify"
|
||||
DEPS["./dist/tools/shellcheck/shellcheck.sh"]="shellcheck"
|
||||
|
||||
if ! command -v git 2>&1 1>/dev/null; then
|
||||
echo -n "Required command 'git' for all static tests not found in PATH "
|
||||
@ -120,5 +121,6 @@ if [ -z "${GITHUB_RUN_ID}" ]; then
|
||||
else
|
||||
run ./dist/tools/uncrustify/uncrustify.sh
|
||||
fi
|
||||
ERROR_EXIT_CODE=0 run ./dist/tools/shellcheck/check.sh
|
||||
|
||||
exit $RESULT
|
||||
|
12
dist/tools/shellcheck/check.sh
vendored
12
dist/tools/shellcheck/check.sh
vendored
@ -36,11 +36,17 @@ ${SHELLCHECK_CMD} --version &> /dev/null || {
|
||||
|
||||
ERRORS=$("${SHELLCHECK_CMD}" --format=gcc ${FILES})
|
||||
|
||||
EXIT_CODE=0
|
||||
|
||||
if [ -n "${ERRORS}" ]
|
||||
then
|
||||
printf "%s There are issues in the following shell scripts %s\n" "${CERROR}" "${CRESET}"
|
||||
printf "%s\n" "${ERRORS}"
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
if [ -z "${ERROR_EXIT_CODE}" ]; then
|
||||
EXIT_CODE=1
|
||||
else
|
||||
EXIT_CODE="${ERROR_EXIT_CODE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
exit "${EXIT_CODE}"
|
||||
|
Loading…
Reference in New Issue
Block a user