github checkstyle/checkstyle checkstyle-14.4.0

4 hours ago

Checkstyle 14.4.0 - https://checkstyle.org/releasenotes.html#Release_14.4.0

New:

#21890 - New property for JavadocUtilizingTrailingSpace validateOnlyJoinableLines to report a line only when the whole next line fits on it.
#20970 - JavadocLeadingAsteriskAlign: Add indentation property.
#12226 - LeftCurly: new option nl_or_singleline to allow single-line blocks in otherwise Allman-style code.
#21813 - New property for JavadocUtilizingTrailingSpace ignoreTooShortPattern to allow skip utilization if line ends with punctuation symbol.
#18437 - EmptyLineSeparatorCheck does not report violations when more than one empty line appears with enum constants.
#20496 - New check: RedundantModifierCompactSource.
#18571 - Google-style: New Check BlockCommentEndPositionCheck.
#21359 - New Check: FinalPatternVariable for Enforcing Final Pattern Variables.
#18971 - New Check NoCauseGetMessageInExceptionConstructor: to not use caught exception message in wrapper exception constructor.
#20595 - new Check: ClassHeaderWrapOpenjdk.
#20638 - new Check: OpenjdkMethodParameterAlignmentCheck.
#21802 - New Check ExceptionThrowShouldUseContext: Exception wrapping should always use context variables.
#7895 - new Check: RedundantThis.
#5313 - New Check: EmptyLineWrappingInBlock.
#16748 - New check JavadocUtilizingTrailingSpace: Javadoc comments check to enforce compact content to full usage of line length.

Bug fixes:

#21941 - escape line breaks in property keys echoed in violation messages.
#20266 - RedundantModifierCheck: redundant public modifier on top-level method not flagged in compact source files (JEP 512).
#21828 - UnnecessaryNullCheckWithInstanceOf: false positive when variable is dereferenced inside arithmetic or comparison sub-expression.
#22058 - False Positive: AvoidNoArgumentSuperConstructorCall reports super() when statements precede it in constructor (Flexible Constructor Bodies).
#22173 - MethodCountCheck does not clear counters on beginTree.
#21816 - Add checks for Sun Style [8.2 - Blank Spaces].
#22153 - NoCauseGetMessageInExceptionConstructorCheck does not clear catchScopes state on beginTree.
#22092 - VariableDeclarationUsageDistance: NullPointerException on method in enum, record or interface.
#21761 - EmptyLineSeparator: false positive duplicate violation when multiple enum constants share a line.
#22045 - DescendantToken: StackOverflowError on deeply nested string concatenation.
#21694 - add OpenjdkMethodParameterAlignment check in openjdk_checks.xml.
#21952 - CLI exits with code 0 when the number of errors is a multiple of 256.
#21864 - malformed unicode escape in UniqueProperties.
#21883 - UnnecessaryNullCheckWithInstanceOf: NullPointerException when Boolean variable is used as condition in logical AND expression.
#21908 - fix NullPointerException and memory leak in RedundantThis.
#15193 - Conflict in Indentation Check Between if Parentheses and Record Pattern Parentheses.
#21600 - EmptyLineSeparator with allowMultipleEmptyLines as false does not report a violation if there is Javadoc then an annotation before a method.
#18590 - False Negative in EmptyStatement Check.
#21785 - Add checks for Sun Style [7.5 - for Statements].
#21755 - MissingJavadocMethod: false-positive on getters containing block comments when allowMissingPropertyJavadoc is enabled.
#5353 - RequireThisCheck: false positive in anonymous class with same name as field in top level class.
#21721 - SarifLogger: artifactLocation.uri is not properly encoded for file names containing '#', '?', or '%'.
#21519 - RegexpSinglelineJava hangs on a suppressed zero-width match.
#4225 - FinalLocalVariable: "throw" false negative.
#21751 - RequireThis: false negative for a field shadowed by a resource in finally.
#20811 - Update Coverage for Sun's Java Style.

Other Changes:
Improve Input coverage for compact sources (JEP 512) for all Checks.
Migrate XpathRegression tests to verifyXpathWithInlineConfigParser and remove suppressions.
Enforce beginTree method for all FileStatefulCheck checks.
Update tests to use embedded configs instead of old style verify.
Dependency bump Saxson-He 13.1.
Update XdocsPagesTest#validateExampleSectionSeparation to allow few code stippets for one example.
Action 'Remove awaiting labels on PR activity' should not be run on PR checklist.
CyclomaticComplexityCheck does not clear valueStack and currentValue on beginTree.
Move violation comments above of annotated methods.
ImportControl documentation TOC is all "Default Configuraiton".
Fix modules suppressed from the default-config example test.
GitHub action that removes label "awaiting response" if some comment or code changes happened.
Fix examples with duplicate violation behavior.
violationBetweenAnnotationAndMethod and violationBetweenJavadocAndMethod miss comments that land outside MODIFIERS.
Make RegexpMultiline examples behaviorally unique.
Replace multi-line string concatenations with text blocks for better readability.
Create Archunit validation to catch statefull Check without beginTree method.
Enforce file size on Java inputs.
Fix blocking CI by resolving JavadocUtilizingTrailingSpace violations in FinalPatternVariableCheck.
Move violation comments out of Javadoc for all input files.
Add `AGENTS.md` with build, test and contribution guidance for AI coding agents.
Fix violation message comments to use quoted text and remove associated suppressions.
Move Sun ITs to single test class per chapter.
Resolve ArchUnit suppressions.
Forbid and remove usages of System.setProperty in tests that operates with custom properties.
builds are not stable due to failure to downlaod apache-maven-X.XX.X-bin.zip.
Retry execution of pitest failure if groovy failing to download maven.
Update all GitHub workflows to have persist-credentials.
Create new GitHub workflow to fail if pitest suppression is a extended.
Define violation messages for all violations.
Fix blocking CI by resolving JavadocUtilizingTrailingSpace violations in OpenjdkMethodParameterAlignmentCheck.
Remove reference to closed issue in Limitations.
RedundantThis: extend tests.
warning during maven-shade-plugin:shade execution.
Discord link in README is expired.
Xpath Suppressions test should use inlined config.
Pin third-party GitHub Actions to commit SHAs.
Error in bash method does not stop execution of whole command.
Landing page: fix typo in JRE and JDK section.
Resolve all violation reported by PreferCodeOrSnippetJavadocInlineTag.
Add checks for Sun Style [7.4 - if, if-else, if else-if else Statements].
Diff Report generation failed 'Diff Regression patch config'.

Don't miss a new checkstyle release

NewReleases is sending notifications on new releases.