[infinispan-dev] FindBugs on infinispan
Sanne Grinovero
sanne at infinispan.org
Fri Mar 20 07:57:14 EDT 2015
Same for Eclipse. I run it occasionally, but only the modules I'm working on.
If everyone could do the same, that helps ;-)
There is an option to get Maven to fail the build on specific
selectable categories; I've played with that in the past but I had the
impression that the annoyance level and maintenance overhead was a bit
too high compared to the benefits.
With Jenkins you can plot graphs, to make sure you have a general
trend of such problems to get lower over time.. and if I remember
correctly there also should be a way to have it reject a PR if the
threshold of code quality degradation is too high.
We do the same for CheckStyle on Hibernate ORM: not forcing an
absolute zero of violations (there's too much to fix!) but forcing a
trend of improvement.
See: http://ci.hibernate.org/view/ORM/job/hibernate-orm-4.3-h2/
-- Sanne
On 20 March 2015 at 11:39, Pedro Ruivo <pedro at infinispan.org> wrote:
> Hi,
>
> There is a findbugs pluging for IntelliJ.
>
> I run it against the classes I modified in the PR and solve the existing
> problems and avoid creating new ones.
>
> Pedro
>
> On 03/19/2015 04:16 PM, Jakub Markos wrote:
>> 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
>>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
More information about the infinispan-dev
mailing list