If people find this configuration too painful, we can easily disable the checks by default but i thought it was a good way to enforce a coherent code format. And yes, all the configuration will be moved to a single place when all the components pass the checks.
On 7/25/07, Bruce Snyder <[EMAIL PROTECTED]> wrote:
On 7/25/07, Thomas Termin <[EMAIL PROTECTED]> wrote: > Bruce Snyder wrote: > > 1) Is there a reason why the maven-checkstyle-plugin is enabled in > > many subproject level POMs instead of just in the build module POM? It > > seems like this should be enabled in one location instead of being > > spread throughout 14 POMs across the code base. Even the PMD ruleset > > is only enabled in build module POM. > I guess it is because not all components are refactored. OK, I see now - it's a work in progress. > See for example https://issues.apache.org/activemq/browse/SM-933 > > On some day there should be all components refactored and the checkstyle > will be enabled in only one POM. > > > 2) It is a *major* pain to have a build fail simply because the code > > is not formatted according to the Checkstyle and PMD conventions being > > used in ServiceMix. So I've taken a stab at creating a code formatter > > profile for Eclipse and some quick docs located here: > This prevents a user to checkin stuff which is not in the correct style. > There were a hint from Guillaume some day. Yes, I understand, hence my creation of the Eclipse code formatter profile. The Eclipse Checkstyle plugin (http://eclipse-cs.sf.net/) would work as well. A few years back I used to use an automatic code formatter with Ant, but I can't remember the name of it now. It wasn't Jalopy but I suppose Jalopy would work just fine. The idea with Jalopy is that it automatically formats the code according to the coding conventions. BTW, there's a whole list of code verifiers here: http://javatoolbox.com/categories/code-analysers-standards-verifiers Some will auto-reformat the source and some won't. Just thinking... Bruce -- perl -e 'print unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" );' Apache Geronimo - http://geronimo.apache.org/ Apache ActiveMQ - http://activemq.org/ Apache ServiceMix - http://servicemix.org/ Castor - http://castor.org/
-- Cheers, Guillaume Nodet ------------------------ Principal Engineer, IONA Blog: http://gnodet.blogspot.com/