Skip to content

fix(ci): Fix CheckStyle indentation rule#71

Merged
ebouchut merged 3 commits into
devfrom
ci-fix-checkstyle-indentation-rule
Jul 7, 2026
Merged

fix(ci): Fix CheckStyle indentation rule#71
ebouchut merged 3 commits into
devfrom
ci-fix-checkstyle-indentation-rule

Conversation

@ebouchut

@ebouchut ebouchut commented Jul 7, 2026

Copy link
Copy Markdown
Owner

This PR tunes the Checkstyle ruleset so the lint report matches the project's coding conventions (mainly because IntelliJ (IDE) uses 4-space indentation whereas CheckStyle expects 2-space indentation.

Changes

It replaces the bundled google_checks.xml with a project ruleset, config/checkstyle/checkstyle.xml, adapted in two ways:

  • Indentation: 4-space basic indentation and 4-space line wrapping (the project's actual style), instead of Google's 2-space
  • CustomImportOrder: removed; import ordering is managed by the IDE (AvoidStarImport stays active)

The check stays advisory (report-only, continue-on-error), as decided in ADR-0011, which explicitly anticipated adopting a project ruleset.

The branch also carries two small README fixes (Podman install command on macOS, tbls description).

Issue

The Lint workflow reported 157 warnings on every run, drowning the real findings:

122 x Indentation (expected level should be 2), 12 x CustomImportOrder, and only ~23 genuinely actionable warnings (Javadoc completeness, star imports, line length).

Cause

The bundled google_checks.xml enforces the Google Java Style: 2-space indentation and Google's import grouping. This codebase follows the standard Java/IntelliJ conventions (4-space indentation, IDE-managed imports), so ~85% of the report was a ruleset/convention mismatch, not code problems.

Result

./mvnw checkstyle:checkstyle now reports 23 warnings instead of 157, all real signal:

Count Rule
7 MissingJavadocType
5 RequireEmptyLineBeforeBlockTagGroup
2 MissingJavadocMethod, AvoidStarImport, EmptyLineSeparator (each)
1 LineLength, JavadocParagraph, NonEmptyAtclauseDescription, JavadocTagContinuationIndentation, VariableDeclarationUsageDistance (each)

The ruleset is a copy of the google_checks.xml shipped with Checkstyle 9.3 (the default engine of maven-checkstyle-plugin 3.6.0), so CI and local runs behave identically; both adaptations are documented in the file header.

ebouchut added 3 commits July 7, 2026 15:47
The bundled google_checks.xml reported 157 warnings, about 85 percent of
which disagreed with the project's established conventions rather than
flagging real issues (122 warnings for 2-space indentation, 12 for Google
import order).

Adopt a project ruleset at config/checkstyle/checkstyle.xml, a copy of the
google_checks.xml bundled with Checkstyle 9.3 (the default engine of
maven-checkstyle-plugin 3.6.0) with two adaptations:

- Indentation: 4-space basic indentation and 4-space line wrapping, the
  project's actual convention
- CustomImportOrder: removed, import order is managed by the IDE

Point configLocation at the new file. The report stays advisory (ADR-0011);
it now shows 23 warnings, all genuine signal (Javadoc completeness, star
imports, line length), which makes a future switch to a blocking
checkstyle:check realistic. 157 => 23 warnings.
Copilot AI review requested due to automatic review settings July 7, 2026 14:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ebouchut ebouchut self-assigned this Jul 7, 2026
@ebouchut ebouchut added config ci Continuous Integration test labels Jul 7, 2026
@ebouchut ebouchut added this to the v0.9 - Code Freeze milestone Jul 7, 2026
@ebouchut ebouchut moved this to In Review in learn-dev-project Jul 7, 2026
@ebouchut ebouchut merged commit 3b77acd into dev Jul 7, 2026
4 checks passed
@ebouchut ebouchut deleted the ci-fix-checkstyle-indentation-rule branch July 7, 2026 14:19
@github-project-automation github-project-automation Bot moved this from In Review to Done in learn-dev-project Jul 7, 2026
@ebouchut ebouchut changed the title Fix CI checkstyle indentation rule ci: Fix CheckStyle indentation rule Jul 8, 2026
@ebouchut ebouchut changed the title ci: Fix CheckStyle indentation rule fix(ci): Fix CheckStyle indentation rule Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants