VSCode Sonarlint C: Follow current branch in git

Using a fresh installation of Sonarqube 8.9 (Development license) with vscode 1.56.2 and sonarlint 1.22.0 I’m trying to setup a toolchain for sonarlint in a “dev container: C++”.

Turning on all the debug message it seems to me sonarlint is not following the current git branch I’m working on. It does get a 200 Response from the sonarqube api, but that is empty. Manually adding the branch name to the request will show up more information (cannot check if it would work with that information, but it is not empty anymore).

The compiler toolchain runs with CMAKE and ninja, and the scanner-cli is able to scan, upload and show some flaws. I can see the flaws on the website, but not in the codebase.
I was expecting seeing the flaws as highlighted lines in the code.

2 Likes

Hello, welcome to the community! And thank you for you question.

Analysis of C++ is not supported yet in SonarLint for VSCode, please feel free to add your voice to the feature request.

Correct support for branches/SCM information is definitely something that we want to tackle. It is not quite the top priority right now :slight_smile: but it’s on the roadmap for this year.

1 Like

Hello @aldagm ,

SonarLint for Visual Studio Code now support C and C++.

you can check the detailed announcement here: SonarLint for Visual Studio Code 3.4 released - Support for C and C++

Looking forward to receiving your feedback.

Thanks,

A post was split to a new topic: C++ analysis not working