Re: configure checks per fileset
"Jesus M. Rodriguez" <[email protected]> Tue, 3 Aug 2010 10:27:58 -0400
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 3, 2010 at 9:23 AM, Jan Groth <[email protected]> wrote: > Jesus, > > thanks for the quick reply :-) > > I'm looking for a solution which works with the Eclipse-Checkstyle plugin as > well as with Hudson CI. Having one single checkstyle configuration file (and > running it once) would be a way better in terms of tools support and > real-time feedback for the developers. For eclipse, I use the Checkstyle plugin as well. I had to create 2 different profiles. In the checkstyle plugin: Local Check Configurations area. I created 2 entries: projectname-src-checkstyle and projectname-test-checkstyle. Click on the Properties button and point it to your checkstyle.xml file. Then click the 'Additional properties...' button to define the variables for this particular configuration. The same ones I defined in my build.xml. Once I had my local configurations defined, in the Main tab I was able to create 2 filesets one called main the other test. There I selected the files I wanted checked by each one. This allows me to have 2 different rulesets defined by a single checkstyle.xml. It works great (once it is setup). > > I was hoping that it's somehow possible to have different filesets beeing > processed differently in just one file (like adding more than one > treewalker-module for example?) Probably not. You're best bet would be to define properties for elements that can be controlled by properties. I control the following based on variables: checkstyle.cache.file checkstyle.header.file javadoc.lazy javadoc.method.scope javadoc.missing.param javadoc.type.scope javadoc.var.scope So you might be able to change the scoping rules of your methods and javadoc using properties. If you find a better solution please post it back to the list. I'd be interested in a better way. jesus ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm