Description of the Issue:
I have configured SonarQube scanning for an enterprise project using a GitHub workflow with SonarSource/sonarqube-scan-action@v6. The workflow executes successfully and detects issues as expected, even without any actual compilation of the code.
However, when performing a local analysis on a development machine using the SonarQube Visual Studio Extension, the process completes without errors but fails to identify any issues—even in code that clearly contains problems.
Project Setup:
The project is a C++ application built locally using CMake and Dev Containers.
SonarQube is running in connected mode during local analysis.
carr[200] = ‘a’; // Intentional out-of-bounds access for testing
In this case, SonarQube was executed without connected mode, but I expected it to still detect and highlight these problematic lines. Unfortunately, no issues were reported.
I hope you can help me understand if more setup is needed for this to work or there is an issue with the VS extension.
As I have already written in the project setup section the project compiles using CMake. If you look in the attached log you can see that analysis do run (both when opening the file and when saving it) but it does not detect any issues:
[ThreadId 34] [Analysis] Analysis de682400-a31d-4e22-a5d5-d7bcd378f35b found 0 issue(s) in MyCppApp.cpp [final: True]
Thank you @KarstenMS for the detailed post, including the verbose logs! I am actively looking into this and trying to reproduce the issue on my side. I’ll come back as soon as possible with an update.
Apologies for the delay Thanks a lot for sharing the logs! They suggest that the compile_commands.json might not be properly configured
Could you please double-check if this is the case? Detailed instructions on analyzing CMake projects with SonarQube for Visual Studio is here. When trying, please also make sure that you will be using the latest version of the plugin (v9.2.0 at the time of writing).
It is a problem with the compile commands. Thanks for helping with this. It was because of a mismatch between the location of the compile commands between the devcontainer and the local environment. The local project folder was mounted into the devcontainer on a different location.
Thanks for the post again, and please keep sharing feedback with us about your experience using SonarQube for IDE. We are constantly trying to improve UX, docs, and stability of our product, and direct user feedback is greatly appreciated In short, don’t be shy to create posts for general feedback, without waiting for an issue/bug to pop up