]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4908 update xoo with tags
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 12 Feb 2014 15:31:58 +0000 (16:31 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 12 Feb 2014 15:31:58 +0000 (16:31 +0100)
plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRuleDefinitions.java
plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRuleDefinitionsTest.java

index ac47acea83be80449da1f9ca88cd4df60729837d..f2ca8ba8138148e37fe412605d3a7551b6d13ec2 100644 (file)
@@ -43,7 +43,7 @@ public class XooRuleDefinitions implements RuleDefinitions {
       .setHtmlDescription("Generate an issue on empty lines of Xoo source files")
 
         // optional tags
-      .addTags("style")
+      .setTags("style", "security")
 
         // optional status. Default value is READY.
       .setStatus(RuleStatus.BETA)
index 1618a2995b7910367a5be5a4475a1ba797499adc..95c4ba1144920b791726653c7c3ac99b93acb340 100644 (file)
@@ -37,6 +37,10 @@ public class XooRuleDefinitionsTest {
     assertThat(repo.name()).isEqualTo("Xoo");
     assertThat(repo.language()).isEqualTo("xoo");
     assertThat(repo.rules()).hasSize(1);
-    assertThat(repo.rules().get(0).key()).isEqualTo("x1");
+
+    RuleDefinitions.Rule x1 = repo.rule("x1");
+    assertThat(x1.key()).isEqualTo("x1");
+    assertThat(x1.tags()).containsOnly("style", "security");
+    assertThat(x1.htmlDescription()).isNotEmpty();
   }
 }