sonarqube + lombok = false positives

This case should be perfectly handled by SonarJava. Lombok annotations are taken into account at least since version 3.14 (SONARJAVA-1642). The issues you are getting are resulting from a misconfiguration of your Java project. No need to write any custom rules to handle this, this is natively supported by the analyzer. SonarJava reads bytecode to … Read more

integrating JaCoCo in sonar using Ant

The following is an ANT build that is configured to run a junit unit test and use jacoco for code coverage reporting. The results are uploaded to Sonar and finally ivy is used to download 3rd party jars and manage classpaths. Example ├── build.properties ├── build.xml ├── ivy.xml └── src ├── main │   └── java … Read more

New Integer vs valueOf

Integer.valueOf implements a cache for the values -128 to +127. See the last paragraph of the Java Language Specification, section 5.1.7, which explains the requirements for boxing (usually implemented in terms of the .valueOf methods). http://docs.oracle.com/javase/specs/jls/se7/html/jls-5.html#jls-5.1.7

How to configure multi-module Maven + Sonar + JaCoCo to give merged coverage report?

I was in the same situation as you, the half answers scattered throughout the Internet were quite annoying, since it seemed that many people had the same issue, but no one could be bothered to fully explain how they solved it. The Sonar docs refer to a GitHub project with examples that are helpful. What … Read more