I'm using Cppcheck to run analysis on my C++ project and then loading the results into SonarQube. SonarQube is showing the issues, but the technical debt shows 0.
How can I get the technical debt to show up correctly?
I'm running Cppcheck with this command:
"C:\Program Files (x86)\Cppcheck\cppcheck.exe" -v --enable=all --xml --xml-version=1 "C:\Users\tim\Documents\Visual Studio 2013\Projects\TestCpp" 2> cppcheck-TestCpp.xml
My sonar-project.properties file:
sonar.projectKey=TestCpp
sonar.projectVersion=1.0
sonar.projectName=Temp cpp Test
sonar.sources=.
sonar.language=c++
sonar.sourceEncoding=UTF-8
#Cppcheck
sonar.cxx.cppcheck.reportPath=cppcheck-*.xml
This is the test code I'm running it against:
int main()
{
// unused variable
int nTmp = 0;
// index out of bounds
char a[10];
a[10] = 0;
return 0;
}
SonarQube is showing 3 issues from this code and 0 technical debt. What else do I need to do to show the technical debt?
I'm running SonarQube version 4.4 and Sonar Runner version 2.3
I've run sonar-runner with debug logging and I'm not seeing any errors loading the Cppcheck results.
Cppcheck version 1.63
I should also mention this is using the C++ Community plugin version 0.9.0