aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-xoo-plugin
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2017-08-29 18:36:57 +0200
committerTeryk Bellahsene <teryk@users.noreply.github.com>2017-08-30 16:24:53 +0200
commitd27e0742029ca7af096963f33c46eb72ac386cb9 (patch)
treea6c9f546487938bd3ee7be97f6dd4de37721d4ab /plugins/sonar-xoo-plugin
parentcb3a07c00978d13affed1bc10167e4cae875e1cf (diff)
downloadsonarqube-d27e0742029ca7af096963f33c46eb72ac386cb9.tar.gz
sonarqube-d27e0742029ca7af096963f33c46eb72ac386cb9.zip
Xoo MeasureSensor supports language Xoo2
Diffstat (limited to 'plugins/sonar-xoo-plugin')
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java
index 8255691c0d2..7a23f1b278b 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java
@@ -35,6 +35,7 @@ import org.sonar.api.batch.sensor.measure.NewMeasure;
import org.sonar.api.utils.log.Logger;
import org.sonar.api.utils.log.Loggers;
import org.sonar.xoo.Xoo;
+import org.sonar.xoo.Xoo2;
/**
* Parse files *.xoo.measures
@@ -109,12 +110,12 @@ public class MeasureSensor implements Sensor {
public void describe(SensorDescriptor descriptor) {
descriptor
.name("Xoo Measure Sensor")
- .onlyOnLanguages(Xoo.KEY);
+ .onlyOnLanguages(Xoo.KEY, Xoo2.KEY);
}
@Override
public void execute(SensorContext context) {
- for (InputFile file : context.fileSystem().inputFiles(context.fileSystem().predicates().hasLanguages(Xoo.KEY))) {
+ for (InputFile file : context.fileSystem().inputFiles(context.fileSystem().predicates().hasLanguages(Xoo.KEY, Xoo2.KEY))) {
File ioFile = file.file();
File measureFile = new File(ioFile.getParentFile(), ioFile.getName() + MEASURES_EXTENSION);
processFileMeasures(file, measureFile, context);