Sonarqube 如何通过API检索Sonar中特定规则的违规次数?
我想使用SonarQube web服务API检索项目中给定规则的违规次数 浏览时,除了Sonarqube 如何通过API检索Sonar中特定规则的违规次数?,sonarqube,Sonarqube,我想使用SonarQube web服务API检索项目中给定规则的违规次数 浏览时,除了规则参数外,资源API似乎是答案 使用URL,例如http://mysonar:9000/api/resources?resource=1&rules=true或http://mysonar:9000/api/resources?resource=1&rules=checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.IllegalCatchCheck,
规则
参数外,资源
API似乎是答案
使用URL,例如http://mysonar:9000/api/resources?resource=1&rules=true
或http://mysonar:9000/api/resources?resource=1&rules=checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.IllegalCatchCheck
,我得到以下XML:
<resources>
<resource>
<id>1</id>
<key>foo:bar</key>
<name>Foo</name>
<lname>Foo</lname>
<scope>PRJ</scope>
<qualifier>TRK</qualifier>
<version>1.0-SNAPSHOT</version>
<date>2014-05-26T15:42:14+0200</date>
<creationDate>2014-05-26T15:42:14+0200</creationDate>
</resource>
</resources>
1.
福:酒吧
福
福
PRJ
TRK
1.0-快照
2014-05-26T15:42:14+0200
2014-05-26T15:42:14+0200
那么,我如何检索此类信息呢?多亏了声纳支持团队,我找到了解决方案。
规则
参数仅在度量
参数设置为违规行为的特定严重性时有效,例如严重违规
: