Spotless is a pluggable formatter for Gradle and Android.

In our current configuration, Spotless includes the Google Java Format plug-in which formats all our Java code using the Google Java coding style guidelines.

Run Locally

The mozlint integration of spotless can be run using mach:

$ mach lint --linter android-format

Alternatively, omit the --linter android-format and run all configured linters, which will include spotless.


The spotless linter provides a --fix option.