]> source.dussan.org Git - sonarqube.git/commitdiff
Added properties to ActiveRules in WS response
authorStephane Gamard <stephane.gamard@searchbox.com>
Tue, 13 May 2014 22:48:14 +0000 (00:48 +0200)
committerStephane Gamard <stephane.gamard@searchbox.com>
Tue, 13 May 2014 22:48:14 +0000 (00:48 +0200)
sonar-server/src/main/java/org/sonar/server/rule2/ws/SearchAction.java

index f0ed293c2bc190f1fa91feeeed25caea4386c51e..9863ec5fea72f4a9c6ce2426032231717a7a8d5e 100644 (file)
@@ -208,6 +208,7 @@ public class SearchAction implements RequestHandler {
     for (Rule rule : result.getHits()) {
       json.beginObject();
       json
+        .prop("id", rule.key().toString())
         .prop("repo", rule.key().repository())
         .prop("key", rule.key().rule())
         .prop("lang", rule.language())
@@ -238,7 +239,11 @@ public class SearchAction implements RequestHandler {
     for (ActiveRule activeRule : result.getActiveRules()) {
       json
         .beginObject()
+        .prop("id",activeRule.key().toString())
+        .prop("inherit", activeRule.inherit())
+        .prop("override", activeRule.override())
         .prop("severity", activeRule.severity())
+        .prop("parent", activeRule.parent())
         .name("params").beginArray();
       for (Map.Entry<String, String> param : activeRule.params().entrySet()) {
         json.beginObject()