SonarOpenCommunity / sonar-cxx

SonarQube C++ Community plugin (cxx plugin): This plugin adds C++ support to SonarQube with the focus on integration of existing C++ tools.
GNU Lesser General Public License v3.0
987 stars 363 forks source link

unable to display cppcheck results in sonarqube #2183

Closed chaithanyareddyk closed 3 years ago

chaithanyareddyk commented 3 years ago

Hi Team, we want to import our cppcheck results to sonarqube, Issues1: our source code contains C/C++ and we are installed sonar cxx plugin, after installation we are tried scan our code we are able to see .C files but unable to display c projects, we are created Quality profile for C++.

Issue2: we are unable to import cppcheck results in sonarqube. sonar. properties sonar.projectKey=test projectKey sonar.cxx.file.suffixes=.cxx,.cpp,.cc,.c,.hxx,.hpp,.hh,.h sonar.c.file.suffixes=- sonar.cpp.file.suffixes=- sonar.objc.file.suffixes=- sonar.cxx.metric.api.file.suffixes=.hxx,.hpp,.hh sonar.cxx.suffixes=.cxx,.cpp,.cc sonar.cxx.cppcheck.reportPaths=report.xml sonar.c.cppcheck.reportpaths=report.xml Help us to resolve this issue.

guwirth commented 3 years ago

Hi @chaithanyareddyk,

which version of the plugin are you using?

Hints for 2.0:

Regards,

chaithanyareddyk commented 3 years ago

Hi @chaithanyareddyk,

which version of the plugin are you using?

Hints for 2.0:

Regards,

Hi Guwirth we are using sonarcxx plugin version : version is 2.0.1 (build 2678). cppcheck: 1.63

chaithanyareddyk commented 3 years ago

we are unable to display cppcheck results to sonarqube kindly help us

guwirth commented 3 years ago

Hi @ chaithanyareddyk,

did you try it with the sample project? https://github.com/SonarOpenCommunity/sonar-cxx/tree/master/integration-tests/testdata/hello_world How to is here: https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Scan-Source-Code

In case there are still problems we need more information. Turn debug info on and provide the resulting LOG file: https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Get-Debug-Information

Regards,

guwirth commented 3 years ago

Hi @chaithanyareddyk, is it working? Can I close this issue?

chaithanyareddyk commented 3 years ago

Hi Sir

Thanks for your response, we can able to display cppcheck results to sonarqube. But i have one doubt, we are using this command to generate cppcheck report.xml file cppcheck --xml-version=2 . 2> report.xml, when we are verifying the report.xml file we found error message like

Do we need to take any action here? i am new to cppcheck, is cppcheck analyze every thing? how can i check ?

guwirth commented 3 years ago

Hi @chaithanyareddyk,

the message you get is missing? For Cppcheck support ask in their forum please: http://cppcheck.sourceforge.net/.

Regards,

chaithanyareddyk commented 3 years ago

Thank you sir , For Support.

chaithanyareddyk commented 3 years ago

Thank you