import java.nio.file.LinkOption;
import java.nio.file.Path;
import java.nio.file.Paths;
+import java.util.Map;
import java.util.Random;
import java.util.Set;
import org.apache.commons.io.FileUtils;
import static org.assertj.core.api.Assertions.tuple;
import static org.junit.Assume.assumeFalse;
import static org.junit.Assume.assumeTrue;
+import static org.sonar.core.config.ScannerProperties.PLUGIN_LOADING_OPTIMIZATION_KEY;
public class FileSystemMediumIT {
File projectDir = new File("test-resources/mediumtest/xoo/sample-with-input-file-filters");
AnalysisResult result = tester
.newAnalysis(new File(projectDir, "sonar-project.properties"))
+ .properties(Map.of(PLUGIN_LOADING_OPTIMIZATION_KEY, "true"))
.execute();
assertThat(result.inputFiles()).hasSize(1);
import static java.util.Collections.emptySet;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
+import static org.sonar.core.config.ScannerProperties.PLUGIN_LOADING_OPTIMIZATION_KEY;
public class IssuesMediumIT {
.put("sonar.issue.ignore.multicriteria", "1")
.put("sonar.issue.ignore.multicriteria.1.ruleKey", "*")
.put("sonar.issue.ignore.multicriteria.1.resourceKey", "*")
+ .put(PLUGIN_LOADING_OPTIMIZATION_KEY, "true")
.build())
.execute();
.put("moduleA.sonar.issue.ignore.multicriteria", "1")
.put("moduleA.sonar.issue.ignore.multicriteria.1.ruleKey", "*")
.put("moduleA.sonar.issue.ignore.multicriteria.1.resourceKey", "*")
+ .put(PLUGIN_LOADING_OPTIMIZATION_KEY, "true")
.build())
.execute();
.put("moduleA.sonar.issue.ignore.multicriteria", "1")
.put("moduleA.sonar.issue.ignore.multicriteria.1.ruleKey", "*")
.put("moduleA.sonar.issue.ignore.multicriteria.1.resourceKey", "*")
+ .put(PLUGIN_LOADING_OPTIMIZATION_KEY, "true")
.build())
.execute();
@Override
public void start() {
- shouldLoadOnlyRequiredPluginsOnStart = properties.getBoolean(PLUGIN_LOADING_OPTIMIZATION_KEY).orElse(true);
+ shouldLoadOnlyRequiredPluginsOnStart = properties.getBoolean(PLUGIN_LOADING_OPTIMIZATION_KEY).orElse(false);
if (!shouldLoadOnlyRequiredPluginsOnStart) {
LOG.warn("{} is false, so ALL available plugins will be downloaded", PLUGIN_LOADING_OPTIMIZATION_KEY);
pluginsByKeys = new HashMap<>(installer.installAllPlugins());
.thenReturn(ImmutableMap.of("squid", squidInstance))
.thenReturn(ImmutableMap.of("java", javaInstance));
+ when(properties.getBoolean(PLUGIN_LOADING_OPTIMIZATION_KEY)).thenReturn(Optional.of(true));
when(installer.installRequiredPlugins()).thenReturn(globalPlugins);
when(installer.installPluginsForLanguages(anySet())).thenReturn(languagePlugins);