Reputation: 76
When I run sonar-runner on a C++ project, it does not generate Lines of code count.
I'm using the Sonar C++ Community Plugin http://docs.codehaus.org/pages/viewpage.action?pageId=185073817
I'm not running any preprocessing prior to running the sonar-runner.
Do I need to run any preprocessing on the C++ code prior to run the sonar-runner?
I'm using:
Sonar: 3.5 Sonar-runner: 2.0 C++ Plugin: sonar-cxx-plugin-0.2.jar
sonar-project.properties:
# required metadata
sonar.projectKey=external:CS
sonar.projectName=CS3D
sonar.projectVersion=2.0.0
# optional description
sonar.projectDescription=Crystal Space 3D.
# path to source directories (required)
sonar.sources=plugins,libs,apps,mk
# path to test source directories (optional)
sonar.tests=engine/test
Upvotes: 1
Views: 464
Reputation: 5271
Unless you tell it otherwise Sonar goes ahead and assumes the project is a java project. For other languages you need to let it know...
So a starting point would be to add the following line:
sonar.language=c++
It should report the a lines of code count without any preprocessing.
Upvotes: 2