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
973 stars 360 forks source link

Unable to run sonar-scanner with cppdepend #2687

Open taheri1395 opened 1 month ago

taheri1395 commented 1 month ago

Hi

Currently running SonarQube Data Center edition version 10.4.1, CppDepend version 2024.1, Sonar Scanner version 5.0.1 on Windows 10 machine. Installed plugins are “sonar-cxx-cppdepend-community-1”. I have created myproject.csproj files and I integrated this sonar with cppdepend and active all rules in sonarqube.

I want to run sonar-scanner with this command, It is running successfully but this is not getting files or lines of code:

sonar-scanner.bat -D"sonar.token=***" -D"sonar.projectKey=test" -D"sonar.cpp.cppdepend.projectPath="C:\user\Demo.cdproj"

It seems that it does not recognize the -D sonar.cpp.cppdepend.projectPath command.

Please help me handle this problem.

guwirth commented 1 month ago

Hi @taheri1395,

Please ask Cppdepend for help: https://www.cppdepend.com/documentation/sonarqube-community-integration-cppdepend

For SQ 10.4 you have to use https://github.com/SonarOpenCommunity/sonar-cxx/releases/tag/cxx-2.2.0-beta.2, see compatibility matrix https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Compatibility-Matrix.

The cxx configuration supports only these configuration settings https://github.com/SonarOpenCommunity/sonar-cxx/wiki/CXX-Analysis-Parameters.

Hope that helps!

Regards,