diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-03-01 14:16:11 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-03-02 14:19:36 +0100 |
commit | 84bc220fc84aaa1bbf88fc5c29ff7db113aef711 (patch) | |
tree | fe31a7462fea1f2114d5ccb477fd64768e5719ee /sonar-ws | |
parent | 6e79f62bfb40e11fabbf35ffd468119eb0456396 (diff) | |
download | sonarqube-84bc220fc84aaa1bbf88fc5c29ff7db113aef711.tar.gz sonarqube-84bc220fc84aaa1bbf88fc5c29ff7db113aef711.zip |
SONAR-7329 Add type in Rules WS
Diffstat (limited to 'sonar-ws')
4 files changed, 15 insertions, 13 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/rule/RulesWsParameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/rule/RulesWsParameters.java index 384423b5beb..d636e7966e5 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/rule/RulesWsParameters.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/rule/RulesWsParameters.java @@ -35,6 +35,7 @@ public class RulesWsParameters { public static final String PARAM_DEBT_CHARACTERISTICS = "debt_characteristics"; public static final String PARAM_HAS_DEBT_CHARACTERISTIC = "has_debt_characteristic"; public static final String PARAM_TAGS = "tags"; + public static final String PARAM_TYPES = "types"; public static final String PARAM_INHERITANCE = "inheritance"; public static final String PARAM_ACTIVE_SEVERITIES = "active_severities"; public static final String PARAM_IS_TEMPLATE = "is_template"; diff --git a/sonar-ws/src/main/protobuf/ws-commons.proto b/sonar-ws/src/main/protobuf/ws-commons.proto index efd2fee3ca4..9a2b9ce836f 100644 --- a/sonar-ws/src/main/protobuf/ws-commons.proto +++ b/sonar-ws/src/main/protobuf/ws-commons.proto @@ -112,3 +112,15 @@ message Metric { optional string bestValue = 11; optional string worstValue = 12; } + +enum RuleType { + // Zero is required in order to not get MAINTAINABILITY as default value + // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/ + UNKNOWN = 0; + + // same name as in Java enum IssueType, + // same index values as in database (see column ISSUES.ISSUE_TYPE) + CODE_SMELL = 1; + BUG = 2; + VULNERABILITY = 3; +} diff --git a/sonar-ws/src/main/protobuf/ws-issues.proto b/sonar-ws/src/main/protobuf/ws-issues.proto index 077871bebe1..5459f84b684 100644 --- a/sonar-ws/src/main/protobuf/ws-issues.proto +++ b/sonar-ws/src/main/protobuf/ws-issues.proto @@ -54,18 +54,6 @@ message Operation { repeated ActionPlan actionPlans = 5; } -enum IssueType { - // Zero is required in order to not get MAINTAINABILITY as default value - // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/ - UNKNOWN = 0; - - // same name as in Java enum IssueType, - // same index values as in database (see column ISSUES.ISSUE_TYPE) - CODE_SMELL = 1; - BUG = 2; - VULNERABILITY = 3; -} - message Issue { optional string key = 1; optional string rule = 2; @@ -102,7 +90,7 @@ message Issue { optional string fUpdateAge = 25; optional string closeDate = 26; - optional IssueType type = 27; + optional sonarqube.ws.commons.RuleType type = 27; } message Transitions { diff --git a/sonar-ws/src/main/protobuf/ws-rules.proto b/sonar-ws/src/main/protobuf/ws-rules.proto index e377cf7b3c2..ce049c220bc 100644 --- a/sonar-ws/src/main/protobuf/ws-rules.proto +++ b/sonar-ws/src/main/protobuf/ws-rules.proto @@ -102,6 +102,7 @@ message Rule { optional string debtRemFnType = 34; optional string debtRemFnCoeff = 35; optional string debtRemFnOffset = 36; + optional sonarqube.ws.commons.RuleType type = 37; message Params { repeated Param params = 1; |