Runs static analysis before every commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Running git pre-commit hook" | |
./gradlew ktlintCi | |
./gradlew detektCi | |
RESULT=$? | |
# return 1 exit code if running checks fails | |
[[ ${RESULT} -ne 0 ]] && exit 1 | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment