SonarQube 4.3 in Java 8 not showing any Issues - sonarqube

I'm running SonarQube 4.3 in Java 8 and it's not showing any numbers in Issues, Technical Debt and not showing any numbers in Blocker, Critical, etc. I've a gradle project with jacoco plugin and gradle sonarRunner runs fine and generates Unit Tests Coverage and Integration Tests Coverage. Also Java plugin is updated to 2.2.1. Thanks.

As you can see on the Requirements page, Java 8 as a runtime is not fully supported yet, so that might explain some issues you encounter.
You should try to use Java 7 to see if the problem comes from the runtime or from some configuration issues.

Related

SonarQube Configuration

We had recently implemented SonarQube in our team and we have a dashboard configured
We've been able to see some of the details but the line coverage and code coverage is 0 always
Can you advise what we're missing ? I've checked the configuration and all of it seems to be in place
Assuming the latest SonarQube version, note that, as mentioned in this thread
Version 5.12 of our SonarJava analyzer deprecated use JaCoCo’s binary format (.exec files) to import coverage.
As a replacement, we developed the sonar-jacoco plugin, which imports JaCoCo’s XML coverage report, and this is the preferred option now. I
That page illustrates how to include those reports for a maven or a gradle project. Again, it depends on the nature of your projects.

How do I get SonarQube to count spock/groovy unit tests?

I am trying to configure SonarQube to report an accurate count of the unit test cases in my repository, currently it is only showing the java jUnit test cases.
SonarQube reports the java jUnit test count as well as the overall coverage from jacoco which includes both java and groovy coverage.
How do I get SonarQube to recognize the groovy/spock unit tests in the overall count?
SonarQube 7.7 (I see the issue on 7.4 as well)
I am not sure if there is a specific sonar property I need to set in my Gradle configuration or if there is a plugin in SonarQube itself I need to install?
I do see some related answers about installing the Groovy plugin in SonarQube however there is no mention as to which version of SonarQube this is a solution for (I no longer see this plugin as available)
The marketplace had been missing the Groovy plugin for quite some time. A new version has just been released!
Simply installing the plugin that is available on the Marketplace solved this problem.
https://github.com/pmayweg/sonar-groovy

SonarQube no longer reporting test coverage from jacoco

SonarQube does no longer show test coverage for my project which is analyzed with jacoco. It seems there was an update on SonarQube (I found new rules dates May 19). I assume it also since then that the test coverage gathered with jacoco maven plugin is no longer evaluated. I've seen older questions with a similar issue, but that was 4 years ago:
JaCoCo SonarQube incompatible version 1007
I updated my POM to the latest plugin version 0.8.4 but to no avail. Any ideas where I need to change something so this works again?
I had exactly the same problem. The problem was that they deprecated the jacoco.exec file and now you have to use the XML format.
To use the new format you only have to install the official jacoco plugin in Sonarqube and everything it's going to work again without any more changes.

Using Analysis Tools on SonarQube not containing in the Java Ecosystem Plugin

I'm setting up a project environment for a bigger Java project and plan to use SonarQube with PMD, Findbugs and JaCoco. Theses tools are already included in SonarQube with the Java Ecosystem Plugins, but not all the new versions are supported.
In specific, PMD has only support for version 4.3 (http://docs.codehaus.org/display/SONAR/PMD+Plugin), which is 2 years old now. Is there any possibility to install/use the newest version of PMD with SonarQube?
The answer is no.
For your information, you shouldn't need to use PMD anymore. See http://www.sonarqube.org/already-158-checkstyle-and-pmd-rules-deprecated-by-sonarqube-java-rules/.
You can also follow and vote for http://jira.codehaus.org/browse/SONARJAVA-26

Jacoco w/ Jetty + Selenium RC

I come back here because I have some kind of problem. (I posted 2 or 3 questions before about a project I'm working on, this question is still related to this project)
So I have a smartGWT webapplication which I build using Maven. To unit test it, I had to use Selenium RC (to be able to use the user-extensions.js provided by smartClient), and as it must be compatible with the continuous integration, I had to deploy the webapp on a Jetty container. Now I only got one problem left :
How can I use Jacoco with Jetty to make Sonar recognize my tests and give me code coverage ?
Is there a property in the jetty-maven-plugin that allows me to run the jacoco-agent each time the application is deployed ?
Thanks in advance, one more time =)
(Sorry for my bad english)
It seems that your only option is the cargo plugin.
As described in the link to the duplicated question Jetty is executed in the same JVM as Maven.
So if JVM options are not possible you have to use the cargo plugin.
The maven-jetty-plugin has recently added support for running jetty in a separate JVM, ala cargo, so you might be in luck: http://jira.codehaus.org/browse/JETTY-991. Otherwise you can use cargo (that is what I do).

Resources