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