Created
December 20, 2020 19:00
-
-
Save iurysza/fc6d0b735089c573aa5b0ce8797ef548 to your computer and use it in GitHub Desktop.
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