aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-xoo-plugin/src
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-08-03 13:51:09 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2015-08-03 14:01:13 +0200
commit0b2387019db64b7acaedf298bd6335b3fd570d65 (patch)
treeea9476a328433da1c51e03a6534da3e62d2c4e32 /plugins/sonar-xoo-plugin/src
parentd5f10d28f6a996af9c34c4757e7dcdf446b43af9 (diff)
downloadsonarqube-0b2387019db64b7acaedf298bd6335b3fd570d65.tar.gz
sonarqube-0b2387019db64b7acaedf298bd6335b3fd570d65.zip
Declare multiline rule in Xoo
Diffstat (limited to 'plugins/sonar-xoo-plugin/src')
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java9
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java2
2 files changed, 7 insertions, 4 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 74f4e2a7fee..3666ac23d4c 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,13 +76,16 @@ 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");
-
+ .setHtmlDescription("Issue created using deprecated API");
+
+ repo.createRule(MultilineIssuesSensor.RULE_KEY).setName("Creates issues with ranges/multiple locations")
+ .setHtmlDescription("Issue with range and multiple locations");
+
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 30e8a45261d..b9ae69bb0dd 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(10);
+ assertThat(repo.rules()).hasSize(11);
RulesDefinition.Rule rule = repo.rule(OneIssuePerLineSensor.RULE_KEY);
assertThat(rule.name()).isNotEmpty();