public AnalysisResult execute() { AnalysisResult result = new AnalysisResult(); Map<String, String> props = new HashMap<>(); props.putAll(tester.globalProperties); props.putAll(taskProperties); Batch.builder() .setGlobalProperties(props) .setEnableLoggingConfiguration(true) .addComponents(new EnvironmentInformation("mediumTest", "1.0"), tester.pluginInstaller, tester.globalRefProvider, tester.qualityProfiles, tester.rulesLoader, tester.branchConfigurationLoader, tester.projectRefProvider, tester.activeRules, tester.serverIssues, tester.settingsLoader, result) .setLogOutput(tester.logOutput) .build().execute(); return result; }
@Override public Batch createBatch(Map<String, String> properties, final org.sonarsource.scanner.api.internal.batch.LogOutput logOutput) { EnvironmentInformation env = new EnvironmentInformation(properties.get(SCANNER_APP_KEY), properties.get(SCANNER_APP_VERSION_KEY)); return Batch.builder() .setEnvironment(env) .setGlobalProperties(properties) .setLogOutput((formattedMessage, level) -> logOutput.log(formattedMessage, LogOutput.Level.valueOf(level.name()))) .build(); } }
@Override public Batch createBatch(Map<String, String> properties, final org.sonarsource.scanner.api.internal.batch.LogOutput logOutput) { EnvironmentInformation env = new EnvironmentInformation(properties.get(SCANNER_APP_KEY), properties.get(SCANNER_APP_VERSION_KEY)); return Batch.builder() .setEnvironment(env) .setGlobalProperties(properties) .setLogOutput((formattedMessage, level) -> logOutput.log(formattedMessage, LogOutput.Level.valueOf(level.name()))) .build(); } }