<div dir="ltr">Hey!<div><br></div><div>I&#39;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).</div><div><br></div><div>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.</div><div><br></div><div>As the matter of fact I did the first step and installed Sonar on Openshift [2]. The installation was performed using this tutorial [3].</div><div><br></div><div>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?</div><div><br></div><div>Thanks</div><div>Sebastian</div><div><br></div><div>[1] <a href="http://www.sonarqube.org/">http://www.sonarqube.org/</a></div><div>[2] <a href="http://sonar-infinispansonar.rhcloud.com/">http://sonar-infinispansonar.rhcloud.com/</a></div><div>[3] <a href="https://forums.openshift.com/run-sonar-on-openshift">https://forums.openshift.com/run-sonar-on-openshift</a><br><br><div class="gmail_quote">czw., 19 mar 2015 o 17:16 użytkownik Jakub Markos &lt;<a href="mailto:jmarkos@redhat.com">jmarkos@redhat.com</a>&gt; napisał:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
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 &lt;0.5MB attachments):<br>
1. for the release-jars-analysis.html, only the 3 main jars from 7.2.0.Alpha1 were analyzed<br>
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<br>
<br>
In both cases, FindBugs complained that it couldn&#39;t find some imported classes, so the analysis may not be 100% complete.<br>
<br>
I didn&#39;t look through the actual results much, but for example it detected an infinite loop at [2], or a self-assignment at [3].<br>
<br>
If you want to run it yourself, you can use [4]. There is also a GUI, but I wasn&#39;t able to save the results into a html, and a maven<br>
plugin [5], but it only creates the results in an xml format for each module separately, so it&#39;s not very useful.<br>
<br>
Jakub<br>
<br>
[1] <a href="http://findbugs.sourceforge.net/" target="_blank">http://findbugs.sourceforge.<u></u>net/</a><br>
[2] <a href="https://github.com/infinispan/infinispan/blob/841c789a866745b8d48475f98acd51fa74b16f13/core/src/main/java/org/infinispan/context/impl/ImmutableContext.java#L95" target="_blank">https://github.com/infinispan/<u></u>infinispan/blob/<u></u>841c789a866745b8d48475f98acd51<u></u>fa74b16f13/core/src/main/java/<u></u>org/infinispan/context/impl/<u></u>ImmutableContext.java#L95</a><br>
[3] <a href="https://github.com/infinispan/infinispan/blob/841c789a866745b8d48475f98acd51fa74b16f13/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/transport/tcp/TcpTransportFactory.java#L90" target="_blank">https://github.com/infinispan/<u></u>infinispan/blob/<u></u>841c789a866745b8d48475f98acd51<u></u>fa74b16f13/client/hotrod-<u></u>client/src/main/java/org/<u></u>infinispan/client/hotrod/impl/<u></u>transport/tcp/<u></u>TcpTransportFactory.java#L90</a><br>
[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/<u></u>infinispan-embedded-7.2.0.<u></u>Alpha1.jar infinispan-7.2.0.Alpha1-all/<u></u>infinispan-embedded-query-7.2.<u></u>0.Alpha1.jar infinispan-7.2.0.Alpha1-all/<u></u>infinispan-remote-7.2.0.<u></u>Alpha1.jar<br>
[5] <a href="http://mojo.codehaus.org/findbugs-maven-plugin/" target="_blank">http://mojo.codehaus.org/<u></u>findbugs-maven-plugin/</a>______________________________<u></u>_________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/infinispan-<u></u>dev</a></blockquote></div></div></div>