Files
tubestation/docs/code-quality/lint/linters/android-format.rst
Makoto Kato 37f1452148 Bug 1776804 - Update spotless information in firefox-source-docs. r=geckoview-reviewers,agi
"Google Java Format plug-in" link is broken now.

Also we should add spotless information to
https://firefox-source-docs.mozilla.org/code-quality/.

Differential Revision: https://phabricator.services.mozilla.com/D150440
2022-06-28 22:58:11 +00:00

29 lines
660 B
ReStructuredText

Spotless
========
`Spotless <https://github.com/diffplug/spotless>`__ is a pluggable formatter
for Gradle and Android.
In our current configuration, Spotless includes the
`Google Java Format plug-in <https://github.com/google/google-java-format>`__
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:
.. parsed-literal::
$ mach lint --linter android-format
Alternatively, omit the ``--linter android-format`` and run all configured linters, which will include
spotless.
Autofix
-------
The spotless linter provides a ``--fix`` option.