[osmosis-dev] Checkstyle
Brett Henderson
brett at bretth.com
Wed Jan 28 12:42:29 GMT 2009
marcus.wolschon at googlemail.com wrote:
> 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.
>
Do you mean you can export the eclipse rules and have them used by
checkstyle in some way, or just that we can share formatting rules
between eclipse environments? Either way it sounds good. Then we can
start a potentially lengthy discussion on code formatting rules :-) To
be honest I haven't changed the eclipse defaults much, mainly just a few
tweaks such as inserting extra blank lines between methods.
I've already extended the maximum line length to 120 (I assume that's
reasonable for most people these days), but don't appear to have the
complexity checks enabled. Perhaps they weren't in the standard checks,
but they're a good idea so I'll add them in when I get a chance.
More information about the osmosis-dev
mailing list