]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-1817: Squid rule to create violation on each NOSONAR tag occurence
authorGodin <mandrikov@gmail.com>
Mon, 29 Nov 2010 15:49:47 +0000 (15:49 +0000)
committerGodin <mandrikov@gmail.com>
Mon, 29 Nov 2010 15:49:47 +0000 (15:49 +0000)
plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/squid/check/NoSonarCheck.java

index add1a0cd6eb09da4efc205c2715dea481f6d7170..e17c348d012b3f632663e47d9ce7cb824c48deb8 100644 (file)
@@ -26,14 +26,15 @@ import org.sonar.check.Rule;
 import org.sonar.squid.api.CheckMessage;
 import org.sonar.squid.api.SourceFile;
 
-@Rule(key = "NoSonarCheck", name = "NOSONAR occurence", isoCategory = IsoCategory.Maintainability, priority = Priority.INFO,
-    description = "")
+@Rule(key = "NoSonar", name = "Avoid use of //NOSONAR marker", isoCategory = IsoCategory.Reliability, priority = Priority.INFO,
+    description = "<p>Any violation to quality rule can be deactivated with the //NOSONAR marker. This marker is pretty useful to exclude false-positive results but sometimes it can abusively be used to hide real quality flaws.</p>"
+        + "<p>This rule allows to track and/or forbid use of this marker</p>")
 public class NoSonarCheck extends SquidCheck {
 
   @Override
   public void visitFile(SourceFile sourceFile) {
     for (Integer line : sourceFile.getNoSonarTagLines()) {
-      CheckMessage message = new CheckMessage(this, "NOSONAR occurence");
+      CheckMessage message = new CheckMessage(this, "Is //NOSONAR used to exclude false-positive or to hide real quality flaw ?");
       message.setForced(true);
       message.setLine(line);
       sourceFile.log(message);