Question

I installed SonarQube and sonar-runner, and the web server seems to work just fine as I can browse it. I tried to keep things as simple as I could, I put the "sonar-project.properties" file in my project's source folder and gave . as the sonar.sources path. After doing so, the console output reported success and the web page listed my project and last analysis date, but when I went into the "Compare" tool to look at statistics it showed all items as blank, except for issues for which is displayed the number 0.

I edited the sonar-project.properties file to give the full path (instead of a relative current directory path of .) to my project's source code, replacing backslashes with forward slashes, and ran the sonar-runner command again from the command line while the working directory was the path of my source folder. It again reported success and when I reloaded the web page, it gave an updated last analysis date, but again no issues were reported and the statistics were all blank.

I have no idea what I'm doing wrong, the Sonar log only reports the installation and starting of the Windows service, and it doesn't indicate any problems. The StartNTService script starts the service without error, but the StartSonar script reports "jvm 1 | WrapperSimpleApp: Encountered an error running main: org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[-1]]". I don't know if that's relevant for the way I'm using SonarQube as a Windows service. I'm using pretty much all default configuration except I edited the sonar-runner.properties file by un-commented these lines:

sonar.host.url=http://localhost:9000
...
sonar.sourceEncoding=UTF-8

If anybody can help me figure out how to get this to work, I would greatly appreciate it. I am running Windows XP Pro x64 SP2 and Java 1.7.0_51 (32 bit). On my first attempt I did incorrectly use the 64 bit service install/launch scripts but when the console output indicated it didn't match the JVM architecture, I stopped and uninstalled the service and installed and launched the 32 bit service.

Edit: I'm using Sonarqube version 4.2 and Sonar-runner version 2.3.

Was it helpful?

Solution

By default, SonarQube is packaged with the Java ecosystem (Java, Checkstyle, PMD), but for C/C++ you will have to install one of the plugins that support analysis of these languages.

There is a commercial C++ plugin from SonarSource and a free Community Plugin.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top