Programming language you’re coding in: Java & Scala
Is connected mode used: No
Connected to SonarCloud or SonarQube (and which version):
And a thorough description of the problem / question:
SonarLint is not showing any output. Getting the following log:
[2024-06-04T16:32:42.2364146] [SonarLint Client RPC sequential executor] ERROR sonarlint - Error when handling a notification
java.lang.IllegalStateException: No log output configured
at org.sonarsource.sonarlint.core.commons.log.LogOutputDelegator.lambda$log$0(LogOutputDelegator.java:40)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at org.sonarsource.sonarlint.core.commons.log.LogOutputDelegator.log(LogOutputDelegator.java:39)
at org.sonarsource.sonarlint.core.commons.log.LogOutputDelegator.log(LogOutputDelegator.java:58)
at org.sonarsource.sonarlint.core.commons.log.SonarLintLogger.error(SonarLintLogger.java:123)
at org.sonarlint.intellij.analysis.AnalysisState.addRawIssue(AnalysisState.java:105)
at org.sonarlint.intellij.analysis.AnalysisState.addRawStreamingIssue(AnalysisState.java:90)
at org.sonarlint.intellij.SonarLintIntelliJClient.didRaiseIssue(SonarLintIntelliJClient.kt:759)
at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$didRaiseIssue$33(SonarLintRpcClientImpl.java:353)
at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$notify$4(SonarLintRpcClientImpl.java:145)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
tl;dr:
Your working directory cannot contain any spaces. Remove them, and then SonarLint should work flawlessly.
Long Explanation:
I also have the exact same log output when I scan. However, I noticed that in the same log output, SonarLint was still working fine under the hood. It could analyze and detect issues (e.g. displays 300 issues in log), but the “Current File” tab in the SonarLint window was always showing “No issues to Display.” My working directory was named “playground workspace”, and so I made a new directory named “playground_workspace.” This seems to fix the problem. Hope this helps you guys as well.