aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api-impl
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2023-04-21 15:49:12 -0500
committersonartech <sonartech@sonarsource.com>2023-04-24 20:04:24 +0000
commit36f7a5dfc1cb7e14d8632102aec3321fc6232259 (patch)
treed37f3b2b72fa873b79e0104954499decd7c0b716 /sonar-plugin-api-impl
parentccf7c5c1cd340592c3c1af5577caf0a9db92fb7b (diff)
downloadsonarqube-36f7a5dfc1cb7e14d8632102aec3321fc6232259.tar.gz
sonarqube-36f7a5dfc1cb7e14d8632102aec3321fc6232259.zip
SONAR-19050 Upgrade sonar-plugin-api to v9.16.0.549
Diffstat (limited to 'sonar-plugin-api-impl')
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java8
-rw-r--r--sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java8
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java7
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java6
4 files changed, 14 insertions, 15 deletions
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java
index d2e606bee1a..2cc4937bc63 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssue.java
@@ -26,8 +26,8 @@ import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.issue.ExternalIssue;
import org.sonar.api.batch.sensor.issue.NewExternalIssue;
+import org.sonar.api.code.CodeCharacteristic;
import org.sonar.api.rule.RuleKey;
-import org.sonar.api.rules.RuleCharacteristic;
import org.sonar.api.rules.RuleType;
import static java.lang.String.format;
@@ -39,7 +39,7 @@ public class DefaultExternalIssue extends AbstractDefaultIssue<DefaultExternalIs
private Long effort;
private Severity severity;
private RuleType type;
- private RuleCharacteristic characteristic;
+ private CodeCharacteristic characteristic;
private String engineId;
private String ruleId;
@@ -101,7 +101,7 @@ public class DefaultExternalIssue extends AbstractDefaultIssue<DefaultExternalIs
}
@CheckForNull
- public RuleCharacteristic characteristic() {
+ public CodeCharacteristic characteristic() {
return characteristic;
}
@@ -133,7 +133,7 @@ public class DefaultExternalIssue extends AbstractDefaultIssue<DefaultExternalIs
}
@Override
- public DefaultExternalIssue characteristic(RuleCharacteristic characteristic) {
+ public DefaultExternalIssue characteristic(CodeCharacteristic characteristic) {
this.characteristic = characteristic;
return this;
}
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java
index aefa37f67e7..d9027741d44 100644
--- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java
+++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRule.java
@@ -26,7 +26,7 @@ import org.sonar.api.batch.sensor.internal.DefaultStorable;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.rule.AdHocRule;
import org.sonar.api.batch.sensor.rule.NewAdHocRule;
-import org.sonar.api.rules.RuleCharacteristic;
+import org.sonar.api.code.CodeCharacteristic;
import org.sonar.api.rules.RuleType;
import static org.apache.commons.lang.StringUtils.isNotBlank;
@@ -36,7 +36,7 @@ public class DefaultAdHocRule extends DefaultStorable implements AdHocRule, NewA
private Severity severity;
private RuleType type;
- private RuleCharacteristic characteristic;
+ private CodeCharacteristic characteristic;
private String name;
private String description;
private String engineId;
@@ -99,7 +99,7 @@ public class DefaultAdHocRule extends DefaultStorable implements AdHocRule, NewA
@CheckForNull
@Override
- public RuleCharacteristic characteristic() {
+ public CodeCharacteristic characteristic() {
return characteristic;
}
@@ -134,7 +134,7 @@ public class DefaultAdHocRule extends DefaultStorable implements AdHocRule, NewA
}
@Override
- public DefaultAdHocRule characteristic(RuleCharacteristic characteristic) {
+ public DefaultAdHocRule characteristic(CodeCharacteristic characteristic) {
this.characteristic = characteristic;
return this;
}
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java
index 46a9b8e8e46..bb3dfba0f20 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java
@@ -30,8 +30,8 @@ import org.sonar.api.batch.fs.internal.DefaultInputProject;
import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
+import org.sonar.api.code.CodeCharacteristic;
import org.sonar.api.rule.RuleKey;
-import org.sonar.api.rules.RuleCharacteristic;
import org.sonar.api.rules.RuleType;
import static org.assertj.core.api.Assertions.assertThat;
@@ -54,7 +54,6 @@ public class DefaultExternalIssueTest {
.setWorkDir(temp.newFolder()));
}
-
private DefaultInputFile inputFile = new TestInputFileBuilder("foo", "src/Foo.php")
.initMetadata("Foo\nBar\n")
.build();
@@ -71,7 +70,7 @@ public class DefaultExternalIssueTest {
.remediationEffortMinutes(10L)
.type(RuleType.BUG)
.severity(Severity.BLOCKER)
- .characteristic(RuleCharacteristic.SECURE);
+ .characteristic(CodeCharacteristic.SECURE);
assertThat(issue.primaryLocation().inputComponent()).isEqualTo(inputFile);
assertThat(issue.ruleKey()).isEqualTo(RuleKey.of("external_repo", "rule"));
@@ -81,7 +80,7 @@ public class DefaultExternalIssueTest {
assertThat(issue.remediationEffort()).isEqualTo(10L);
assertThat(issue.type()).isEqualTo(RuleType.BUG);
assertThat(issue.severity()).isEqualTo(Severity.BLOCKER);
- assertThat(issue.characteristic()).isEqualTo(RuleCharacteristic.SECURE);
+ assertThat(issue.characteristic()).isEqualTo(CodeCharacteristic.SECURE);
assertThat(issue.primaryLocation().message()).isEqualTo("Wrong way!");
issue.save();
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java
index 6ba0c8dde7b..1a0807032b1 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java
@@ -23,7 +23,7 @@ import org.junit.Test;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.rule.NewAdHocRule;
-import org.sonar.api.rules.RuleCharacteristic;
+import org.sonar.api.code.CodeCharacteristic;
import org.sonar.api.rules.RuleType;
import static org.assertj.core.api.Assertions.assertThat;
@@ -44,7 +44,7 @@ public class DefaultAdHocRuleTest {
.description("desc")
.severity(Severity.BLOCKER)
.type(RuleType.CODE_SMELL)
- .characteristic(RuleCharacteristic.COMPLIANT);
+ .characteristic(CodeCharacteristic.COMPLIANT);
rule.save();
assertThat(rule.engineId()).isEqualTo("engine");
@@ -53,7 +53,7 @@ public class DefaultAdHocRuleTest {
assertThat(rule.description()).isEqualTo("desc");
assertThat(rule.severity()).isEqualTo(Severity.BLOCKER);
assertThat(rule.type()).isEqualTo(RuleType.CODE_SMELL);
- assertThat(rule.characteristic()).isEqualTo(RuleCharacteristic.COMPLIANT);
+ assertThat(rule.characteristic()).isEqualTo(CodeCharacteristic.COMPLIANT);
verify(storage).store(any(DefaultAdHocRule.class));
}