Connected mode when using auto confit c/c++ mode

Operating system: Windows

  • IDE name and flavor/env: VS Code
    Sonarqube server, data center edition, GitHub actions
    And a thorough description of the problem / question: I recently updated to 2025.1 sonarqube server data center edition. I updated because of an unsupported compiler. I tried setting up autoconfig c/c++ mode by removing build wrapper from the pipeline and the analysis is working fine. I don’t have a compile commands json file, how do I use connected mode to analyze code locally?

Hello, welcome to the community! And thanks for your question.

Auto-configuration of analysis currently only works for the server analysis. In VSCode, a compilation database (compile_commands.json) is still needed.

Depending on your build system, there may be different options to generate this file. Most modern build systems offer this feature.

Thank you for the reply.

I tried generating compile command.json file using cmake and configured path in sonarlint. Even then I couldn’t get local analysis. I checked extension logs and it says the compiler used is not compatible, Invalid probe found and skip analysis.

I am using GHS compiler to compile my project.

Is this the only way to setup connected mode?

Hello, thank you for coming back with the details about the compiler.

As far as I can tell, SonarQube does not support the GHS compiler (see list of supported compilers here).

Note that we have considered adding support for the GHS compiler a while ago, but it seems that they refused to give us access to the required documentation.