Repository navigation
Fail the build on any checkstyle violation - #56
Merged
Merged
Conversation
- ImageDecoder: rename the kEnd/vStart locals to keyEnd/valueStart and pngZTxtChunk/pngITxtChunk to pngZtxtChunk/pngItxtChunk. - ImageDecoderTest: tRnsOn* test methods become trnsOn*. - HfTokenizerTest: drop the leading "a" from two test method names. - SmolVlmGeometryPlan: document the compact constructor, matching Qwen3VlGeometryPlan. Pure renames plus one Javadoc comment; no behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The checkstyle config reports at warning severity and Gradle's default maxWarnings is unlimited, so violations only printed [WARN] lines and check still passed. Set maxWarnings = 0 in the root subprojects block and in buildSrc so every violation fails check, the same as spotlessCheck. AGENTS.md and README.md document the policy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The zero-warning note in AGENTS.md forbade suppressions outright, although checkstyle.xml deliberately enables @SuppressWarnings, CHECKSTYLE.SUPPRESS comments and an optional checkstyle-suppressions.xml. Permit a targeted suppression where a name is genuinely externally constrained, with a comment saying why; raising maxWarnings stays forbidden. Also say that a buildSrc violation fails ./gradlew -p buildSrc check, which is separate from the root check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
checkstyle.xml reads the suppressions file from
${org.checkstyle.google.suppressionfilter.config}, defaulting to a relative
checkstyle-suppressions.xml, and neither build sets that property. A file
in config/checkstyle/, the repo root or a module directory therefore never
takes effect. Only the two mechanisms verified to work are listed:
@SuppressWarnings("checkstyle:<Check>") and the
CHECKSTYLE.SUPPRESS: <Check> for +N lines comment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Checkstyle reported violations at
warningseverity and Gradle's defaultmaxWarningsis unlimited, so violations only printed[WARN]lines andcheckstill passed. They were easy to miss, and new ones kept being added.Changes
37a8ed6): pure renames plus one Javadoc comment, no behavior change.ImageDecoder:kEnd/vStart→keyEnd/valueStart;pngZTxtChunk/pngITxtChunk→pngZtxtChunk/pngItxtChunk.ImageDecoderTest:tRnsOn…→trnsOn…(2 tests).HfTokenizerTest:aBundle…/aMalformed…→bundle…/malformed….SmolVlmGeometryPlan: Javadoc on the compact constructor (same wording asQwen3VlGeometryPlan).3a0ed3a):maxWarnings = 0in the rootsubprojectscheckstyle block and inbuildSrc/build.gradle.AGENTS.mdandREADME.mddocument the policy.Verification (local, macOS 26 / Apple Silicon, native libs staged)
checkstyleMain,checkstyleTest,checkstyleTestFixtures,:jmlx-models:checkstyleTierB,:jmlx-models:checkstyleExactBits) rerun from scratch: 0 violations across all reports../gradlew check: passes (vision 140, tokenizer 205, models 403, core 424 tests; 0 failures)../gradlew -p buildSrc check: passes.aBundleWithoutAnyTemplateSourceStillHasNoTemplates) makes:jmlx-tokenizer:checkfail with "Checkstyle rule violations were found".Interaction with #55: #55 already renames its three test methods, so it has no checkstyle violations and the two PRs don't overlap. Merge order doesn't matter.
🤖 Generated with Claude Code