Background
Checkstyle is configured in pom.xml with failsOnError=false and failOnViolation=false, and the CI job runs mvn checkstyle:check with continue-on-error: true (.github/workflows/ci.yml). The Checkstyle step can therefore never fail the build or the pipeline — the check is decorative.
Impact
- Code style violations are never surfaced to developers or blocked at merge time.
- The README advertises Checkstyle as part of the "automated code quality" story, which is misleading.
- Style drift accumulates over time; Spotless only enforces formatting, not style rules.
How to reproduce
- Introduce a Checkstyle violation (e.g. a line exceeding the configured limit or a missing Javadoc where required).
- Run
mvn checkstyle:check — violations are reported but the build exits 0.
- Push to a branch — the
code-quality CI job reports Checkstyle failures with continue-on-error and still passes.
Where the fix should land
Decide on an enforcement policy, then:
- Set
failsOnError=true and failOnViolation=true in pom.xml and fix the violations that surface.
- Remove
continue-on-error: true from the Checkstyle step in .github/workflows/ci.yml.
- Consider adding a checked-in
checkstyle.xml (currently none exists; the plugin falls back to google_checks.xml) if stricter rules are desired.
Files touched
pom.xml
.github/workflows/ci.yml
checkstyle.xml (new, optional)
Acceptance criteria
Background
Checkstyle is configured in
pom.xmlwithfailsOnError=falseandfailOnViolation=false, and the CI job runsmvn checkstyle:checkwithcontinue-on-error: true(.github/workflows/ci.yml). The Checkstyle step can therefore never fail the build or the pipeline — the check is decorative.Impact
How to reproduce
mvn checkstyle:check— violations are reported but the build exits 0.code-qualityCI job reports Checkstyle failures withcontinue-on-errorand still passes.Where the fix should land
Decide on an enforcement policy, then:
failsOnError=trueandfailOnViolation=trueinpom.xmland fix the violations that surface.continue-on-error: truefrom the Checkstyle step in.github/workflows/ci.yml.checkstyle.xml(currently none exists; the plugin falls back togoogle_checks.xml) if stricter rules are desired.Files touched
pom.xml.github/workflows/ci.ymlcheckstyle.xml(new, optional)Acceptance criteria
mvn checkstyle:checkexits non-zero on a deliberately introduced violation.code-qualityjob fails when Checkstyle reports violations.mvn testis green.