lint/configured/java
A linter is configured
Implements lint/configured for java.
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | java |
| Scope | each |
| Kind | outcome |
| Source | library v0.3.1 |
| Selected by | fleetlint-recommended@v0.3.1 |
Requirement
A static analyzer beyond the compiler is wired into the build (pom.xml, build.gradle(.kts), a parent build or a convention plugin): Checkstyle, Error Prone, SpotBugs or PMD. Another analyzer is added with accept:.
Why
javac accepts swallowed exceptions, star imports and 400-line methods; the analyzer is where they are refused.
Fix
Add the maven-checkstyle-plugin (or Gradle’s checkstyle plugin) with configLocation config/checkstyle/checkstyle.xml; fleetlint fix --apply writes the configuration, the plugin is added by hand.
Agent instruction: Add config/checkstyle/checkstyle.xml from the template and wire maven-checkstyle-plugin in pom.xml (or the checkstyle plugin in build.gradle.kts) with that configLocation and failOnViolation true; fix what it reports.
fleetlint fix can apply this rule’s fix automatically (1 action(s)).
See: https://fleetlint.org/baseline/#static-analysis, https://fleetlint.org/stacks/#java
Generated by fleetlint docs from catalog v0.3.1.