SonarLint在VSCode上缺少Java规则

问题描述 投票:0回答:1

我已经安装了SonarLintSonarQube support for Visual Studio Code以及Sonarqube

这是我的global.json

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

这是我的本地sonarlint.json

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

这是我的环境设置:

  1. sonarqube-7.8。
  2. java版本“ 1.8.0_201”。
  3. VSCode版本1.41.1。
  4. 已设置JAVA_HOME和JRE_HOME。

更新到SonarQube服务器的绑定效果很好。

a

更新所有对SonarQube / SonarCloud的绑定也可以正常工作。enter image description here

我的问题是:

SonarLint侧栏上缺少Java规则

enter image description here

  1. 如何在那里启用Java规则?

  2. VSCode可以与SonarQube Server一起执行什么样的任务?

  3. 完成所有安装和配置后,我什么都没看到吗?

Linter不起作用

enter image description here

对此有任何帮助,我们深表感谢。

java visual-studio-code sonarqube sonarlint linter
1个回答
0
投票

您好,已经从论坛上得到了回答,说还不支持Java。

“ SonarLint for VSCode暂时不支持Java项目。您可以在连接模式下立即分析PHP,Python,JS,TS,HTML和其他几种语言(Apex,PL / SQL等)。 ),但不是Java。我们已经开始与VSCode Java开发人员进行一些合作,以便可能解锁此功能,请继续关注。“

请参阅:https://jira.sonarsource.com/browse/SLVSCODE-35

答案来源:https://community.sonarsource.com/t/the-linter-for-java-rule-doesnt-exist-on-vscode/18383/2

© www.soinside.com 2019 - 2024. All rights reserved.