Re: Cleaning up the code [Was: Re: Cayenne/Windows developer help]

From: Cris Daniluk (cris.danilu..mail.com)
Date: Thu Mar 02 2006 - 12:45:10 EST

  • Next message: Brian K. Wallace: "Re: Cleaning up the code [Was: Re: Cayenne/Windows developer help]"

    One thing that may be helpful is to setup PMD and Checkstyle... both
    require extensive configuration to eliminate annoying false positives,
    but when tuned, they usually present helpful information. Obviously no
    tool is perfect, but for us, about 25% of the reported PMD issues
    deserved attention, and 75% of the checkstyle issues did.

    Maybe Findbugs would be a better choice than PMD... either way, I've
    used PMD more for analytics, and checkstyle more for pure
    style/formatting myself.

    Ideas?

    Cris

    On 3/2/06, Kevin Menard <kmenar..ervprise.com> wrote:
    > I just went through and committed a bunch of problems I had fixed
    > locally. No doubt, there's probably more -- it's a large codebase. So,
    > if anyone else wants to take the reigns, feel free. Areas I think may
    > still need some investigation include checking declared throws clauses and
    > checking parameters for private methods. I know Andrus went through and
    > cleaned up a lot of the exception stuff after I prodded him a bit, but
    > with all the code changes, I suspect some more may have crept in. In
    > particular, there are quite a few methods that declare they throw
    > exceptions that they never do -- it'd be a matter of checking whether or
    > not this is part of the interface. I also noticed a lot of methods had
    > parameters that were never used, which is likely a byproduct of
    > implementing some interface, but I wanted to make sure none of those were
    > private methods.
    >
    > What I did clean up was:
    >
    > o Unnecessary casts
    > o Unnecessary semi-colons
    > o Unused variables
    > o Unused methods
    >
    > Nothing ground-breaking here, but eclipse likes Cayenne a lot more for it.
    >
    > --
    > Kevin
    >
    > On Thu, 02 Mar 2006 00:48:19 -0500, Andrus Adamchik
    > <andru..bjectstyle.org> wrote:
    >
    > > Yeah, please go ahead and commit that. I didn't realize we had any of
    > > those. I thought all the remaining warnings are due to the fact that we
    > > have to keep deprecated stuff around. But since three people
    > > independently confirm that there are unused imports and local vars, I am
    > > probably wrong or haven't been paying attention.
    >



    This archive was generated by hypermail 2.0.0 : Thu Mar 02 2006 - 12:45:14 EST