Files
dockerfiles/shellcheck.sh
T
uleenucks f19b1f26cd
Build and push / build_and_push (map[name:vaultwarden-backup path:vaultwarden-backup]) (push) Failing after 4s
Build and push / build_and_push (map[name:metabase path:metabase]) (push) Failing after 5s
Build and push / check and test (push) Successful in 7s
Build and push / build_and_push (map[name:postgres-backup path:postgres-backup]) (push) Failing after 5s
Build and push / build_and_push (map[name:pyweb path:pyweb]) (push) Failing after 5s
Build and push / build_and_push (map[name:shellcheck path:shellcheck]) (push) Failing after 4s
fix: update shellcheck script to exclude Containerfile instead of Dockerfile
Signed-off-by: Uwe Hermann <uh@uleenucks.de>
2026-04-15 17:27:30 +02:00

25 lines
474 B
Bash
Executable File

#!/bin/bash
set -e
set -o pipefail
ERRORS=()
# find all executables and run `shellcheck`
for f in $(find . -type f -not -iwholename '*.git*' -not -name "Containerfile" | sort -u); do
if file "$f" | grep --quiet shell; then
{
shellcheck "$f" && echo "[OK]: sucessfully linted $f"
} || {
# add to errors
ERRORS+=("$f")
}
fi
done
if [ ${#ERRORS[@]} -eq 0 ]; then
echo "No errors, hooray"
else
echo "These files failed shellcheck: ${ERRORS[*]}"
exit 1
fi