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