Setup Run ln -n pre-commit .git/hooks/pre-commit in project root to enable the pre-commit hook. Enable the Detekt plugin for Android Studio. Import the watchers.xml in Tools -> File Watchers in Android Studio, to get auto formatting on save.