diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2017-08-29 18:36:57 +0200 |
---|---|---|
committer | Teryk Bellahsene <teryk@users.noreply.github.com> | 2017-08-30 16:24:53 +0200 |
commit | d27e0742029ca7af096963f33c46eb72ac386cb9 (patch) | |
tree | a6c9f546487938bd3ee7be97f6dd4de37721d4ab /plugins/sonar-xoo-plugin | |
parent | cb3a07c00978d13affed1bc10167e4cae875e1cf (diff) | |
download | sonarqube-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.java | 5 |
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); |