Key Changes

Checkstyle 13.7.0, released on 2026-06-28, introduces several enhancements and crucial bug fixes, primarily focusing on code style enforcement and compatibility.

New Features:

  • Code Style Rules: A new property jdkVersion for UnusedLocalVariable allows specific handling of unused named pattern matching variables in pre-Java 22 code. OverloadMethodsDeclarationOrder gains a required property to enforce ordering of overloaded methods by increasing parameter count.
  • Javadoc Improvements: MissingJavadocMethodCheck and JavadocMethod now utilize the Abstract Syntax Tree (AST) of Javadoc, leading to more accurate and robust Javadoc analysis.

Bug Fixes:

  • OpenJDK Style Compliance: Numerous checks have been added or fixed to align with various sections of the OpenJDK Style Guide, including Constants, Wrapping Expressions, Modifiers, Class structure, Import statements, Order of Constructors, Class, Interface and Enum Names, Redundant Parenthesis, and Documentation Comments. This significantly improves adherence to OpenJDK standards.
  • JEP 512 Compact Source Files: A series of bugs related to JEP 512 (Compact Source Files) have been resolved. These fixes address false positives and incorrect behavior in checks like UnnecessarySemicolonAfterTypeMemberDeclarationCheck, DeclarationOrderCheck, AnnotationLocationCheck, RequireThisCheck, InvalidJavadocPositionCheck, and OuterTypeNumberCheck, ensuring correct analysis of compact source files.
  • Javadoc Parsing: Several Javadoc parsing errors, particularly involving @link labels with array initializers and formatted @value tags, have been corrected, enhancing the reliability of Javadoc checks.

For a complete list of changes, refer to the official release notes.

Impact for QA Teams

QA teams benefit from more precise code style enforcement, especially for Java projects following OpenJDK guidelines or utilizing JEP 512 compact source files. Improved Javadoc checks reduce false positives, streamlining code review and static analysis workflows. This update helps maintain higher code quality standards.

FAQ

  • Q: What is the main focus of Checkstyle 13.7.0?
    • A: The update primarily focuses on enhancing OpenJDK style compliance, improving Javadoc analysis, and fixing issues related to JEP 512 compact source files.
  • Q: How does this update affect projects using JEP 512?
    • A: It resolves several bugs that caused false positives and incorrect behavior in compact source files, ensuring more accurate static analysis for such projects.
  • Q: Are there new code style rules in this release?
    • A: Yes, new properties for UnusedLocalVariable and OverloadMethodsDeclarationOrder offer more granular control over code style enforcement.