Agreed, and for a while I was in fact using it... I think the only real
reason I stopped is because I couldn't figure out how to make it work
from Ant *without* having to first install it (concerns about
portability for new developers). Your absolutely right though, it's
excellent. JLint is another that I was using for a while, and similarly
it finds real honest-to-goodness problems that the others don't.
Frank
Martin Cooper wrote:
On 1/20/06, *Frank W. Zammetti* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
...but I think what's more important to note is that Checkstyle doesn't
just catch simple formatting problems, it catches code smells and things
that can cause subtle problems
The kinds of things I'm talking about are covered by rules like
DefaultComesLast, FallThrough, HiddenField, IllegalCatch,
InnerAssignment, MagicNumber, NestedIfDepth, ParameterAssignment,
ReturnCount and ThisParameter. And that doesn't even mention all the
rules pertaining to metrics, which usually uncover places that can and
probably should be refactored.
I wish I could find it now (Google isn't turning it up), but a while
back I saw an analysis of various projects that correlated Checkstyle
complaints to reported bugs in a project. Now, I'm usually of the
"lies, damn lies and statistics" mentality, but the apparent correlation
was plain to see. My own experience bears out the conclusion of that
report.
Plus, there is something to be said for code that is consistently
formatted in terms of being able to comprehend it. The less your brain
has to switch gears looking at different coding styles, the better. It
doesn't matter what style you implement, as long as there is
consistency.
In my mind, code with as few Checkstyle complaints as possible is better
code without question. At work I actually require all code have no
Checkstyle *OR* PMD complaints before it can be deployed to production,
You should add FindBugs to that list. It finds real, serious bugs that
the other two don't. We use all three tools at my day job, to good effect.
--
Martin Cooper
and I've noticed a marked reduction in "simple" bugs, i.e., those that
generally aren't a big deal to fix and maybe will never cause any real
problems but which can build up over time and ultimately just make code
more difficult to maintain. I view it as more than a "broken windows"
kind of thing :) In fact, I personally put quite a bit of importance in
it (as I would a broken window in my house, but I digress - LOL)
Frank
Don Brown wrote:
> I think it is more of a "broken windows" kind of thing. For a long
> time, we've ignored Checkstyle but recently, there has been some
concern
> that we not let our code degenerate, at least regards to formatting.
> These types of issues usually come up around release time.
>
> Don
>
> Patrick Lightbody wrote:
>> Just curious: what is the motivation for the checkstyle process
in the
>> first place? Code standards can be important, but usually it
isn't my
>> top concern. Is there some Apache requirement that the checkstyle
>> process run?
>>
---------------------------------------------------------------------
>> Posted via Jive Forums
>>
http://forums.opensymphony.com/thread.jspa?threadID=14802&messageID=29811#29811
<http://forums.opensymphony.com/thread.jspa?threadID=14802&messageID=29811#29811>
>>
>>
>>
>>
---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
>
>
>
>
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]