aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws/src
diff options
context:
space:
mode:
authorJacek Poreda <jacek.poreda@sonarsource.com>2023-08-10 10:33:25 +0200
committersonartech <sonartech@sonarsource.com>2023-08-18 20:02:49 +0000
commit177da8d8b082ad4688524d8f3ecea9bee624d09b (patch)
tree0923e3ac529b086de0f9d42c0e8f3129e5c6e079 /sonar-ws/src
parent2b456da715b2650a1519a4d273119b01388396df (diff)
downloadsonarqube-177da8d8b082ad4688524d8f3ecea9bee624d09b.tar.gz
sonarqube-177da8d8b082ad4688524d8f3ecea9bee624d09b.zip
SONAR-20021 Update Issues web apis with Clean Code Taxonomy
Diffstat (limited to 'sonar-ws/src')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java6
-rw-r--r--sonar-ws/src/main/protobuf/ws-commons.proto41
-rw-r--r--sonar-ws/src/main/protobuf/ws-issues.proto6
3 files changed, 49 insertions, 4 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java
index 176b205b349..3adaa21805b 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesWsParameters.java
@@ -54,10 +54,8 @@ public class IssuesWsParameters {
public static final String PARAM_TYPE = "type";
public static final String PARAM_ISSUES = "issues";
public static final String PARAM_SEVERITIES = "severities";
- public static final String PARAM_SOFTWARE_QUALITIES = "softwareQualities";
-
- //TODO: To be discussed for the naming
- public static final String PARAM_SOFTWARE_QUALITIES_SEVERTIIES = "softwareQualitiesSeverities";
+ public static final String PARAM_IMPACT_SOFTWARE_QUALITIES = "impactSoftwareQualities";
+ public static final String PARAM_IMPACT_SEVERITIES = "impactSeverities";
public static final String PARAM_CLEAN_CODE_ATTRIBUTE_CATEGORIES = "cleanCodeAttributeCategories";
public static final String PARAM_STATUSES = "statuses";
public static final String PARAM_RESOLUTIONS = "resolutions";
diff --git a/sonar-ws/src/main/protobuf/ws-commons.proto b/sonar-ws/src/main/protobuf/ws-commons.proto
index a8ba062db9e..2c542834c10 100644
--- a/sonar-ws/src/main/protobuf/ws-commons.proto
+++ b/sonar-ws/src/main/protobuf/ws-commons.proto
@@ -78,6 +78,47 @@ enum RuleScope {
ALL = 2;
}
+enum CleanCodeAttribute {
+ CONVENTIONAL = 0;
+ FORMATTED = 1;
+ IDENTIFIABLE = 2;
+ CLEAR = 3;
+ COMPLETE = 4;
+ EFFICIENT = 5;
+ LOGICAL = 6;
+ DISTINCT = 7;
+ FOCUSED = 8;
+ MODULAR = 9;
+ TESTED = 10;
+ LAWFUL = 11;
+ RESPECTFUL = 12;
+ TRUSTWORTHY = 13;
+}
+
+enum CleanCodeAttributeCategory {
+ ADAPTABLE = 0;
+ CONSISTENT = 1;
+ INTENTIONAL = 2;
+ RESPONSIBLE = 3;
+}
+
+message Impact {
+ required SoftwareQuality softwareQuality = 1;
+ required ImpactSeverity severity = 2;
+}
+
+enum SoftwareQuality {
+ MAINTAINABILITY = 0;
+ RELIABILITY = 1;
+ SECURITY = 2;
+}
+
+enum ImpactSeverity {
+ LOW = 0;
+ MEDIUM = 1;
+ HIGH = 2;
+}
+
// Lines start at 1 and line offsets start at 0
message TextRange {
// Start line. Should never be absent
diff --git a/sonar-ws/src/main/protobuf/ws-issues.proto b/sonar-ws/src/main/protobuf/ws-issues.proto
index d545fe7e75d..950853c8156 100644
--- a/sonar-ws/src/main/protobuf/ws-issues.proto
+++ b/sonar-ws/src/main/protobuf/ws-issues.proto
@@ -163,6 +163,9 @@ message Issue {
repeated sonarqube.ws.commons.MessageFormatting messageFormattings = 38;
repeated string codeVariants = 39;
+ optional sonarqube.ws.commons.CleanCodeAttribute cleanCodeAttribute = 40;
+ optional sonarqube.ws.commons.CleanCodeAttributeCategory cleanCodeAttributeCategory = 41;
+ repeated sonarqube.ws.commons.Impact impacts = 42;
}
message Transitions {
@@ -289,6 +292,9 @@ message TaintVulnerabilityLite {
repeated Flow flows = 9;
optional bool assignedToSubscribedUser = 10;
optional string ruleDescriptionContextKey = 11;
+ optional sonarqube.ws.commons.CleanCodeAttribute cleanCodeAttribute = 12;
+ optional sonarqube.ws.commons.CleanCodeAttributeCategory cleanCodeAttributeCategory = 13;
+ repeated sonarqube.ws.commons.Impact impacts = 14;
}
message Flow {