diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-07-27 16:25:31 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-07-28 14:54:10 +0200 |
commit | b36bc464f98e0136d41e60774093aa946b207999 (patch) | |
tree | fabae7651b0705f3fd74144399e57350bc064565 /plugins | |
parent | 7cb72d02dc84f620447d80b96cd518d8b7f54e9a (diff) | |
download | sonarqube-b36bc464f98e0136d41e60774093aa946b207999.tar.gz sonarqube-b36bc464f98e0136d41e60774093aa946b207999.zip |
SONAR-6713 Load rules in global container
Diffstat (limited to 'plugins')
3 files changed, 8 insertions, 1 deletions
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java index a0f9cfdb4e8..fdd9505fac0 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/XooPlugin.java @@ -105,4 +105,5 @@ public class XooPlugin extends SonarPlugin { XooProjectBuilder.class, XooPostJob.class); } + } 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 b7d826a03a8..74f4e2a7fee 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 @@ -76,7 +76,13 @@ public class XooRulesDefinition implements RulesDefinition { repo.createRule(CustomMessageSensor.RULE_KEY).setName("Issue With Custom Message") .setHtmlDescription("Generate an issue on each file with a custom message"); + + repo.createRule(RandomAccessSensor.RULE_KEY).setName("One Issue Per File with Random Access") + .setHtmlDescription("This issue is generated on each file"); + repo.createRule(DeprecatedResourceApiSensor.RULE_KEY).setName("Issue created using deprecated API") + .setHtmlDescription("Issue created using deprecated API"); + 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 556ce27aa88..30e8a45261d 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 @@ -37,7 +37,7 @@ public class XooRulesDefinitionTest { assertThat(repo).isNotNull(); assertThat(repo.name()).isEqualTo("Xoo"); assertThat(repo.language()).isEqualTo("xoo"); - assertThat(repo.rules()).hasSize(8); + assertThat(repo.rules()).hasSize(10); RulesDefinition.Rule rule = repo.rule(OneIssuePerLineSensor.RULE_KEY); assertThat(rule.name()).isNotEmpty(); |