JS issues not appearing in IDE

Please provide

  • Operating system: Windows 10
  • Visual Studio version: VS 2022 17.11.5
  • SonarLint plugin version: 8.7.0.11108
  • Programming language you’re coding in: JS
  • Is connected mode used: Yes
    • Connected to SonarQube (and which version): 9.9.7

We are having issues getting JS issues to appear inside Visual Studio but not C# or C++. The rules seemed to have been correctly pulled from the server and in the output I can see it recognises issues on various lines, but these aren’t translated to actual issues inside Visual Studio for some reason. This is also the case in standalone mode. I have attached the output in case there is something relevant there. Thanks.

output.txt (608.1 KB)

Hello @wrich,

Thank you for reporting this and for providing the logs!

Unfortunately, I was not able to reproduce the problem and the logs did not offer me enough insights.

Could you please tell me which rules are not appearing?

Additionally, could you try the following suggestions:

  1. Delete the .sonarlint folder from C:\Users\username\.sonarlint and open the VS solution again
  2. Try this suggestion

Make sure that when you install NodeJS, that you check the box to add Additional Tools. Without this, I noticed that things do not work the way they’re supposed to. During this installation, there is an extension that gets added to Visual studio

1 Like

Hi, I have tested the behaviour again including the above solution with Node.

Using the same solution and .js file, I can now get issues to appear in the errors list inside VS but only when used in standalone mode. As soon as I use it in connected mode the issues are still found (based on the logs), but don’t appear inside VS. I have attached the logs from both test cases to see you can spot anything useful.

connected.txt (111.7 KB)
standalone.txt (21.5 KB)

1 Like

Hello @wrich!

Thank you for the logs!

Could you, please, update SonarQube for Visual Studio (formerly SonarLint) to the latest version, 8.10, and let us know if the problem still occurs?

I have updated the version and can confirm the problem still exists for 8.10. Let me know if it would be helpful to get additional logs for this version too.

1 Like

@wrich, from what I see in the logs, in the test.js in standalone mode you have 10 issues. Are they all connected to the S3504 rule?

Could you please confirm the following:

  • The issues that you see in standalone mode appear in the issues page of your project in SonarQube
  • If the issues are present in the server, is their status “Open”?

Let me know if it would be helpful to get additional logs for this version too.

Yes, please, the logs from the connected mode of 8.10 could be helpful as they have some more context.

Thanks for the response. I have retested on 8.10 and with a real production file so I could compare to the SonarQube server.

Looks like all the issues that appear in standalone inside VS are also present and open inside the SonarQube server. Similarly the issues that appear in the log for connected mode are also present in the SonarQube server (e.g. S1117 on line 119 from the connected log is listed as an open issue in SonarQube).

I still just don’t see the issues inside VS when in connected mode even though they are being found in the logs.

Standalone:

Connected:

Here are both the standalone and connected logs for 8.10 on the production file.

connected.txt (729.5 KB)
standalone.txt (59.8 KB)

1 Like