SonarLint issue locations not populating

Operating System: Mac OS Monterey v12.0
IDE: Visual Studio Code v1.70.2
SonarLint Plugin Version: v1.10.0
Connected To SonarQube Developer Edition Version 8.9.3 (build 48735)

I’ve been trying to get my copy of VSCode to connect to our SonarQube via the SonarLint plugin, but so far I’ve been unsuccessful. I can see the SonarQube server I created showing up under SonarLint connected mode in VSCode, however no SonarLint issues are populating in the SonarLint issue locations vscode panel. I can also see the access token I generated for VSCode being used when I check it up in SonarQube. Any advice as to why the issue locations aren’t populating would be greatly appreciated.

Hi,

Welcome to the community!

It looks like the version you’re using has a little age on it. Could you upgrade and try again?

 
Ann

Hello there and thanks for the response! I just updated the SonarLint plugin to version 3.9.0 but I’m still not seeing the issues populate. Though I’m now seeing this exception in the SonarLint output terminal within VSCode. I’m not sure if it could be related.

[Warn  - 14:49:29.258] java.lang.IllegalStateException: org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer
	at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.executeSync(ApacheHttpClient.java:199)
	at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.get(ApacheHttpClient.java:63)
	at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.rawGet(ServerApiHelper.java:92)
	at org.sonarsource.sonarlint.core.serverapi.developers.DevelopersApi.getEvents(DevelopersApi.java:57)
	at org.sonarsource.sonarlint.core.serverconnection.smartnotifications.NotificationChecker.request(NotificationChecker.java:42)
	at org.sonarsource.sonarlint.core.serverconnection.smartnotifications.NotificationTimerTask.requestForServer(NotificationTimerTask.java:75)
	at org.sonarsource.sonarlint.core.serverconnection.smartnotifications.NotificationTimerTask.run(NotificationTimerTask.java:59)
	at java.base/java.util.TimerThread.mainLoop(Unknown Source)
	at java.base/java.util.TimerThread.run(Unknown Source)
Caused by: org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer
	at org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onInput(AbstractHttp1StreamDuplexer.java:349)
	at org.apache.hc.core5.http.impl.nio.AbstractHttp1IOEventHandler.inputReady(AbstractHttp1IOEventHandler.java:64)
	at org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler.inputReady(ClientHttp1IOEventHandler.java:39)
	at org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:574)
	at org.apache.hc.core5.reactor.ssl.SSLIOSession.access$400(SSLIOSession.java:72)
	at org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:172)
	at org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:131)
	at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
	at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178)
	at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127)
	at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:85)
	at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
	at java.base/java.lang.Thread.run(Unknown Source)

Hey there, so an update on this… I’ve got some of the sonar warnings working but not others. I really would like the sonar code complexity warnings to show up in my vscode. I’m using a shared sonar config file and my coworkers are seeing all the complexity warnings show up, but they don’t show up for me. Any advice is helpful.

Hello Wynn,

Could you share with us the full logs please ? Make sure to activate the settings, restart, trigger the analysis and send us the full logs.

What language are you trying to analyze ? It would be very useful if you could share a simple reproducer, a file or a small project so that we can reproduce on our side

Thanks

Hey Damien, thank you for your response! I actually have my Sonar integration with VSCode working now. It seems like updating the installed version of the plugin has done the trick. To be honest, I’m not sure why it took a while for all of the sonar warnings I was interested in to show up, but eventually, they all came through. In particular, the warnings that I wanted to see that weren’t there were the code complexity issues, but as I mentioned, they eventually appeared. Sorry, I wish I had more details about why the plugin was behaving the way it was, but I’m up and running now. Thanks to everyone for the help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.