名前 |
FindBugs plugin |
---|---|
バージョン |
2.0 |
Product Versions |
2.1.x - 2.2.x |
Author(s) |
|
maintainer |
|
価格 |
Free |
License |
|
JavaDocs |
|
IssueTracking |
http://jira.atlassian.com/browse/FNDBUG |
Subversion URL |
|
Download JAR |
Description/Features
A plugin that will parse and record FindBugs reports
用途
- Copy the file into your <BAMBOO_HOME>/webapp/WEB-INF/lib directory and restart Bamboo
- In the configuration of your plan, there should be a new FindBugs section on the 'Builder Configuration' tab. Here you can specify whether your plan generates FindBugs reports, and if so, the location of the XML report file.
- The plugin will also work with maven-findbugs-plugin (recommended)
- That should be it, you should now see a FindBugs tab on your Plan and on any new builds that generate FindBugs report files.
スクリーンショット
スクリーンショット |
||
---|---|---|
![]() |
![]() |
![]() |
34 Comments
MarkC
Sept 03, 2007Stephan,
Mate that's awesome! I'll try to check it out soon, but it looks neat regardless.
Cheers,
Mark C
Val Tarsayuk
Nov 16, 2007I'm having problems getting this plugin to work.
It installs fine, and I can see that it accesses the maven-generated findbugs.xml file. But the results all display as 0 bugs, even though there are bugs recorded in the xml file. These 0 values appear as such in the database, so I believe the problem is somewhere near the initial parsing phase.
I am using Bamboo 1.2.4.
Thanks,
Val Tarasyuk
Made Mastika
Jan 24, 2008Hi Val,
The problem with the previous version is that it will only read findbugs xdoc generated report which is not what FindBugs output by default. The issue has been addressed in 1.1.0 release and now it should be able to pick up the result in either xdoc or it's default xml format. I recommend you to use maven-findbugs-plugin so it'll take most of the burdens away (writing up those jelly scripts as well as compatibility with maven 2) from you. Just specify **/target/* in the output destination field, and it should work properly.
Please leave us some feedback on how to improve it.
Cheers,
Made
Janusz Gorycki
Mar 06, 2008The problem I was having with this plugin was that it only failed builds on a delta. Which made it not detect findbugs problems introduced together with other causes of build breakage. Also, it was possible to make a build "green" by simply re-running a failed build. This patch makes bamboo fail a build if there are any findbugs violations present. For an anal-retentive project manager like me, this is a must
S
Feb 26, 2009I have a related problem that following a broken build (which wrongly records 0 findbugs errors) the next sucessful build records a delta now that findbugs has ran and recorded the actual number of errors.
This is a problem since we've set our builds to fail when deltas are found.
S
Apr 29, 2008Many thanks for releasing an updated findbugs plugin for Bamboo, I was waiting on this before migrating to Bamboo 2.
However, on my Bamboo installation the findbugs artifact copier is failling with the message "FindBugs plugin is not run because the build has failed". This is wrong, as the build has succeeded. Do you have any hints at resolving this?
Stanislaw Osinski
May 09, 2008Hi,
I have exactly the same problem Stephen reported (running Bamboo 2.0.1)... I'd love to have FindBugs reports integrated, looking forward to a patch.
Cheers,
Stanislaw
Philip L. McMahon
May 24, 2008I experienced the "build has failed" bug with the 2.0-beta1 version, so I tried with the current code in trunk (revision 19480). I'm not a Java developer so hopefully someone with more experience can take a look at this and check my work.
I believe there are two bugs which are contributing to the issue, both in thecom.atlassian.bamboo.plugins.findbugs.FindBugsBuildProcessor class. The first is on line 97 of the source, where the currentBuildState is initially assigned – the object ends up equal to null. I'm not sure why that's happening; maybe a Bamboo developer can add some insight as to the cause.
The second issue is on line 102, where the currentBuildState object is checked for success. I believe this line should use the equals() method for comparison of the two objects.
As a test (but not a fix), I commented out the state check and the FindBugs plugin worked as expected.
Philip L. McMahon
May 24, 2008I also found a bug in com.atlassian.bamboo.plugins.findbugs.actions.ViewFindBugsBuildResults, revision 19480. The serializeCsv() method can throw an uncaught NoSuchElementException on line 132 when processing a line such as "class,1,,TYPE" (where the source field is empty). I believe the StringTokenizer is skipping the empty field when parsing.
I'm attaching two patches: one for my previously mentioned "fix" for the "build has failed" bug, and one to address the CSV parsing bug.
For the StringTokenizer bug, I converted the code to use String object's split() method as suggested by the Sun 1.4.2 docs for StringTokenizer.
Stanislaw Osinski
May 24, 2008I've not gone very deeply into Bambo API, but it looks like the FindBugsBuildProcessor is invoked _during_ the build, which would mean the build status is not known yet, hence the null value (I may be wrong though -- the API says it's the partial build result...). Anyway, your "fix" might actually be a fix (without quotes
. Another hint that could confirms this reasoning is the <skipIfFailed>true</skipIfFailed> entry in the config file, which seems to do the job of the condition in the code.
Philip -- would it be possible for you to somehow make the binary you compiled available? I'd love to use this plugin without investing 2h into compiling it from sources
Thanks!
Philip L. McMahon
May 27, 2008Stanislaw (and others who are interested): I attached my patched build of the FindBugs plugin to this thread.
Stanislaw Osinski
May 27, 2008The plugin works great now, thanks Philip!
DouglasA
Jul 10, 2008Hi,
I am using the plugin, and I can see the violations graph (first screenshot above). How do I get to the other charts/tables (screenshots 2 & 3)?
Thanks!
Dushan Hanuska
Jul 10, 2008The second screenshot is a FindBugs Violation Change By Author report, which you'll find under Reports.
The third screenshot is a tab of FindBugs page when you look at a specific build that produced FindBugs data.
Stanislaw Osinski
Jul 14, 2008Hi there,
It looks like enabling this plugin is causing the issue as below. Have you experienced anything similar?
Cheers,
Staszek
When I try to generate any report (e.g. Build Activity) for All builds or Last 90 days (did not check range), I'm getting an exception as pasted below. Reports work fine for smaller ranges, i.e Last 30 and 7 days.
Version: 2.0.5
Build: 807
Build Date: 24-Jun-2008
Stack Trace:
java.lang.IllegalArgumentException: Invalid complete key specified: null
at com.atlassian.plugin.ModuleCompleteKey.(ModuleCompleteKey.java:17)
at com.atlassian.plugin.DefaultPluginManager.getPluginModule(DefaultPluginManager.java:343)
at com.atlassian.bamboo.v2.build.trigger.TriggerReasonManagerImpl.getTriggerReason(TriggerReasonManagerImpl.java:32)
at com.atlassian.bamboo.index.BuildResultsSummaryDocumentFactory.getBuildResultsSummary(BuildResultsSummaryDocumentFactory.java:155)
at com.atlassian.bamboo.resultsummary.search.IndexedBuildResultsSearcherImpl.search(IndexedBuildResultsSearcherImpl.java:52)
at com.atlassian.bamboo.resultsummary.search.IndexedBuildResultsSearcherImpl.search(IndexedBuildResultsSearcherImpl.java:36)
at com.atlassian.bamboo.ww2.actions.reports.ViewReport.runReport(ViewReport.java:130)
at com.atlassian.bamboo.ww2.actions.reports.ViewReport.doGenerate(ViewReport.java:122)
at sun.reflect.GeneratedMethodAccessor1798.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
[snip]
Dushan Hanuska
Jul 14, 2008Hi Staszek,
Would you mind to create a bug at http://jira.atlassian.com/browse/FNDBUG project? You can attach the log file and provide more details there as well.
Thanks,
Dushan
Stanislaw Osinski
Jul 15, 2008Good point! I've filed the issue here:
http://jira.atlassian.com/browse/FNDBUG-21\\
Cheers,
Staszek
James Bunt
Aug 11, 2008I notice this project is in active development through your Jira page - when can we expect a version compatible with 2.1?
Just upgraded to Bamboo 2.1 and really miss this plugin already
Dushan Hanuska
Aug 11, 2008Well, it really depends on how much of my free time or my 20% project time I can spend on this, as this plugin is not supported or actively developed by Atlassian. At the moment I do not have much spare time. Please let me know if you can or are willing to contribute.
Auvigne Lilians
Aug 11, 2008The trunk version works fine on bamboo 2.1.
I can release it.
Cheers.
Lilians
James Bunt
Aug 11, 2008That would be fantastic, thanks!
Richard Neale
Sept 04, 2008Two days ago, I pulled from Trunk, built and installed the plugin and I am still seeing the: FindBugs plugin is not run because the build has failed. The build was sucessful. Any further developments in this area ? Note, FindBugs was not run in this build plan. Final comment, Where is the mentioned patch for this and the parsing error reported ?
Dushan Hanuska
Sept 05, 2008There has not been any work done on this for some time. I will spend some of my 20% on this next week.
Auvigne Lilians
Sept 05, 2008The patch of this following issue solved this problem. http://jira.atlassian.com/browse/FNDBUG-18
Cheers
Lilians
Jürgen Moßgraber
Sept 08, 2008The following text is from the Checkstyle plugin comments and the error also effects the Findbugs plugin:
Don't know where to post this bug, but there are issues (NumberFormatException), when you try to generate statistics, while the checkstyle plugin is active. (Unfortunately this effects all statistics - not only the checkstyle statistics).
These only happen under (for instance) a german locale.
To fix go to CheckstyleIndexReader.addBuildToSummary(..) and change the line:
double violations = Double.parseDouble(s);
to
double violations = NumberUtils.stringToDouble(s);
This is needed because in the PostBuildIndexWriter the NumberUtils.padWithZeros(..)-method is used, which respects the current locale (and generates strings like "000001234,00"). A simple Double.parse() thus is not enough.
The Findbugs plugin needs to be fixed in the following locations:
FindBugsLineRateViolationCollator Line 51:
violations += NumberUtils.stringToDouble(buildData.get(name));
TimePeriodFindBugsDeltaCollater Line 40:
totalDelta += NumberUtils.stringToDouble(violations) / (double) getAuthorCount(results);
IndexReader , Line 60:
NumberUtils.stringToDouble(s);
also in the catch-clause adding a "?" is a bad idea because it will crash later on again with a NumberFormatException, maybe use "0".
Auvigne Lilians
Sept 08, 2008It's solved in http://jira.atlassian.com/browse/FNDBUG-23 and http://jira.atlassian.com/browse/FNDBUG-25
Only for the trunk version.
No ?
Cheers
Jürgen Moßgraber
Sept 09, 2008No. These are totally different bugs.
abed
Sept 10, 2008hi,
can anyone help configure bamboo to read the XML file that generated by the bamboo ant plan
iam having a problem configuring the path to the xml file
is there an example of the path
thanks
abed
Sept 14, 2008hello
i've wondering if bamboo-findbugs-plugin-2.0-beta.jar is compatible with bamboo 2.1.1 build 1001 cause there is no data appear in the findbugs tap after the ant is completed successfully and with this message "FindBugs plugin is not run because the build has failed"
note the path to the xml result is also configured
cheers
Jürgen Moßgraber
Oct 15, 2008Use the new JAR file from above.
Thomas Landgraf
Aug 21, 2009Hi there,
with Bamboo 2.3 we get the error:
Thomas
Bartosz Burchard
Sept 25, 2009We have the same error with Bamboo 2.3.1
Jürgen Moßgraber
Oct 06, 2009I adapted the code to Bamboo 2.3.1. If someone can give me write access to the repository I would like to check it in.
Asgeir S. Nilsen
Oct 30, 2009Strangely the 2.0 version works fine for our 2.4.0 installation. We use it in a Maven build with the org.codehaus.mojo:findbugs-maven-plugin.