全部。 我使用sonarqube webapi / api / rules / show?key = squid:S4087&actives = true 来获取有关规则的详细信息。结果是json格式的数据,该字段表示规则是活动的还是不活动的。有人可以帮忙吗?我想知道规则是有效还是无效,还有其他方法吗?
ActiveAdmin.register User do
filter :user_email, :as => :string
end
答案 0 :(得分:0)
您可以使用以下内容:
api/rules/search?rule_key=squid:S4087&f=actives
结果是:
{
"total": 1,
"p": 1,
"ps": 100,
"rules": [
{
"key": "squid:S4087",
"type": "CODE_SMELL"
}
],
"actives": {
"squid:S4087": [
{
"qProfile": "AWWHfPzOrB_d62qUtqCX",
"inherit": "NONE",
"severity": "MINOR",
"params": [],
"createdAt": "2018-08-29T23:00:39+0200"
}
]
},
"qProfiles": {
"AWWHfPzOrB_d62qUtqCX": {
"name": "Sonar way",
"lang": "java",
"langName": "Java"
}
}
}