import.css=^tan_deck.css
名前 |
CheckStyle plugin |
|---|---|
バージョン |
2.2 |
Product Versions |
2.0.x and Higher |
Author(s) |
|
Maintainer(s) |
|
homepage |
http://confluence.atlassian.com/display/BAMEXT/CheckStyle+Plugin |
価格 |
Free |
License |
|
IssueTracking |
|
Subversion URL |
https://svn.atlassian.com/svn/public/contrib/bamboo/bamboo-checkstyle-plugin/trunk/ |
Fisheye URL |
http://svn.atlassian.com/fisheye/browse/public/contrib/bamboo/bamboo-checkstyle-plugin |
Download JAR |
Description/Features
A plugin that will parse and record CheckStyle
reports
用途
- Copy the bamboo-checkstyle-plugin-2.2.jar
file into your <BAMBOO_HOME>/webapp/WEB-INF/lib directory and restart Bamboo.
Think to remove the old version. - In the configuration of your plan, there should be a new CheckStyle section on the 'Builder Configuration' tab. Here you can specify whether your plan generates CheckStyle reports, and if so, the location of the XML report file.
- New in version 2.2, You can configure an error or warning threshold which fail the build when checkstyle error/warnings exceed it
- That should be it, you should now see a CheckStyle tab on your Plan and on any new builds that generate CheckStyle report files.
バージョンの互換性
Compatibility of Checkstyle Plugin versions (side) versus Bamboo versions (top).
|
1.0-1.0.4 |
1.0.5 |
1.1-1.1.2 |
1.2-1.2.4 |
2.0-2.0.x |
2.1.x |
2.2.x |
|---|---|---|---|---|---|---|---|
1.0-1.0.1 |
|
|
|
|
|
|
|
2.x |
|
|
|
|
|
|
|
= compatible
= not compatible
= compatibility unknown
Version History
バージョン |
日付 |
説明 |
|---|---|---|
2008 年 5 月 18 日 |
Applied patch by Nicky Sandhu BCHKSTYL-16 : Fail build when checkstyle error/warnings exceed a threshold |
|
September 9th 2008 |
Bugs fixing, see below |
|
August 6th 2008 |
Bamboo 2.1 migration, Unifying the Look and Feel with the findbugs plugin, add Href on report maven 2 , and fixed bug |
|
Jully 4th 2008 |
Bamboo 2.0 migration |
|
1.0.0 |
August 30th 2007 |
initial version |
1.0.1 |
2007 年 10 月 29 日 |
fix reported bugs |
2.3
2.2
2.1
2.0
Fix of version Bamboo 2.0-beta1
スクリーンショット
スクリーンショット |
||
|---|---|---|
|
|
|
|
30 Comments
Peter Johnstone
Sept 05, 2007This look like just what we need, but I can't get it to pick up the checkstyle results. The project I'm using to test the plugin has ten checkstyle errors, but the graphs generated show zero errors. I'm pointing the plug in to the checkstyle-result.xml file (**/target/checkstyle-result.xml) is this the correct file?.
Stephan Paulicke
Sept 05, 2007hi,
the plugin uses the standard atlassian FileVisitor. in my configuration i just put in the folder to look in, e.g. lib/qmb/reports/CheckStyle (this folder is located within the checkout).
Peter Johnstone
Sept 10, 2007Hi Stephan,
This hasn't helped. I don't have the folder lib/qmb/reports/CheckStyle. I also tried **/target (Removing the file name from my existing configuration).
The Checkstyle plug in creates the following files in the target directory: checkstyle-checker.xml, checkstyle-header.txt and checkstyle-result.xml. And in the target/site directory check-style.mtml and checkstyle.rss.
I had presumed that the plugin was looking for the checkstyle-result.xml. Is this the case, or is the pluggin looking for another file?
For futher information the PC tath I am testing the plug in on does not have internet access, the version of the maven-checkstyle-plugin that I am using is version 2.1. Perhaps the plugin requires a newer version of the plug in?
Thanks,
Peter
Janusz Gorycki
Feb 14, 2008Hi,
I am getting a simmilar error to Peter's: the plugin always reports that there are 0 violations. It did report true values exactly once, then somehow seemed to not notice that checkstyle report contains some data. I have set the output dir to
**/target/*or justtargetSebastian Voigt
Oct 09, 2007the graph seems sometimes to show false values.
I reduced in a project the violations from about 50.000 to about 7, and the graph shows 450000.
Is it possible to add value that displays the something like a rating ( violations / source code lines).
Thanks in advance
Stephan Paulicke
Oct 10, 2007Hi,
the graph shows a the avarage of a day at minimum. So if you've done some builds with 50000 violations and the dropped down to 7 the daily avarage might still be high. The rating might be possibly, due a lack of time I'm not able to do this ... but feel free to modify the plugin
Maarten Moens
Oct 19, 2007Hi, i found a small bug:
If there are no 10 violations in the file the plugin crashes:
2007-10-18 12:59:20,859 ERROR [BAM:Default Queue:BuildExe] [CheckStyleBuildProcessor] Failed to parse artifact result file "checkstyle_errors.xml"
java.lang.IndexOutOfBoundsException: Index: 8, Size: 8
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at com.atlassian.bamboo.plugins.checkstyle.CheckStyleReportParser.convertTopViolationsToCsv(CheckStyleReportParser.java:127)
at com.atlassian.bamboo.plugins.checkstyle.CheckStyleBuildProcessor$CheckStyleFileVisitor.runParse(CheckStyleBuildProcessor.java:132)
at com.atlassian.bamboo.plugins.checkstyle.CheckStyleBuildProcessor$CheckStyleFileVisitor.visitFile(CheckStyleBuildProcessor.java:121)
at com.atlassian.bamboo.utils.FileVisitor.visitAlLFilesThatMatchAPattern(FileVisitor.java:78)
at com.atlassian.bamboo.utils.FileVisitor.visitFilesThatMatch(FileVisitor.java:52)
at com.atlassian.bamboo.plugins.checkstyle.CheckStyleBuildProcessor.run(CheckStyleBuildProcessor.java:77)
at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.performCustomBuildProcess(ExecuteBuildTask.java:97)
at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:50)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:31)
at edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers$1.run(ThreadHelpers.java:34)
at java.lang.Thread.run(Thread.java:595)
John Allen
Oct 24, 2007Hey I was just going to report that issue! Easy fix for the developers though.
Stefan Hansel
Oct 28, 2007Don'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.
Stephan Paulicke
Oct 29, 2007Hi all,
sorry for the delay, but I've just fixed the 2 reported bugs.
Cheers
John Allen
Nov 18, 2007The aggregated per plan data is inaccurate. We have a multi-module project that results in 10 individual checkstyle.xml report files being generated by checkstyle itself as part of the build, of which there were at least 500+ warning and 1000+ info level violations. However the plugin reports 0 warnings, 0 info. I have not as yet delved into the code but i presume the plugin's functional tests cover converging/aggregating executions?.
Note the bamboo log file shows that the plugin processed each file so our glob wasnt incorrect.
Eric Geordi
Feb 07, 2008Stephan, Is there anyway you could add a table below the graph showing the number of checkstyles for each build that showed what the actual checkstyle errors are ? It is kind of hard to tell what to fix just from looking at the top violators. Or does this capability already exist somewhere in the plugin ?
John Brugge
May 08, 2008I'm finding two problems with the way this plugin is working:
We are running Bamboo 1.2.4, with Maven 2.0.8, and our project set up as multiple Maven modules.
Thanks for any hints,
John
Fernando Silva
May 08, 2008Hi Paulick!
is any update scheduled to support Bamboo v2???
Thanks in advance,
Fernando
Alan M
May 13, 2008Also interested in a Bamboo 2 compatible plugin with the issues regarding the non aggregation of maven multi module builds resolved, is this planned?
Max Horváth
Jun 02, 2008We also need a working version for Bamboo 2 ... anyone working on it?
Sreehary V Kalichamy
Jun 04, 2008I am currently using Bamboo 2 when i try using the checkstyle(bamboo-checkstyle-plugin-1.0.1.jar )Plugin ,it seems checkstyle doesnt works with the bamboo 2 .Can you give me some suggestion to get checkstyle working with bamboo2 !!!
Auvigne Lilians
Jun 16, 2008Hi all,
I posted a Bamboo 2.0 snapshot version of this plugin : bamboo-checkstyle-plugin-2.0-RC1-SNAPSHOT.jar
I'm testing it this week and I'm thinking release it the next week.
Good testing
S
Jun 20, 2008It's excellant to see the plugin being maintained...
After upgrading to the snapshot jar I'm not seeing anything in the delta column - is this to be expected?
Auvigne Lilians
Jun 20, 2008No, I don't think.
I created this issue : http://developer.atlassian.com/jira/browse/BCHKSTYL-4
Kevin Behrens
Jul 09, 2008I see a change history for 2.0, but the download link still points at 2.0-beta1
Is there a 2.0 jar available?
Auvigne Lilians
Aug 07, 2008Sorry, but not yet.
I will test the 2.0-SNAPSHOT with Bamboo 2.1, and I will release it.
Cheer,
Lilians
PS: Sorry for the late, but I have just returned from vacation.
Peter Hannam
Aug 12, 2008Hi,
When running v2.0 of this plugin on Bamboo 2.1 I get the following exception:
2008-08-12 11:09:12,755 WARN [BAM::gbrndd08.chp.co.uk::Agent] [ExecuteBuildTask] Failed to execute plugin with classclass com.atlassian.bamboo.plugins.checkstyle.CheckStyleBuildProcessor : MLS-MLQTE-33
java.lang.ArrayIndexOutOfBoundsException: 1
at com.atlassian.bamboo.plugins.checkstyle.CheckstylePluginHelper.convertFilenameInHttpURL(CheckstylePluginHelper.java:189)
at com.atlassian.bamboo.plugins.checkstyle.CheckstylePluginHelper.transformFilenameInHttpURL(CheckstylePluginHelper.java:160)
at com.atlassian.bamboo.plugins.checkstyle.CheckstylePluginHelper.transformFilenameInHttpURL(CheckstylePluginHelper.java:141)
at com.atlassian.bamboo.plugins.checkstyle.CheckStyleBuildProcessor.call(CheckStyleBuildProcessor.java:60)
at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.performCustomBuildProcess(ExecuteBuildTask.java:109)
at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:69)
at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:192)
at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:89)
at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:105)
at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:32)
at edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers$1.run(ThreadHelpers.java:34)
at java.lang.Thread.run(Unknown Source)
Plus it although it saves the path I enter for the check-style report if I edit the build plan, it reverts to **/target/checkstyle-report.xml rather than the one I previously entered.
Thanks,
Pete
Auvigne Lilians
Aug 12, 2008Hi,
Which is the value of your Base HTML Site URL ?
For the second problem, I have created the http://developer.atlassian.com/jira/browse/BCHKSTYL-14.
Cheers,
Lilians
Jürgen Moßgraber
Sept 08, 2008I ran into the same problem. The bug is that in CheckStyleBuildProcessor.call the function CheckstylePluginHelper.transformFilenameInHttpURL is called even if no Site URL is set.
The fix is to add a check before this line like this:
if (StringUtils.isNotBlank( customConfiguration.get( CHECKSTYLE_SITE_URL )))
CheckstylePluginHelper.transformFilenameInHttpURL( sourceDirectory, customConfiguration, checkstyleResults );
Jürgen Moßgraber
Sept 08, 2008I also noticed that
http://developer.atlassian.com/jira/browse/BCHKSTYL-14
is a side effect from the missing CHECKSTYLE_SITE_URL check. After I added the if-check it is now working.
Auvigne Lilians
Sept 09, 2008Thanks for reply.
I have released the 2.1 version with this bugs fixing.
Lilians
Thomas Landgraf
Aug 21, 2009Hi,
with Bamboo 2.3 we get the error
Thomas
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.
Jan Swaelens
Nov 10, 2009Is there any update on an official release that supports 2.3.1?
thanks