fix(ci): Fix CheckStyle indentation rule#71
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.xmlwith 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-spaceCustomImportOrder: removed; import ordering is managed by the IDE (AvoidStarImportstays 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,
tblsdescription).Issue
The Lint workflow reported 157 warnings on every run, drowning the real findings:
Cause
Result
./mvnw checkstyle:checkstylenow reports 23 warnings instead of 157, all real signal:MissingJavadocTypeRequireEmptyLineBeforeBlockTagGroupMissingJavadocMethod,AvoidStarImport,EmptyLineSeparator(each)LineLength,JavadocParagraph,NonEmptyAtclauseDescription,JavadocTagContinuationIndentation,VariableDeclarationUsageDistance(each)The ruleset is a copy of the
google_checks.xmlshipped 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.