Which SonarScanner to choose for C and C++ code

Hi,

I want to run my C and C++ code on Sonarqube 7.9.2 version. But I am bit confuse whether to use SonarScanner CLI or SonarScanner MSBuild. Can anyone tell me which one should I go for?

Hi @KajalKumari,

what kind of project do you have? On which OS? Is it a pure C/C++ project?

Hi @mpaladin ,

Thankyou for your quick response, My project is a combination of C and C++. I am working on Windows, 64 bit.

Hi @KajalKumari,

is it a Visual Studio project?

Hi @mpaladin,

No, it’s eclipse project. Does it give any issue? Moreover, I want to ask could I can run a part of my project on Sonarqube instead of full project?

Hi @KajalKumari,

then you should simply use sonar-scanner CLI and follow the documentation: C/C++/Objective-C | SonarQube Docs.

What is the reason for that?

Hi @mpaladin ,

Currently I have only a part of the project, which I want to run, and it will take much time for me to port full project in my system. So, could I run a part of project on it?

Hi @KajalKumari,

as long as you can build your project (a requirement to analyze C/C++ projects) you can analyze what part you want, you can have a look at this page: Narrowing the Focus | SonarQube Docs.

1 Like