Add further checks to the pre-commit hook
This commit is contained in:
parent
32b421be82
commit
a7e443a8cb
1 changed files with 2 additions and 2 deletions
|
@ -20,8 +20,8 @@ git status -zu | while read -rd '' xy filename; do
|
|||
fi
|
||||
|
||||
if [[ $filename = *.sh ]] || is_a "$filename" bash; then
|
||||
if has shellcheck && ! shellcheck -s bash "$filename"; then
|
||||
exit 1
|
||||
if has shellcheck; then
|
||||
grep -vq "declare -p" "$filename" && shellcheck -s bash "$filename"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue