Created
October 13, 2023 15:59
-
-
Save grndvl1/6057d1b12ab91a5e2b5c72a43ad193fb to your computer and use it in GitHub Desktop.
Pre-Commit File for Android Studio KTLint Check
This file contains hidden or 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 "Validating code format" | |
./gradlew app:ktlintCheck --daemon | |
STATUS=$? | |
# Exit with an error if the linter didn't pass | |
[ $STATUS -ne 0 ] && exit 1 | |
exit 0 | |
# Add this file to your .git/hooks directory and make sure it has execute perms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment