fleetlint Policy for a fleet of repositories
v0.7
Getting started

lint/configured/java

A linter is configured

Implements lint/configured for java.

Severitywarning
Tiers1, 2
Stacksjava
Scopeeach
Kindoutcome
Sourcelibrary v0.4.0
Selected byfleetlint-recommended@v0.4.0

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)).

Sources


Generated by fleetlint docs from catalog v0.4.0.