Reputation: 11
sonar doesn't launch cppcheck when I use sonar-runner. I'm using the last version off all (sonar, c++ community pluguin and sonar-runner) in ubuntu 12.04.
If someone has sonar working correctly with cppcheck (and the other plugins too, but now I only need cppcheck), tell me how please.
In the sonar dashboard of the project appears the number of lines of code, comments, quality index, technical debt,... and the rules compliance appears at 100% and it's not true, because the project has cppcheck errors. I'm sure that sonar doesn't launch cppcheck because running cppcheck takes 1-2 minutes, and sonar-runner shows 0ms in cppcheck section.
Thank you!
Upvotes: 1
Views: 4620
Reputation: 705
Though the documentation says otherwise, I couldn't trigger cppcheck analysis from sonar.
My solution was to launch cppcheck on its side, and then launch sonar-runner with report file parameter to import report to sonar dashboard:
sonar.cxx.cppcheck.reportPath=C:\...\cppcheck_report.xml
You may not need to precise this parameter if you generate the file at the expected place, WORKING_DIR/cppcheck-reports/ (not tested).
Upvotes: 6