Add pre-commit hook to repo
This commit is contained in:
parent
aa6f088a3e
commit
34ce3bf3f8
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
pushd $( git rev-parse --show-toplevel ) &>/dev/null
|
||||||
|
|
||||||
|
ex=0
|
||||||
|
|
||||||
|
# Linting
|
||||||
|
./lint
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
echo "Aborting commit due to linting errors."
|
||||||
|
ex=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
popd &>/dev/null
|
||||||
|
exit $ex
|
Loading…
Reference in New Issue