SonarLint can now analyze Java code in VSCode

I’m very happy to announce that the latest release of SonarLint for VSCode (1.15) is able to analyze your Java source files!

Install SonarLint from the VSCode marketplace (in addition to the Java Extension Pack), open a Java project (Maven, Gradle, …) and open a Java file to see diagnostics reported by SonarLint, on-the-fly.

You can benefit from all SonarLint features that are already there for other supported languages:

  • Enabling/disabling rules

  • Comprehensive issue description

  • If you are already using SonarQube or SonarCloud for your Java projects, then you can connect SonarLint to it (a.k.a. connected mode) to leverage the same rules and settings already applied on the project

This new feature has been made possible thanks to a nice collaboration with the Microsoft Java team, and especially Sheng Chen (@jdneo) who did the required changes on the VSCode Java extension side. Many thanks to him!

Enjoy, and feedback welcome on this same community forum!