format/configured/java
A formatter is configured
Implements format/configured for java.
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | java |
| Scope | each |
| Kind | outcome |
| Source | library v0.4.0 |
| Selected by | fleetlint-recommended@v0.4.0 |
Requirement
A formatter is wired into the build (this build, a parent build or a convention plugin): Spotless, google-java-format, Palantir Java Format or fmt-maven-plugin, or one runs in a hook, the task runner or CI. Another formatter is added with accept:.
Why
Without one formatter every editor reformats differently and diffs fill with whitespace churn that hides the real change.
Fix
Add Spotless with google-java-format (or Palantir) to the build and run spotless:check in the hooks.
Agent instruction: Add the Spotless plugin with googleJavaFormat() to the build, spotless:check to the lint target and a hook; reformat in a separate commit.
Sources
- https://fleetlint.org/baseline/#static-analysis (convention)
- https://github.com/google/google-java-format (spec)
- https://github.com/diffplug/spotless (spec)
- https://fleetlint.org/stacks/#java
Generated by fleetlint docs from catalog v0.4.0.