Sonar Analyzes Java 23 + New Rules for Java 22

Dear Java Developers,

We’re happy to announce that SonarQube now offers support for Java versions up to Java 23, allowing early adopters to analyze their code with confidence, especially those planning to upgrade to the upcoming Java 25 LTS.

Building on this, we’ve introduced new rules specifically designed for Java 22 features and refined existing rules for better compatibility.

New Java 22 Rules:

  • S7466: Employ the "var" identifier for unnamed variable declarations.
  • S7467: Utilize the unnamed variable pattern for unused exception parameters.
  • S7475: Omit types of unused record components in pattern matching.

These rules are available today on SonarQube Cloud, and will be available in SonarQube Server 2025.3.

For those already working with Java 24 or exploring Java 25, we encourage you to share your feedback on which new Java features you’d like us to support in the future.

Jean

1 Like