Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326807

Summary: FindBugs FixIt Challenge
Product: Community Reporter: David Carver <d_a_carver>
Component: Architecture CouncilAssignee: eclipse.org-architecture-council
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: bernhard.merkle, daniel_megert, gunnar, jeffmcaffer, mober.at+eclipse, remy.suen
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description David Carver CLA 2010-10-01 13:41:56 EDT
Taking a queue from the FindBugs FixIt challenge that Google went through, I think it would be a good if one milestone was devoted on a volunteer basis for Eclipse.org projects to see how many bugs they can fix.   The goal is to provide further stability for adopters, the more bugs we fix now, the less we have to deal with later.

In order to make this easy to run, and integrate with a build, I have created an Ant Build script that will do most of the heavy lifting for you.   It will automatically download the findbugs files, setup the ant task, and generate an XML report that Hudson can then display.   See:

http://dev.eclipse.org/viewcvs/index.cgi/sourceediting/development/athena/org.eclipse.wst.xml.xpath2.releng/buildUtils.xml?view=markup&root=WebTools_Project

The only thing each project would need to do is specify the exclusion list, and the location of where to scan the JAR or class files of it's particular files.

You can see an FindBugs report integrated with Hudson at:

https://hudson.eclipse.org/hudson/view/WTP/job/cbi-wtp-wst.xsl.psychopath/
Comment 1 Martin Oberhuber CLA 2010-10-08 07:20:47 EDT
Cool! 

From looking at the referenced script, I'm still wondering though... 
  - who calls the ant "findbugs" target ?
  - who takes the result "fb.xml" file and gives it to Hudson?
  - how would I specify the exclusion list or other findbugs configuration
    e.g. certain warnings that findbugs should ignore?
  - how do I tell findbugs what Jar's to scan for bugs (ie my own ones)
    versus what jar's it only needs for reference (ie my dependencies, such
    as base classes that I extend but don't want to scan)
Comment 2 David Carver CLA 2010-10-08 08:38:19 EDT
(In reply to comment #1)
> Cool! 
> 
> From looking at the referenced script, I'm still wondering though... 
>   - who calls the ant "findbugs" target ?

Can be added as part of a Continuous Integration build.   After the main build steps are done, setup a step in the Hudson configuration that runs the ant "findbugs" target.

Or setup a customTargets portion in a pde build.

>   - who takes the result "fb.xml" file and gives it to Hudson?

If run on Hudson, Hudson will scan for it using the FindBugs plugin. See http://wiki.hudson-ci.org/display/HUDSON/FindBugs+Plugin


>   - how would I specify the exclusion list or other findbugs configuration
>     e.g. certain warnings that findbugs should ignore?

Create a filter xml file:

http://findbugs.sourceforge.net/manual/filter.html

Then use the excludeFilter attribute on the findbugs task.

http://findbugs.sourceforge.net/manual/anttask.html


>   - how do I tell findbugs what Jar's to scan for bugs (ie my own ones)
>     versus what jar's it only needs for reference (ie my dependencies, such
>     as base classes that I extend but don't want to scan)

You specify the classLocation subelement.  In the ant script I created all the classes or jars that should be scanned are copied to to a specific folder and that folder is used to scan the byte code.

I also now have a configuration running for those using Maven that want to run the same items if they use Tycho and Maven 3 for their builds.

Bundle POM.xml (i.e. include relevant Findbugs plugins)
http://dev.eclipse.org/viewcvs/index.cgi/sourceediting/plugins/org.eclipse.wst.xml.xpath2.processor/pom.xml?view=markup&root=WebTools_Project

Running the following maven3 command will execute the findbugs portion:

mvn clean install verify

The verify goal is used to run findbugs, if verify is not specified then findbugs will not run during the build.
Comment 3 Eclipse Genie CLA 2014-12-18 03:33:24 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Eclipse Genie CLA 2016-12-10 10:39:39 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Eclipse Genie CLA 2018-12-06 12:43:59 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Dani Megert CLA 2018-12-10 10:47:00 EST
Please reopen if this is still an issue.