aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2017-09-06 16:34:06 +0200
committerJanos Gyerik <janos.gyerik@sonarsource.com>2017-09-12 11:34:59 +0200
commit39c110298f71325ce73d584e5034acc904c32c40 (patch)
tree09da55bd5ec1affaa68d7d97dfd588e2a3d41efe /sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor
parent579aa0457917229ed583c782563552ae957e121d (diff)
downloadsonarqube-39c110298f71325ce73d584e5034acc904c32c40.tar.gz
sonarqube-39c110298f71325ce73d584e5034acc904c32c40.zip
SONAR-9701 Don't publish coverage, scm and source of unchanged files
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/DefaultSensorContext.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorContext.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorContext.java
index f6575cfea60..db2e7f8e014 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorContext.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorContext.java
@@ -20,9 +20,7 @@
package org.sonar.scanner.sensor;
import java.io.Serializable;
-
import javax.annotation.concurrent.ThreadSafe;
-
import org.sonar.api.SonarRuntime;
import org.sonar.api.batch.AnalysisMode;
import org.sonar.api.batch.fs.FileSystem;
@@ -49,7 +47,6 @@ import org.sonar.api.config.Configuration;
import org.sonar.api.config.Settings;
import org.sonar.api.utils.Version;
import org.sonar.scanner.scan.BranchConfiguration;
-import org.sonar.scanner.scan.BranchConfiguration.BranchType;
import org.sonar.scanner.sensor.noop.NoOpNewAnalysisError;
import org.sonar.scanner.sensor.noop.NoOpNewCoverage;
import org.sonar.scanner.sensor.noop.NoOpNewCpdTokens;
@@ -151,7 +148,7 @@ public class DefaultSensorContext implements SensorContext {
@Override
public NewCoverage newCoverage() {
- if (branchConfiguration.branchType() == BranchType.SHORT) {
+ if (branchConfiguration.isShortLivingBranch()) {
return NO_OP_NEW_COVERAGE;
}
return new DefaultCoverage(sensorStorage);
@@ -159,7 +156,7 @@ public class DefaultSensorContext implements SensorContext {
@Override
public NewCpdTokens newCpdTokens() {
- if (analysisMode.isIssues() || branchConfiguration.branchType() == BranchType.SHORT) {
+ if (analysisMode.isIssues() || branchConfiguration.isShortLivingBranch()) {
return NO_OP_NEW_CPD_TOKENS;
}
return new DefaultCpdTokens(config, sensorStorage);