aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2017-01-30 13:52:09 +0100
committerDuarte Meneses <duarte.meneses@sonarsource.com>2017-01-31 09:36:47 +0100
commit9b1ff379bf0fe1787a03fe743394dccc9a4c9eb9 (patch)
treec1e70fa8eed5574c4e063508132ae239a5113740 /sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor
parentb175d0ec0966792cdeb401196305daa995b22370 (diff)
downloadsonarqube-9b1ff379bf0fe1787a03fe743394dccc9a4c9eb9.tar.gz
sonarqube-9b1ff379bf0fe1787a03fe743394dccc9a4c9eb9.zip
SONAR-8631 Only publish input files used by sensors
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java
index 3ba1565e874..cce57c4dcba 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java
@@ -218,6 +218,10 @@ public class DefaultSensorStorage implements SensorStorage {
}
public void saveMeasure(InputComponent component, DefaultMeasure<?> measure) {
+ if (component.isFile()) {
+ ((DefaultInputFile) component).setPublish(true);
+ }
+
if (isDeprecatedMetric(measure.metric().key())) {
logOnce(measure.metric().key(), "Metric '{}' is deprecated. Provided value is ignored.", measure.metric().key());
return;