aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-checkstyle-plugin/src
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2012-03-29 10:54:40 +0600
committerEvgeny Mandrikov <mandrikov@gmail.com>2012-03-29 11:01:42 +0600
commit2a93969813f040f9072fe261ac94f1c9b65738bb (patch)
tree480c59ed8da563af0a2292ae94f6fab53f5f0a52 /plugins/sonar-checkstyle-plugin/src
parent9f7cdba5e642faa17cb556f2b7882d7dd5adab0c (diff)
downloadsonarqube-2a93969813f040f9072fe261ac94f1c9b65738bb.tar.gz
sonarqube-2a93969813f040f9072fe261ac94f1c9b65738bb.zip
Fix some quality flaws
Diffstat (limited to 'plugins/sonar-checkstyle-plugin/src')
-rw-r--r--plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleSensor.java3
1 files changed, 2 insertions, 1 deletions
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 0c1e5cdc983..1c0db7f6fcb 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
@@ -22,6 +22,7 @@ package org.sonar.plugins.checkstyle;
import org.sonar.api.batch.Sensor;
import org.sonar.api.batch.SensorContext;
import org.sonar.api.profiles.RulesProfile;
+import org.sonar.api.resources.Java;
import org.sonar.api.resources.Project;
public class CheckstyleSensor implements Sensor {
@@ -35,7 +36,7 @@ public class CheckstyleSensor implements Sensor {
}
public boolean shouldExecuteOnProject(Project project) {
- return project.getFileSystem().hasJavaSourceFiles() &&
+ return !project.getFileSystem().mainFiles(Java.KEY).isEmpty() &&
!profile.getActiveRulesByRepository(CheckstyleConstants.REPOSITORY_KEY).isEmpty();
}