如何将结果导出为PDF报告?

18

我正在使用SonarQube 5.6.3。如何创建SonarQube分析详细报告作为PDF表单、Excel报告或HTML格式报告?

似乎没有可用的插件来做到这一点。

我无法使用以下配置生成html文件:

sonar.issuesReport.html.enable = true
sonar.issuesReport.html.location = c:\
sonar.issuesReport.html.name = sample

我该如何从SonarQube导出这些详细信息?

6个回答

5

对于 sonar-maven-plugin 插件,操作方式相同。只需将以下两个属性添加到 pom 文件中:

<project xmlns="...>
     ...
    <properties>
         <sonar.analysis.mode>preview</sonar.analysis.mode>
         <sonar.issuesReport.html.enable>true</sonar.issuesReport.html.enable>
    </properties>
    ...
</project>

结果将保存在 target/sonar 文件夹中。


5
这对于Community Edition版本7.5仍然有效吗? - OPTIMUS

4

2
是的,我看到了这个Simon。我知道这个。 但是至少没有生成非商业插件或HTML报告 :( - Vijay
当我进入updatecenter/available页面时,我发现无法安装插件? - isaac weathers
Governance插件目前仅支持长期支持版本(5.6.x)。在接下来的几周内,将发布新版本以支持下一个LTS版本(6.7)。 - Simon Brandhof
有没有计划支持Microsoft的Power BI? https://powerbi.microsoft.com/zh-cn/ - isaac weathers
这个问题值得独立提出来。但是您可以尝试导入SonarQube Web API的OK JSON报告(https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-data-sources/)。 - Simon Brandhof

3
要导出结果,您需要使用 SonarQube 的付费版本。该功能不适用于免费版本的 SonarQube。

0

0

-1

要获取HTML报告,请将以下属性添加到您的sonar.properties文件中

sonar.analysis.mode=preview 
sonar.issuesReport.html.enable=true

仅通过这些参数报告就能生成了吗?还是您也尝试了以下参数:sonar.issuesReport.html.location = c:\sonar.issuesReport.html.name = sample请确认一下使用的SonarQube版本(我的是SonarQube-5.6.3)。我已经尝试了所有的参数(如上所述),但无法生成报告! - Vijay
是的,我得到了HTML报告(问题报告)。我尝试过SonarQube 6.1。我没有尝试过存储这些报告的位置。 - Mounika
1
不建议在最近的版本中使用这些选项。 - begarco
插件已经过时。https://docs.sonarqube.org/display/PLUG/Issues+Report+Plugin - Der_Meister

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接