summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-04-14 20:05:11 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-04-15 11:56:27 +0400
commitfe0764d0b64956a59eb3c10e491770182fe954ab (patch)
tree900628ed280d590a123d625d9ce376acd29e1a18 /plugins
parentcea5b223198330fa8ee49139d12e068e60eef616 (diff)
downloadsonarqube-fe0764d0b64956a59eb3c10e491770182fe954ab.tar.gz
sonarqube-fe0764d0b64956a59eb3c10e491770182fe954ab.zip
Remove warnings about reuseExistingRulesConfiguration from checkstyle, pmd and findbugs plugins
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstylePlugin.java3
-rw-r--r--plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java5
-rw-r--r--plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java2
-rw-r--r--plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java8
-rw-r--r--plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdSensor.java5
5 files changed, 3 insertions, 20 deletions
diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstylePlugin.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstylePlugin.java
index 070b076271d..2d5bb15f4b4 100644
--- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstylePlugin.java
+++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstylePlugin.java
@@ -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;
diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java
index 32a52c47625..3b2311e0f1f 100644
--- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java
+++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java
@@ -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();
}
diff --git a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java
index 8d6a7d2fdb3..5e23416870d 100644
--- a/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java
+++ b/plugins/sonar-findbugs-plugin/src/main/java/org/sonar/plugins/findbugs/FindbugsSensor.java
@@ -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");
}
diff --git a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java
index c4f0d70b9f0..24b8e5c9413 100644
--- a/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java
+++ b/plugins/sonar-findbugs-plugin/src/test/java/org/sonar/plugins/findbugs/FindbugsSensorTest.java
@@ -50,14 +50,6 @@ public class FindbugsSensorTest extends FindbugsTests {
}
@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);
Project project = createProject();
diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdSensor.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdSensor.java
index 62d11cc7639..079be40e4f3 100644
--- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdSensor.java
+++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdSensor.java
@@ -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) {