【问题标题】:SonarQube Web Service API not displaying new_violationsSonarQube Web 服务 API 不显示 new_violations
【发布时间】:2014-08-24 17:05:01
【问题描述】:

我正在为 SonarQube 编写脚本。现在,我不知道如何从我的项目中获取新的违规指标。

这是我的网址:

http://localhost:9000/api/resources?resource=ATRT-TestManager-eclipse38-java7.group:parent&metrics=ncloc,classes,files,violations_density,class_complexity,comment_lines,comment_lines_density,new_violations,new_critical_violations,new_blocker_violations,blocker_violations,critical_violations,major_violations,minor_violations,functions,duplicated_blocks,duplicated_lines_density,open_issues,sqale_index&format=xml

在指标中,我指定了 new_violations 以及 new_critical_violations 和 new_blocker_violations,但是这三个不会在 xml 中弹出。所有其他指标都会弹出。有什么我必须添加的东西才能让它们出现,还是它们现在坏了?我正在使用 2 天前下载的最新 SonarQube。

【问题讨论】:

  • 你能故意注入一个新问题并启动一个新的 SonarQube 分析吗?我想你应该开始得到一些结果了。

标签: sonarqube


【解决方案1】:

您需要将 &includetrends=true 添加到 URL 的末尾,以便显示这些指标。

查看docs 了解更多信息。

【讨论】:

  • 不,还是什么都没有。
  • 哦,等等,这行得通:显然,“是”对于该参数也不是有效值。很奇怪。
猜你喜欢
  • 1970-01-01
  • 2016-12-06
  • 1970-01-01
  • 2021-03-20
  • 2015-12-03
  • 1970-01-01
  • 1970-01-01
  • 2015-12-11
  • 1970-01-01
相关资源
最近更新 更多