From 8039a98b1ac0fa8144fb0da77248a2e40280d48b Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Fri, 27 Nov 2015 09:03:02 +0100 Subject: [PATCH] SONAR-6183 Add validation of *coverage_line_hits_data measures --- .../sensor/coverage/CoverageExclusions.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sonar-batch/src/main/java/org/sonar/batch/sensor/coverage/CoverageExclusions.java b/sonar-batch/src/main/java/org/sonar/batch/sensor/coverage/CoverageExclusions.java index f3ec090b8ff..e423b24e250 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/sensor/coverage/CoverageExclusions.java +++ b/sonar-batch/src/main/java/org/sonar/batch/sensor/coverage/CoverageExclusions.java @@ -19,30 +19,26 @@ */ package org.sonar.batch.sensor.coverage; -import org.sonar.api.batch.fs.FileSystem; - -import javax.annotation.CheckForNull; - -import org.sonar.api.batch.fs.InputFile; -import org.sonar.api.utils.KeyValueFormat; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList.Builder; - import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; - +import javax.annotation.CheckForNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.CoreProperties; +import org.sonar.api.batch.fs.FileSystem; +import org.sonar.api.batch.fs.InputFile; import org.sonar.api.config.Settings; import org.sonar.api.measures.CoreMetrics; import org.sonar.api.measures.Measure; import org.sonar.api.measures.Metric; import org.sonar.api.resources.Resource; +import org.sonar.api.utils.KeyValueFormat; import org.sonar.api.utils.WildcardPattern; public class CoverageExclusions { @@ -104,10 +100,13 @@ public class CoverageExclusions { coverageMetrics.add(CoreMetrics.NEW_OVERALL_UNCOVERED_LINES); coverageMetrics.add(CoreMetrics.NEW_OVERALL_UNCOVERED_CONDITIONS); + byLineMetrics.add(CoreMetrics.OVERALL_COVERAGE_LINE_HITS_DATA); byLineMetrics.add(CoreMetrics.OVERALL_CONDITIONS_BY_LINE); byLineMetrics.add(CoreMetrics.OVERALL_COVERED_CONDITIONS_BY_LINE); + byLineMetrics.add(CoreMetrics.COVERAGE_LINE_HITS_DATA); byLineMetrics.add(CoreMetrics.COVERED_CONDITIONS_BY_LINE); byLineMetrics.add(CoreMetrics.CONDITIONS_BY_LINE); + byLineMetrics.add(CoreMetrics.IT_COVERAGE_LINE_HITS_DATA); byLineMetrics.add(CoreMetrics.IT_CONDITIONS_BY_LINE); byLineMetrics.add(CoreMetrics.IT_COVERED_CONDITIONS_BY_LINE); @@ -141,7 +140,7 @@ public class CoverageExclusions { if (!isLineMetrics(metric)) { return; } - + InputFile inputFile = getInputFile(filePath); if (inputFile == null) { -- 2.39.5