diff options
author | Matteo Mara <matteo.mara@sonarsource.com> | 2024-01-24 16:48:48 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-01-26 20:02:46 +0000 |
commit | fe30d1f601c2fbbb705a29890391eb21901a3143 (patch) | |
tree | a6b669d4751d873e00a184acdc6b89060e80a283 /sonar-scanner-engine | |
parent | 0e8a9dfad579f1a7a2c7ac92c2d4f1d63856b40d (diff) | |
download | sonarqube-fe30d1f601c2fbbb705a29890391eb21901a3143.tar.gz sonarqube-fe30d1f601c2fbbb705a29890391eb21901a3143.zip |
SONAR-21195 Support deprecated file suffixes properties from optional analyzers
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java index 1e0fbf0c2e5..16d66d5b460 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/SpringScannerContainer.java @@ -26,6 +26,7 @@ import org.slf4j.LoggerFactory; import org.sonar.api.batch.fs.internal.FileMetadata; import org.sonar.api.batch.rule.CheckFactory; import org.sonar.api.batch.sensor.issue.internal.DefaultNoSonarFilter; +import org.sonar.api.config.PropertyDefinition; import org.sonar.api.scan.filesystem.PathResolver; import org.sonar.api.utils.MessageException; import org.sonar.core.extension.CoreExtensionsInstaller; @@ -150,10 +151,23 @@ public class SpringScannerContainer extends SpringComponentContainer { @Override protected void doBeforeStart() { + addSuffixesDeprecatedProperties(); addScannerExtensions(); addComponents(); } + private void addSuffixesDeprecatedProperties() { + add( + /* This is needed to support properly the deprecated sonar.rpg.suffixes property when the download optimization feature is enabled. + The value of the property is needed at the preprocessing stage, but being defined by an optional analyzer means that at preprocessing + it won't be properly available. This will be removed in SQ 11.0 together with the drop of the property from the rpg analyzer. + See SONAR-21514 */ + PropertyDefinition.builder("sonar.rpg.file.suffixes") + .deprecatedKey("sonar.rpg.suffixes") + .multiValues(true) + .build()); + } + private void addScannerExtensions() { getParentComponentByType(CoreExtensionsInstaller.class) .install(this, noExtensionFilter(), extension -> getScannerProjectExtensionsFilter().accept(extension)); |