diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit index 3d00ad3..6e431bf 100755 --- a/.git-hooks/pre-commit +++ b/.git-hooks/pre-commit @@ -1,5 +1,12 @@ #!/bin/bash -sasjs lint + +# Ensure lint is passing +LINT=`sasjs lint` +if [[ "$LINT" != "✔ All matched files use @sasjs/lint code style!" ]]; then + echo "$LINT" + echo "To commit in spite of these warnings, use the -n parameter." + exit 1 +fi # Avoid commits to the master branch BRANCH=`git rev-parse --abbrev-ref HEAD`