Search in sources :

Example 1 with ClientLogOutput

use of org.sonarsource.sonarlint.core.commons.log.ClientLogOutput in project sonarlint-core by SonarSource.

the class StandaloneNoPluginMediumTests method prepare.

@BeforeEach
void prepare() throws IOException {
    ClientLogOutput logOutput = (msg, level) -> logs.put(level, msg);
    sonarlint = new StandaloneSonarLintEngineImpl(StandaloneGlobalConfiguration.builder().setLogOutput(logOutput).setModulesProvider(() -> List.of(new ClientModuleInfo("key", mock(ClientModuleFileSystem.class)))).build());
}
Also used : LinkedListMultimap(com.google.common.collect.LinkedListMultimap) ClientLogOutput(org.sonarsource.sonarlint.core.commons.log.ClientLogOutput) BeforeEach(org.junit.jupiter.api.BeforeEach) ClientModuleInfo(org.sonarsource.sonarlint.core.analysis.api.ClientModuleInfo) ClientInputFile(org.sonarsource.sonarlint.core.analysis.api.ClientInputFile) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) AnalysisResults(org.sonarsource.sonarlint.core.analysis.api.AnalysisResults) Language(org.sonarsource.sonarlint.core.commons.Language) IOException(java.io.IOException) FileUtils(org.apache.commons.io.FileUtils) Multimap(com.google.common.collect.Multimap) TestUtils(testutils.TestUtils) File(java.io.File) StandardCharsets(java.nio.charset.StandardCharsets) StandaloneSonarLintEngineImpl(org.sonarsource.sonarlint.core.StandaloneSonarLintEngineImpl) StandaloneAnalysisConfiguration(org.sonarsource.sonarlint.core.client.api.standalone.StandaloneAnalysisConfiguration) Test(org.junit.jupiter.api.Test) List(java.util.List) AfterEach(org.junit.jupiter.api.AfterEach) StandaloneGlobalConfiguration(org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration) TempDir(org.junit.jupiter.api.io.TempDir) ClientModuleFileSystem(org.sonarsource.sonarlint.core.analysis.api.ClientModuleFileSystem) StandaloneSonarLintEngine(org.sonarsource.sonarlint.core.client.api.standalone.StandaloneSonarLintEngine) Mockito.mock(org.mockito.Mockito.mock) ClientLogOutput(org.sonarsource.sonarlint.core.commons.log.ClientLogOutput) ClientModuleInfo(org.sonarsource.sonarlint.core.analysis.api.ClientModuleInfo) StandaloneSonarLintEngineImpl(org.sonarsource.sonarlint.core.StandaloneSonarLintEngineImpl) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

LinkedListMultimap (com.google.common.collect.LinkedListMultimap)1 Multimap (com.google.common.collect.Multimap)1 File (java.io.File)1 IOException (java.io.IOException)1 StandardCharsets (java.nio.charset.StandardCharsets)1 List (java.util.List)1 FileUtils (org.apache.commons.io.FileUtils)1 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)1 AfterEach (org.junit.jupiter.api.AfterEach)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 Test (org.junit.jupiter.api.Test)1 TempDir (org.junit.jupiter.api.io.TempDir)1 Mockito.mock (org.mockito.Mockito.mock)1 StandaloneSonarLintEngineImpl (org.sonarsource.sonarlint.core.StandaloneSonarLintEngineImpl)1 AnalysisResults (org.sonarsource.sonarlint.core.analysis.api.AnalysisResults)1 ClientInputFile (org.sonarsource.sonarlint.core.analysis.api.ClientInputFile)1 ClientModuleFileSystem (org.sonarsource.sonarlint.core.analysis.api.ClientModuleFileSystem)1 ClientModuleInfo (org.sonarsource.sonarlint.core.analysis.api.ClientModuleInfo)1 StandaloneAnalysisConfiguration (org.sonarsource.sonarlint.core.client.api.standalone.StandaloneAnalysisConfiguration)1 StandaloneGlobalConfiguration (org.sonarsource.sonarlint.core.client.api.standalone.StandaloneGlobalConfiguration)1