2020-11-06 21:13:13 -05:00
|
|
|
#!/usr/bin/env bash
|
2021-11-06 03:04:14 -04:00
|
|
|
|
2020-11-06 21:13:13 -05:00
|
|
|
if ! which flake8 &>/dev/null; then
|
|
|
|
echo "Flake8 is required to lint this project"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-11-06 03:16:02 -04:00
|
|
|
pushd $( git rev-parse --show-toplevel ) &>/dev/null
|
|
|
|
|
2021-11-06 13:35:30 -04:00
|
|
|
echo ">>> Linting..."
|
2021-11-06 02:55:37 -04:00
|
|
|
flake8
|
2020-11-07 15:15:21 -05:00
|
|
|
ret=$?
|
|
|
|
if [[ $ret -eq 0 ]]; then
|
|
|
|
echo "No linting issues found!"
|
|
|
|
fi
|
2021-11-06 03:16:02 -04:00
|
|
|
|
|
|
|
popd &>/dev/null
|
2020-11-07 15:15:21 -05:00
|
|
|
exit $ret
|