The linter for Java rule doesn't exist on VSCode

I have installed SonarLint, SonarQube support for Visual Studio Code, and also Sonarqube.

Here is my global.json

{
    "$schema": "https://raw.githubusercontent.com/silverbulleters/sonarqube-inject-vsc/master/schemas/global.json",
    "servers": [
        {
            "id": "localhost",
            "url": "http://localhost:9000/",
            "token": "28636f8b1a718c765b827d32bcafb7df3e44930b"
        }
    ]
}

And here is my local sonarlint.json

{
    "$schema": "https://raw.githubusercontent.com/silverbulleters/sonarqube-inject-vsc/master/schemas/sonarlint.json",
    "serverId": "localhost",
    "projectKey": "springmvc"
}

Here is my env settings:

  1. sonarqube-7.8.
  2. java version “1.8.0_201”.
  3. VSCode version 1.41.1.
  4. JAVA_HOME and JRE_HOME are set.

Questions:

  1. How to have Java Rules enabled there?
  2. What kind tasks VSCode Sonarlint can do together with the SonarQube Server?
  3. After all of the installation and configuration I see that nothing is happened?

I also put question in here https://stackoverflow.com/questions/59623508/sonarlint-missing-java-rule-on-vscode

thanks

Hi @yoesoff

SonarLint for VSCode doesn’t support Java projects for the time being. You can analyze PHP, Python, JS, TS, HTML out of the box, and a few more languages in connected mode (Apex, PL/SQL, …) but not Java.
We have started some collaboration with VSCode Java developers in order to possibly unlock this feature, so stay tuned.

See:
https://jira.sonarsource.com/browse/SLVSCODE-35

1 Like

The connected mode will use same analyzers version and rule configuration than the project you are binding to on the SonarQube server. It will also mute issues that are muted on the server (issues marked as false positive/won’t fix), and apply issue/file exclusions configured in the project administration.

Hi Julien Henry, thanks for the answer, of course I will wait this feature :slight_smile: