Setting up analysis tool is rather easy, the hard part is to get people
look into the results and fix what's wrong. And if noone does it, even
setting it up is wasted time.
my 2c
Radim
On 03/20/2015 10:48 AM, Sebastian Łaskawiec wrote:
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(a)redhat.com
<mailto:jmarkos@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/841c789a866745b8d48475f98ac...
[3]
https://github.com/infinispan/infinispan/blob/841c789a866745b8d48475f98ac...
[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(a)lists.jboss.org <mailto:infinispan-dev@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/infinispan-dev
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev