Not able to see Error reported by SonarQube server in Visual Studio 2022 Via Sonarqube extension

Please provide

  • Operating system: Windows 11
  • Visual Studio version: 17.14.13
  • SonarQube for Visual Studio plugin version: 8.29.0.14599
  • Programming language you’re coding in: C++
  • Is connected mode used:
    • SonarQube Cloud, SonarQube Server, or SonarQube Community Build? (if one of the latter two, which version?): SonarQube Server

And a thorough description of the problem / question:

I have installed SonarQube for Visual Studio extension via store. I have setup the connected mode with SonarQube server.

I can see in the server there are 2 error reported while analysis. I am trying to look those errors in My Visual Studio 2022 so that I don’t have to go to the Server to look for the errors again and again.

In the Output Window → Show Output From → SonarQube. I can see that the file that has error is been showing some error it says “[SLCore] File to analyze was not found in the file system” followed by the file name.

Also I tried to look into the Error List window, there also I am not able to see any of the warning or errors that are reported in server.

How can I resolve this?
Is My understanding right that I will be able to see the analysis results in IDE itself via extension and as I fix the error and push the code in GIT those errors will be fixed in SonarQube server?
As I write new code and Haven’t pushed that in GIT, still I will be seeing the error report of newly written code if there is some error in them?

Hey there!

Can you please share the verbose logs?

SonarQubeLogVerbose.txt (112.0 KB)
Here is the logs from Output Window after setting logging level to Verbose.

One thing. I have a solution file and that solution file contains multiple projects that are used combine. And I have setup SonarQube server project for one of the project file, I checked the Connected Mode is bind to the whole solution as per shown in Manage Project Binding window.

Hi @neeraj

I can see in the logs that the analyzer detected a few issues for these files.

[ThreadId 43] [Analysis] Analysis b7778389-075c-447d-9fdc-eb722b4ac45b found 3 issue(s) in CommonLobbyMainScene.cpp [final: True]
[ThreadId 43] [Analysis] Analysis b7778389-075c-447d-9fdc-eb722b4ac45b found 19 issue(s) in CommonGameReelStrip.cpp [final: True]

Can you check the Error List window in VisualStudio and see if maybe there are some filters applied there that hide those issues? In general, you should also see squiggly lines in those files and if you hover over them you will see cpp:S123 (numbers will be different) issues in the tooltip

Hi @georgii.borovinskikh

I am getting squiggly lines on few error but not on all, specially the one I can see in the SonarQube Server project, specially under New Issues

I have checked Error List window but can’t find any filter for SonarQube
I am able to see Build+IntelliSense / Build Only / IntelliSense Only under filter. I was expecting SonarQube option also there but it is not there

Because this is a built in Error List, we’re unable to add custom buttons there. There are other filters that can affect what’s visible to you, namely Error/Warn/Info severity filter and Current File/Open Files location filter. Please make sure you don’t have those filters hiding the issues. Additionally, you can see C++ Sonar issues specifically by using the filter on the Tool column in the Error List

I have check that already, I have changed filter for Current File/Open Files location. along with Warning/Error filter also.

This is the first thing I checked, when I can’t find any filter of window that shows error then I raised the issue here.

Could you please provide a Screenshot on a file that has a TODO comment in the file.

This way we could verify that the functionality works at all and also See your configuration.

Here is the SS for the file where the error is showing in Server. Also added SS of the Error List window with filter for the Current file name.

Also I opened SonarQube Security Report Window, and there also I am not seeing any report.

Security issues are different from normal issues, so it’s not unusual to not see anything there. Could you please share some steps to reproduce this problem (preferably with some minimal project configuration, or at least which C++ project configuration type is used), so we can investigate it on our side? We’re not observing this when analyzing our test projects, unfortunately

I checked, I don’t have admin write for the Sonar Qube Server. We are using Quality Gate for our project. I have downloaded Project info, let me know If I can get the info from somewhere else.

Project Info.zip (1.4 MB)

Sorry, I don’t think the problem is with the server configuration. We run local in-ide analysis, and from the logs you’ve provided before, it found some issues. However, as you’ve reported not seeing them in the IDE, it means something went wrong during the display of those issues. What we’re interested in is a reproducer for this specific condition. Does it happen only with this project? Does it happen with a specific build system (VCX, CMake, Makefile, etc)? Is there any other configuration setting that affects this? As always, a simple way to test it is to add a // todo comment in a C++ file, it should raise an issue locally and show it in the editor & error list. Could you see if it happens with any other projects (including empty projects from VS templates) on your machine?