2020-11-07 15:32:56 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
pushd $( git rev-parse --show-toplevel ) &>/dev/null
|
|
|
|
|
|
|
|
ex=0
|
|
|
|
|
2021-11-06 13:34:33 -04:00
|
|
|
./format check
|
2020-11-07 15:32:56 -05:00
|
|
|
if [[ $? -ne 0 ]]; then
|
2021-11-06 13:34:33 -04:00
|
|
|
./format
|
|
|
|
echo "Black formatting change detected; review and recommit"
|
|
|
|
ex=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
./lint
|
|
|
|
if [[ $? -ne 0 ]]; then
|
|
|
|
echo "Linting error detected; correct and recommit"
|
2020-11-07 15:32:56 -05:00
|
|
|
ex=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo
|
|
|
|
popd &>/dev/null
|
|
|
|
exit $ex
|