]> source.dussan.org Git - sonarqube.git/commitdiff
Remove warnings about reuseExistingRulesConfiguration from checkstyle, pmd and findbu...
authorEvgeny Mandrikov <mandrikov@gmail.com>
Thu, 14 Apr 2011 16:05:11 +0000 (20:05 +0400)
committerEvgeny Mandrikov <mandrikov@gmail.com>
Fri, 15 Apr 2011 07:56:27 +0000 (11:56 +0400)
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstylePlugin.java
plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java
plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java
plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java
plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdSensor.java

index 070b076271d4024e17cd9c0c7ac868e4efb065af..2d5bb15f4b4ec8250d4cff4cf282b8d88afe3857 100644 (file)
@@ -20,9 +20,6 @@
 package org.sonar.plugins.checkstyle;
 
 import org.sonar.api.SonarPlugin;
-
-import org.sonar.api.CoreProperties;
-import org.sonar.api.Plugin;
 import org.sonar.api.Properties;
 import org.sonar.api.Property;
 
index 32a52c47625d9db430c5a503dbd2fc7fa4e4ff9a..3b2311e0f1f8173d9d70b6bcb1eb3a70dd9d6ab6 100644 (file)
@@ -37,13 +37,10 @@ public class CheckstyleSensor implements Sensor {
 
   public boolean shouldExecuteOnProject(Project project) {
     return project.getFileSystem().hasJavaSourceFiles() &&
-        (!profile.getActiveRulesByRepository(CheckstyleConstants.REPOSITORY_KEY).isEmpty() || project.getReuseExistingRulesConfig());
+        !profile.getActiveRulesByRepository(CheckstyleConstants.REPOSITORY_KEY).isEmpty();
   }
 
   public void analyse(Project project, SensorContext context) {
-    if (project.getReuseExistingRulesConfig()) {
-      Logs.INFO.warn("Reusing existing Checkstyle configuration is not supported any more.");
-    }
     executor.execute();
   }
 
index 8d6a7d2fdb3dcb130ddd1599337c32e9a4a2ecac..5e23416870dd4e97135af9c259e205c751df5ca3 100644 (file)
@@ -47,7 +47,7 @@ public class FindbugsSensor implements Sensor {
 
   public boolean shouldExecuteOnProject(Project project) {
     return project.getFileSystem().hasJavaSourceFiles()
-        && (!profile.getActiveRulesByRepository(FindbugsConstants.REPOSITORY_KEY).isEmpty() || project.getReuseExistingRulesConfig())
+        && !profile.getActiveRulesByRepository(FindbugsConstants.REPOSITORY_KEY).isEmpty()
         && !StringUtils.equalsIgnoreCase(project.getPackaging(), "ear");
   }
 
index c4f0d70b9f00247d128311401f4a023f3b326a01..24b8e5c94133b5963eed8651bf1621cdc87db5dd 100644 (file)
@@ -49,14 +49,6 @@ public class FindbugsSensorTest extends FindbugsTests {
     assertTrue(sensor.shouldExecuteOnProject(project));
   }
 
-  @Test
-  public void shouldExecuteWhenReuseExistingRulesConfig() throws Exception {
-    FindbugsSensor analyser = new FindbugsSensor(RulesProfile.create(), new FakeRuleFinder(), null);
-    Project project = createProject();
-    when(project.getReuseExistingRulesConfig()).thenReturn(true);
-    assertTrue(analyser.shouldExecuteOnProject(project));
-  }
-
   @Test
   public void shouldNotExecuteWhenNoRulesAreActive() throws Exception {
     FindbugsSensor analyser = new FindbugsSensor(RulesProfile.create(), new FakeRuleFinder(), null);
index 62d11cc7639cfc101163a8c29d00d3a3264c71aa..079be40e4f3527e173d44bf32e2e334e2fd4f468 100644 (file)
@@ -42,9 +42,6 @@ public class PmdSensor implements Sensor {
   }
 
   public void analyse(Project project, SensorContext context) {
-    if (project.getReuseExistingRulesConfig()) {
-      Logs.INFO.warn("Reusing existing PMD configuration is not supported any more.");
-    }
     try {
       File xmlReport = executor.execute();
       getStaxParser(project, context).parse(xmlReport);
@@ -57,7 +54,7 @@ public class PmdSensor implements Sensor {
 
   public boolean shouldExecuteOnProject(Project project) {
     return project.getFileSystem().hasJavaSourceFiles() &&
-        (!profile.getActiveRulesByRepository(PmdConstants.REPOSITORY_KEY).isEmpty() || project.getReuseExistingRulesConfig());
+        !profile.getActiveRulesByRepository(PmdConstants.REPOSITORY_KEY).isEmpty();
   }
 
   private PmdViolationsXmlParser getStaxParser(Project project, SensorContext context) {