[infinispan-dev] FindBugs on infinispan

Sebastian Łaskawiec sebastian.laskawiec at gmail.com
Fri Mar 20 05:48:17 EDT 2015


Hey!

I'm thinking about some other approach for static code analysis - SonarQube
[1]. Apart from FindBugs it performs also PMD and visualizes test coverage
(typically measured by Jacoco).

Sonar analysis could be performed once day in separate TeamCity job. This
way we would have an insight how the number of violations changed over the
time.

As the matter of fact I did the first step and installed Sonar on Openshift
[2]. The installation was performed using this tutorial [3].

All we need to do now is to create a TeamCity job and introduce Sonar
plugin into the code. Would you like to help me with this?

Thanks
Sebastian

[1] http://www.sonarqube.org/
[2] http://sonar-infinispansonar.rhcloud.com/
[3] https://forums.openshift.com/run-sonar-on-openshift

czw., 19 mar 2015 o 17:16 użytkownik Jakub Markos <jmarkos at redhat.com>
napisał:

> Hi,
>
> out of curiosity, I ran FindBugs [1] (java static analysis tool) on
> infinispan. Attached are 2 output files (compressed, because the mailing
> list accepts only <0.5MB attachments):
> 1. for the release-jars-analysis.html, only the 3 main jars from
> 7.2.0.Alpha1 were analyzed
> 2. for the project-jars-analysis.html, I took all jars that were present
> in the infinispan project directory after a build (except the test jars) -
> this one has therefore more findings
>
> In both cases, FindBugs complained that it couldn't find some imported
> classes, so the analysis may not be 100% complete.
>
> I didn't look through the actual results much, but for example it detected
> an infinite loop at [2], or a self-assignment at [3].
>
> If you want to run it yourself, you can use [4]. There is also a GUI, but
> I wasn't able to save the results into a html, and a maven
> plugin [5], but it only creates the results in an xml format for each
> module separately, so it's not very useful.
>
> Jakub
>
> [1] http://findbugs.sourceforge.net/
> [2] https://github.com/infinispan/infinispan/blob/
> 841c789a866745b8d48475f98acd51fa74b16f13/core/src/main/java/
> org/infinispan/context/impl/ImmutableContext.java#L95
> [3] https://github.com/infinispan/infinispan/blob/
> 841c789a866745b8d48475f98acd51fa74b16f13/client/hotrod-
> client/src/main/java/org/infinispan/client/hotrod/impl/transport/tcp/
> TcpTransportFactory.java#L90
> [4] bin/findbugs -maxHeap 4000 -effort:max -textui -progress -release
> infinispan -html -output infinispan-findbugs-analysis -onlyAnalyze
> org.infinispan.- infinispan-7.2.0.Alpha1-all/infinispan-embedded-7.2.0.Alpha1.jar
> infinispan-7.2.0.Alpha1-all/infinispan-embedded-query-7.2.0.Alpha1.jar
> infinispan-7.2.0.Alpha1-all/infinispan-remote-7.2.0.Alpha1.jar
> [5] http://mojo.codehaus.org/findbugs-maven-plugin/
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20150320/66ddda5c/attachment.html 


More information about the infinispan-dev mailing list