From fbeac63e349cb2dcd0f840c31dd51342400ff5d8 Mon Sep 17 00:00:00 2001 From: damcav35 <51324122+damcav35@users.noreply.github.com> Date: Wed, 30 Jul 2025 15:03:29 +0200 Subject: [PATCH] fix: shellcheck precommit (#276) Co-authored-by: damien cavagnini --- hooks/shellcheck.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hooks/shellcheck.sh b/hooks/shellcheck.sh index 1710077..4194551 100755 --- a/hooks/shellcheck.sh +++ b/hooks/shellcheck.sh @@ -1,7 +1,14 @@ #!/bin/bash +issues=0 + for script in "$@"; do /usr/bin/shellcheck --exclude=SC2317 --color=always --shell=bash -x --source-path=SCRIPTDIR "$script" + [ $? -eq 0 ] || issues=$(($issues + 1)) done -exit 0 +if [ "$issues" -gt 0 ]; then + exit 1 +else + exit 0 +fi