diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2020-03-20 09:13:40 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-03-23 20:03:41 +0000 |
commit | 85672fd49fa3b81eaf07792fb76e03967e85da3d (patch) | |
tree | 17f991d4503e04a2ce898b07a3790dfa607aa95d /sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor | |
parent | 28faf35ead2128145b003b190750fd14f62c1b1c (diff) | |
download | sonarqube-85672fd49fa3b81eaf07792fb76e03967e85da3d.tar.gz sonarqube-85672fd49fa3b81eaf07792fb76e03967e85da3d.zip |
SONAR-13214 Restore a minimal Settings API for backward compatibility
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/ModuleSensorContext.java | 5 | ||||
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ProjectSensorContext.java | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorContext.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorContext.java index b82a8d6e037..2a038546266 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorContext.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ModuleSensorContext.java @@ -27,15 +27,16 @@ import org.sonar.api.batch.fs.internal.DefaultInputProject; import org.sonar.api.batch.rule.ActiveRules; import org.sonar.api.batch.sensor.internal.SensorStorage; import org.sonar.api.config.Configuration; +import org.sonar.api.config.Settings; @ThreadSafe public class ModuleSensorContext extends ProjectSensorContext { private final InputModule module; - public ModuleSensorContext(DefaultInputProject project, InputModule module, Configuration config, FileSystem fs, ActiveRules activeRules, + public ModuleSensorContext(DefaultInputProject project, InputModule module, Configuration config, Settings mutableSettings, FileSystem fs, ActiveRules activeRules, SensorStorage sensorStorage, SonarRuntime sonarRuntime) { - super(project, config, fs, activeRules, sensorStorage, sonarRuntime); + super(project, config, mutableSettings, fs, activeRules, sensorStorage, sonarRuntime); this.module = module; } diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ProjectSensorContext.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ProjectSensorContext.java index 9819d18c6f1..3e43dc2f8a0 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ProjectSensorContext.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/ProjectSensorContext.java @@ -50,6 +50,7 @@ import org.sonar.api.batch.sensor.rule.internal.DefaultAdHocRule; import org.sonar.api.batch.sensor.symbol.NewSymbolTable; import org.sonar.api.batch.sensor.symbol.internal.DefaultSymbolTable; import org.sonar.api.config.Configuration; +import org.sonar.api.config.Settings; import org.sonar.api.scanner.fs.InputProject; import org.sonar.api.utils.Version; import org.sonar.scanner.sensor.noop.NoOpNewAnalysisError; @@ -59,6 +60,7 @@ public class ProjectSensorContext implements SensorContext { static final NoOpNewAnalysisError NO_OP_NEW_ANALYSIS_ERROR = new NoOpNewAnalysisError(); + private final Settings mutableSettings; private final FileSystem fs; private final ActiveRules activeRules; private final SensorStorage sensorStorage; @@ -66,10 +68,11 @@ public class ProjectSensorContext implements SensorContext { private final SonarRuntime sonarRuntime; private final Configuration config; - public ProjectSensorContext(DefaultInputProject project, Configuration config, FileSystem fs, ActiveRules activeRules, + public ProjectSensorContext(DefaultInputProject project, Configuration config, Settings mutableSettings, FileSystem fs, ActiveRules activeRules, SensorStorage sensorStorage, SonarRuntime sonarRuntime) { this.project = project; this.config = config; + this.mutableSettings = mutableSettings; this.fs = fs; this.activeRules = activeRules; this.sensorStorage = sensorStorage; @@ -77,6 +80,11 @@ public class ProjectSensorContext implements SensorContext { } @Override + public Settings settings() { + return mutableSettings; + } + + @Override public Configuration config() { return config; } |