[osmosis-dev] Checkstyle

marcus.wolschon at googlemail.com marcus.wolschon at googlemail.com
Wed Jan 28 12:23:54 GMT 2009


On Wed, 28 Jan 2009 23:18:25 +1100, Brett Henderson <brett at bretth.com>
wrote:
> This is more of an FYI at the moment because if you run it you'll be 
> overwhelmed with hundreds of errors.  I've used the standard "sun" rules 
> as a starting point, commented out a bunch of the noisiest ones 
> temporarily, started making a few code cleanups and decided the job is 
> going to be a big one.  I don't want to turn coding into a nightmare 
> trying to pass checkstyle, but it would be nice to enforce some basic 
> good practices or at least find out where the problems are.
> 
> One slighly irritating thing is that standard "eclipse" formatting 
> differs in many ways to standard "checkstyle" rules.  The old favourite 

You can export the eclipse formating-rules and put them into the project.
The same goes for the checkstyle-rules as checked by eclipse while coding. 
I recomment extending line-length to >80 characters but to leave it in,
cyclomatic complexity, variable/argument/constant-naming and access-level
checks.

(Yes, it taks weeks to "make a large project pass checkstyle" but it is
 possible to easily obey the rules while coding new parts.)

Marcus




More information about the osmosis-dev mailing list