diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-07-06 14:21:05 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-07-11 08:58:34 +0200 |
commit | 75e926deef21688a74904b1feae2a687309a6ab3 (patch) | |
tree | 75f551cccf3900744b6a84dfd967b21cfc654822 /plugins | |
parent | 6f107dcbe90b0fea564e1ecaa96643bfc539329a (diff) | |
download | sonarqube-75e926deef21688a74904b1feae2a687309a6ab3.tar.gz sonarqube-75e926deef21688a74904b1feae2a687309a6ab3.zip |
SONAR-9480 fix support of multiple docs to recover with same id
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java | 6 | ||||
-rw-r--r-- | plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java | 2 |
2 files changed, 7 insertions, 1 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 4dca671a89d..d4f46446a8e 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 @@ -138,6 +138,12 @@ public class XooRulesDefinition implements RulesDefinition { .setGapDescription("A certified architect will need roughly half an hour to start working on removal of modules, " + "then it's about one hour per module."); + repo + .createRule("xoo-template") + .setTemplate(true) + .setName("Template of rule") + .setHtmlDescription("Template to be overridden by custom rules"); + repo.done(); } 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 fee5610822b..8f25da1ff79 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 @@ -42,7 +42,7 @@ public class XooRulesDefinitionTest { assertThat(repo).isNotNull(); assertThat(repo.name()).isEqualTo("Xoo"); assertThat(repo.language()).isEqualTo("xoo"); - assertThat(repo.rules()).hasSize(17); + assertThat(repo.rules()).hasSize(18); RulesDefinition.Rule rule = repo.rule(OneIssuePerLineSensor.RULE_KEY); assertThat(rule.name()).isNotEmpty(); |