简体   繁体   English

Gerrit发表Sonarqube报告

[英]Post Sonarqube report in gerrit

after performing Sonarqube analysis I get sonar-report.json. 执行Sonarqube分析后,我得到了sonar-report.json。 To post this in gerrit comment I use Sonar Gerrit Plugin. 要将其发布在gerrit评论中,我使用Sonar Gerrit插件。 In jenkins logs there is an information: -Report has loaded and contains 15 issues -Issues to be commented: 0 在jenkins日志中,有一个信息:-报告已加载并包含15个问题-要注释的问题:0

My question is why no issues are commented to gerrit? 我的问题是为什么对Gerrit没有任何评论? Plugin configuration is default so severity level is lowest. 插件配置是默认设置,因此严重性级别最低。 I think all issues should be mentioned in gerit comment. 我认为所有问题都应在Gerit评论中提及。

Check the following Sonar-Gerrit plugin options at Post-build Actions > SonarQube Settings > Gerrit Settings... > Review Settings 构建后操作 > SonarQube设置 > Gerrit设置... > 检查设置中检查以下Sonar-Gerrit插件选项

  • Report new issues only? 仅报告新问题?

    Only new SonarQube issues to be commented in Gerrit when checked. 选中后,只有新的SonarQube问题要在Gerrit中进行评论。 Modified files to be commented with all corresponding issues when unchecked. 取消选中后,将注释已修改的文件以及所有相应的问题。

  • Affect changed lines only 仅影响更改的行

    Only changed in current commit lines to be commented by Gerrit when checked. 只有在当前提交行中进行了更改,Gerrit才会在选中时对其进行注释。 Modified files to be commented with all issues if this control unchecked. 如果未选中此控件,则将注释所有问题的已修改文件。

If your project has flat structure (no submodules), ensure "Project base directory" setting is empty. 如果您的项目具有扁平结构(没有子模块),请确保“项目基本目录”设置为空。 On the contrary, if your project contains submodules, try out "Allow auto match" or configure "Project base directory" for each of the submodules. 相反,如果您的项目包含子模块,请为每个子模块尝试“允许自动匹配”或配置“项目基本目录”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM