From d27e0742029ca7af096963f33c46eb72ac386cb9 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Tue, 29 Aug 2017 18:36:57 +0200 Subject: [PATCH] Xoo MeasureSensor supports language Xoo2 --- .../src/main/java/org/sonar/xoo/lang/MeasureSensor.java | 5 +++-- 1 file 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); -- 2.39.5