diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2021-05-11 09:46:32 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-05-18 20:08:04 +0000 |
commit | fb26fcd684ebdec9c40563d68dfcbd45f1ce786c (patch) | |
tree | 9cf5b7d239006cd250fb4b05b6fcb8dfde5ad708 /plugins/sonar-xoo-plugin/src | |
parent | 18bdf671d1ec956b772a1cd763e373f1236aab0a (diff) | |
download | sonarqube-fb26fcd684ebdec9c40563d68dfcbd45f1ce786c.tar.gz sonarqube-fb26fcd684ebdec9c40563d68dfcbd45f1ce786c.zip |
SONAR-14794 Optimize ITs: Reorganize test suites to reuse orchestrators more often
Diffstat (limited to 'plugins/sonar-xoo-plugin/src')
4 files changed, 4 insertions, 4 deletions
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneExternalIssuePerLineSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneExternalIssuePerLineSensor.java index 375c2d88b7a..877335273ce 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneExternalIssuePerLineSensor.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OneExternalIssuePerLineSensor.java @@ -34,7 +34,7 @@ public class OneExternalIssuePerLineSensor implements Sensor { public static final String RULE_ID = "OneExternalIssuePerLine"; public static final String ENGINE_ID = "XooEngine"; public static final String SEVERITY = "MAJOR"; - public static final Long EFFORT = 10l; + public static final Long EFFORT = 10L; public static final RuleType TYPE = RuleType.BUG; public static final String ACTIVATE = "sonar.oneExternalIssuePerLine.activate"; public static final String REGISTER_AD_HOC_RULE = "sonar.oneExternalIssuePerLine.adhocRule"; diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OnePredefinedRuleExternalIssuePerLineSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OnePredefinedRuleExternalIssuePerLineSensor.java index 378c0298f26..dc39871cd2c 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OnePredefinedRuleExternalIssuePerLineSensor.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/OnePredefinedRuleExternalIssuePerLineSensor.java @@ -35,7 +35,7 @@ public class OnePredefinedRuleExternalIssuePerLineSensor implements Sensor { public static final String RULE_ID = "OnePredefinedRuleExternalIssuePerLine"; public static final String ENGINE_ID = "XooEngine"; public static final String SEVERITY = "MAJOR"; - public static final Long EFFORT = 10l; + public static final Long EFFORT = 10L; public static final RuleType TYPE = RuleType.BUG; public static final String ACTIVATE = "sonar.onePredefinedRuleExternalIssuePerLine.activate"; private static final String NAME = "One External Issue Per Line With A Predefined Rule"; diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/RandomAccessSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/RandomAccessSensor.java index 5fdf2c15770..5f7d6977560 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/RandomAccessSensor.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/RandomAccessSensor.java @@ -44,7 +44,7 @@ public class RandomAccessSensor implements Sensor { .name("One Issue Per File with Random Access") .onlyOnLanguages(Xoo.KEY) .createIssuesForRuleRepositories(XooRulesDefinition.XOO_REPOSITORY) - .requireProperty(SONAR_XOO_RANDOM_ACCESS_ISSUE_PATHS); + .onlyWhenConfiguration(c -> c.get(SONAR_XOO_RANDOM_ACCESS_ISSUE_PATHS).isPresent()); } @Override diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/SaveDataTwiceSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/SaveDataTwiceSensor.java index 39e90072dee..bb1e6345405 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/SaveDataTwiceSensor.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/SaveDataTwiceSensor.java @@ -36,7 +36,7 @@ public class SaveDataTwiceSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor.name("SaveDataTwice IT Sensor ") - .requireProperty("sonar.it.savedatatwice"); + .onlyWhenConfiguration(c -> c.getBoolean("sonar.it.savedatatwice").orElse(false)); } @Override |