Skip to content

Instantly share code, notes, and snippets.

@Barros9
Created April 30, 2022 13:11
Show Gist options
  • Save Barros9/96d71226328509bf0bd24d77082e2a2d to your computer and use it in GitHub Desktop.
Save Barros9/96d71226328509bf0bd24d77082e2a2d to your computer and use it in GitHub Desktop.
Git hook pre commit ktlintCheck
#!/bin/bash
echo "Git hook pre commit ktlintCheck"
cd mobile-and || return
./gradlew app:ktlintCheck --daemon
STATUS=$?
# return 1 exit code if running checks fails
[ $STATUS -ne 0 ] && exit 1
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment