You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2012/05/23 14:06:10 UTC

svn commit: r1341843 - /jackrabbit/oak/trunk/oak-jcr/pom.xml

Author: reschke
Date: Wed May 23 12:06:09 2012
New Revision: 1341843

URL: http://svn.apache.org/viewvc?rev=1341843&view=rev
Log:
OAK-37: add findbugs report (WIP)

Modified:
    jackrabbit/oak/trunk/oak-jcr/pom.xml

Modified: jackrabbit/oak/trunk/oak-jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/pom.xml?rev=1341843&r1=1341842&r2=1341843&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-jcr/pom.xml Wed May 23 12:06:09 2012
@@ -64,6 +64,16 @@
     </pluginManagement>
   </build>
 
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>findbugs-maven-plugin</artifactId>
+        <version>2.4.1-SNAPSHOT</version>
+      </plugin>
+    </plugins>
+  </reporting>
+
   <dependencies>
     <!-- Optional OSGi dependencies, used only when running within OSGi -->
     <dependency>



Re: findbugs

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Wed, May 23, 2012 at 3:01 PM, Julian Reschke <ju...@gmx.de> wrote:
> On 2012-05-23 14:55, Jukka Zitting wrote:
>> Do we really need a SNAPSHOT version of the FindBugs plugin, or is the
>> latest release good enough?
>
> That's what <http://mojo.codehaus.org/findbugs-maven-plugin/usage.html>
> suggested. I can use the latest stable release instead if that's
> preferrable.

Yes, let's switch to a release. The SNAPSHOT on the plugin web site is
probably just coming from the fact that they generated the site from
the latest trunk checkout.

>> Did you already figure out a way for us to integrate FindBugs checks
>> to to the test phase of the build so we could fail the build if
>> explicitly enabled FindBugs checks fail?
>
> I haven't looked at this yet, and I'm a bit worried that this would open a
> can of worms with respect to coding style. There will always be a few false
> positives, and we would need a way to keep track of them.

Yeah, we definitely don't want a generic FindBugs check causing build
failures, the false-positive rate is way too high.

What I was thinking instead is selectively enabling only those checks
that we agree are useful and don't require too much tracking of false
positives. For example once all the @CheckForNull cases are covered,
we could enable that specific check for the build so that nobody
accidentally breaks that rule again down the line.

BR,

Jukka Zitting

Re: findbugs

Posted by Julian Reschke <ju...@gmx.de>.
On 2012-05-23 14:55, Jukka Zitting wrote:
> Hi,
>
> On Wed, May 23, 2012 at 2:15 PM, Julian Reschke<ju...@gmx.de>  wrote:
>> ...with the change below, findbugs can be run in oak-jcr with
>>
>>   mvn findbugs:findbugs
>>
>> ...leaving an XML file in ./target. There's also
>>
>>   mvn findbugs:gui
>>
>> for those who prefer point-and-click.
>
> Nice!
>
> Do we really need a SNAPSHOT version of the FindBugs plugin, or is the
> latest release good enough?

That's what <http://mojo.codehaus.org/findbugs-maven-plugin/usage.html> 
suggested. I can use the latest stable release instead if that's 
preferrable.

>> Should we add this globally?
>
> Sounds like a useful thing to have, so +1 to adding it to the parent POM.

Ack.

> Did you already figure out a way for us to integrate FindBugs checks
> to to the test phase of the build so we could fail the build if
> explicitly enabled FindBugs checks fail?
> ...

I haven't looked at this yet, and I'm a bit worried that this would open 
a can of worms with respect to coding style. There will always be a few 
false positives, and we would need a way to keep track of them.

Best regards, Julian

Re: findbugs

Posted by Julian Reschke <ju...@gmx.de>.
On 2012-05-23 15:17, Thomas Mueller wrote:
> Hi,
>
> +1 to adding it to the parent POM.
>
>> Did you already figure out a way for us to integrate FindBugs checks
>> to to the test phase of the build so we could fail the build if
>> explicitly enabled FindBugs checks fail?
>
> Would it be possible (until we have more experience) to only *log*
> warnings where enabled FindBugs checks fail?

Right now we're running the default config of FindBugs, and the output 
already is logged (but to an output file in ./target).

It *does* log the number of warnings to the console, though.

On my relatively old desktop machine, this takes ~1min for all the oak 
sub projects; not sure whether we want to add this by default?

Best regards, Julian

Re: findbugs

Posted by Thomas Mueller <mu...@adobe.com>.
Hi,

+1 to adding it to the parent POM.

>Did you already figure out a way for us to integrate FindBugs checks
>to to the test phase of the build so we could fail the build if
>explicitly enabled FindBugs checks fail?

Would it be possible (until we have more experience) to only *log*
warnings where enabled FindBugs checks fail?

Regards,
Thomas


Re: findbugs

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Wed, May 23, 2012 at 2:15 PM, Julian Reschke <ju...@gmx.de> wrote:
> ...with the change below, findbugs can be run in oak-jcr with
>
>  mvn findbugs:findbugs
>
> ...leaving an XML file in ./target. There's also
>
>  mvn findbugs:gui
>
> for those who prefer point-and-click.

Nice!

Do we really need a SNAPSHOT version of the FindBugs plugin, or is the
latest release good enough?

> Should we add this globally?

Sounds like a useful thing to have, so +1 to adding it to the parent POM.

Did you already figure out a way for us to integrate FindBugs checks
to to the test phase of the build so we could fail the build if
explicitly enabled FindBugs checks fail?

BR,

Jukka Zitting

findbugs

Posted by Julian Reschke <ju...@gmx.de>.
...with the change below, findbugs can be run in oak-jcr with

   mvn findbugs:findbugs

...leaving an XML file in ./target. There's also

   mvn findbugs:gui

for those who prefer point-and-click.

Should we add this globally?

Best regards, Julian

On 2012-05-23 14:06, reschke@apache.org wrote:
> Author: reschke
> Date: Wed May 23 12:06:09 2012
> New Revision: 1341843
>
> URL: http://svn.apache.org/viewvc?rev=1341843&view=rev
> Log:
> OAK-37: add findbugs report (WIP)
>
> Modified:
>      jackrabbit/oak/trunk/oak-jcr/pom.xml
>
> Modified: jackrabbit/oak/trunk/oak-jcr/pom.xml
> URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/pom.xml?rev=1341843&r1=1341842&r2=1341843&view=diff
> ==============================================================================
> --- jackrabbit/oak/trunk/oak-jcr/pom.xml (original)
> +++ jackrabbit/oak/trunk/oak-jcr/pom.xml Wed May 23 12:06:09 2012
> @@ -64,6 +64,16 @@
>       </pluginManagement>
>     </build>
>
> +<reporting>
> +<plugins>
> +<plugin>
> +<groupId>org.codehaus.mojo</groupId>
> +<artifactId>findbugs-maven-plugin</artifactId>
> +<version>2.4.1-SNAPSHOT</version>
> +</plugin>
> +</plugins>
> +</reporting>
> +
>     <dependencies>
>       <!-- Optional OSGi dependencies, used only when running within OSGi -->
>       <dependency>
>
>
>