SonarQube 是否需要额外的 config/plugins 来理解 jacoco 报告

Does SonarQube need extra config/plugins to understand jacoco reports

我正在使用 SonarQube Version 6.7.3 (build 38370),但我的覆盖率报告不起作用(始终显示 0%)。我验证了 运行 ./mvnw clean verify install sonar:sonar -Dsonar.host.url=... 之后 jacoco.xml 文件是在 sonar-maven-plugin 的默认预期位置下创建的。该报告正确显示了 66% 代码覆盖率。

我看到我的 SonarQube 的 helm chart 安装了

plugins:
  install:
    - "https://github.com/stevespringett/dependency-check-sonar-plugin/releases/download/1.1.1/sonar-dependency-check-plugin-1.1.1.jar"

这让我觉得我需要安装一些额外的东西才能让 jacoco 工作。此外,在 this 页面中,据说

This plugin (provided by default with SonarQube 7.4+) allows you to load the JaCoCo data from its XML format for all the languages for which you can generate a JaCoCo report.

我的版本是 6.7.3。

是 - 导入 JaCoCo XML 报告需要 SonarQube JaCoCo Plugin

Page about plugin that you cite不仅包含

provided by default with SonarQube 7.4+

还有

JaCoCo 1.0.2 – Jun 28, 2019 – SonarQube 6.7+ (Compatible with LTS)

意味着该插件与从 6.7 开始的 SonarQube 版本兼容并从 7.4.

版本开始预安装

https://docs.sonarqube.org/6.7/InstallingaPlugin.html介绍如何安装插件: