1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-10 22:14:35 +00:00

fix: ensuring pre-commit fails when sasjs lint fails

This commit is contained in:
Allan Bowe
2022-03-11 21:24:34 +00:00
parent 7e7ab4275d
commit 23dbda302e

View File

@@ -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`