ci/shellcheck: Don't exit on first failure

It's really tedious having to run shellcheck in a loop to find every
failure; go through them all and print them all at once.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
This commit is contained in:
Daniel Stone
2024-10-17 13:45:11 +01:00
parent 80d3ee3c78
commit 2bac04aa4b

View File

@@ -9,15 +9,14 @@ is_bash() {
return 1
}
anyfailed=0
while IFS= read -r -d $'' file; do
if is_bash "$file" ; then
shellcheck -x -W0 -s bash "$file"
rc=$?
if [ "${rc}" -eq 0 ]
then
continue
else
exit 1
if ! shellcheck -x -W0 -s bash "$file"; then
anyfailed=1
fi
fi
done < <(find "$SCRIPTS_DIR" -type f \! -path "./.git/*" -print0)
exit "$anyfailed"