diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-02-07 16:02:18 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-02-07 16:02:28 +0100 |
commit | 3d8d06e4dda4d2c6ad9da65b323ccf67d8e76b4f (patch) | |
tree | 4db86731cba21a2567c359fe1ff83271c6446d52 /sonar-ws-client | |
parent | b7537d53412142416cfc314d3acf0e2b85dad0fe (diff) | |
download | sonarqube-3d8d06e4dda4d2c6ad9da65b323ccf67d8e76b4f.tar.gz sonarqube-3d8d06e4dda4d2c6ad9da65b323ccf67d8e76b4f.zip |
Add a parameter 'hideRules' on the Issues search search in order to not return rules
Diffstat (limited to 'sonar-ws-client')
-rw-r--r-- | sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java | 8 | ||||
-rw-r--r-- | sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java index 23f200f6053..affb381ea8a 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java @@ -102,6 +102,14 @@ public class IssueQuery { } /** + * @since 4.2 + */ + public IssueQuery hideRules(Boolean hideRules) { + params.put("hideRules", hideRules); + return this; + } + + /** * Require second precision. * @since 3.7 */ diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java index 14b352d5eae..2ebd1aa6e06 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java @@ -46,6 +46,7 @@ public class IssueQueryTest { .componentRoots("struts") .resolutions("FIXED", "FALSE-POSITIVE") .resolved(true) + .hideRules(true) .rules("squid:AvoidCycle") .actionPlans("ABC") .statuses("OPEN", "CLOSED") @@ -59,7 +60,7 @@ public class IssueQueryTest { .pageSize(5) .pageIndex(4); - assertThat(query.urlParams()).hasSize(20); + assertThat(query.urlParams()).hasSize(21); assertThat(query.urlParams()).includes(entry("issues", "ABCDE,FGHIJ")); assertThat(query.urlParams()).includes(entry("assignees", "arthur,perceval")); assertThat(query.urlParams()).includes(entry("assigned", true)); @@ -70,6 +71,7 @@ public class IssueQueryTest { assertThat(query.urlParams()).includes(entry("actionPlans", "ABC")); assertThat(query.urlParams()).includes(entry("resolutions", "FIXED,FALSE-POSITIVE")); assertThat(query.urlParams()).includes(entry("resolved", true)); + assertThat(query.urlParams()).includes(entry("hideRules", true)); assertThat(query.urlParams()).includes(entry("statuses", "OPEN,CLOSED")); assertThat(query.urlParams()).includes(entry("severities", "BLOCKER,INFO")); assertThat(query.urlParams()).includes(entry("reporters", "login1,login2")); |