Our code is automatically formatted, and it is mandatory. The plugin that does this is called spotless. To never have to deal with this, set up a git pre-commit hook, this will add 5-20 seconds to git commit commands.

Put this in .git/hooks/pre-commit and set the executable bit:

    #!/bin/sh
    set -e
    ./gradlew -PdisableSpotlessCheck spotlessApply




  • No labels