diff --git a/pre-push b/pre-push new file mode 100755 index 0000000000000000000000000000000000000000..7acebc204b44b41c0409bd5abfb2cc3964dad8ec --- /dev/null +++ b/pre-push @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# Checks run before every push +# has to be copied to .git/hooks + +echo "Running pre-push hook" +echo "Running flake8 check" +flake8 --append-config=.flake8 src + +# $? stores exit value of the last command +if [ $? -ne 0 ]; then + echo "flake8 failed" + exit 1 +fi +