diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2014-03-25 23:10:45 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2014-03-25 23:10:46 +0100 |
commit | 1b8416c73a97f61899286d2e1f4e3e7685135e9a (patch) | |
tree | 2894a01e8efd50df65264f7f31328f46f0a756a0 /plugins/sonar-xoo-plugin | |
parent | 0abfc8ad75bb91dceba66f9e5905268312bed038 (diff) | |
download | sonarqube-1b8416c73a97f61899286d2e1f4e3e7685135e9a.tar.gz sonarqube-1b8416c73a97f61899286d2e1f4e3e7685135e9a.zip |
SONAR-4908 extract RulesDefinitionAnnotationLoader
+ refactor the classes RegisterXXX used during server startup
Diffstat (limited to 'plugins/sonar-xoo-plugin')
-rw-r--r-- | plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java | 3 | ||||
-rw-r--r-- | plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java index b00b46df9a1..0b4efbbc717 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java @@ -51,8 +51,9 @@ public class XooRulesDefinition implements RulesDefinition { // default severity when the rule is activated on a Quality profile. Default value is MAJOR. .setSeverity(Severity.MINOR); + // debt-related information x1Rule - .setDebtSubCharacteristic("INTEGRATION_TESTABILITY") + .setDebtSubCharacteristic(SubCharacteristics.INTEGRATION_TESTABILITY) .setDebtRemediationFunction(x1Rule.debtRemediationFunctions().linearWithOffset("1h", "30min")); x1Rule.createParam("acceptWhitespace") diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java index 1508db93b13..ddf2c645498 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java @@ -44,7 +44,7 @@ public class XooRulesDefinitionTest { assertThat(x1.tags()).containsOnly("style", "security"); assertThat(x1.htmlDescription()).isNotEmpty(); - assertThat(x1.debtSubCharacteristic()).isEqualTo("INTEGRATION_TESTABILITY"); + assertThat(x1.debtSubCharacteristic()).isEqualTo(RulesDefinition.SubCharacteristics.INTEGRATION_TESTABILITY); assertThat(x1.debtRemediationFunction().type()).isEqualTo(DebtRemediationFunction.Type.LINEAR_OFFSET); assertThat(x1.debtRemediationFunction().factor()).isEqualTo("1h"); assertThat(x1.debtRemediationFunction().offset()).isEqualTo("30min"); |