Automated Code Analysis
I knew about Checkstyle, but PMD is new to me. The Struts Development Team has recently added these tasks to its build.xml file if you're interested in an example. Erik Hatcher has the Checkstyle task in his JavaDevWithAnt project, and I'm using his build.xml file as a model, but I've never used the Task. I've also had the Checkstyle Plug-In for Eclipse installed at one point, but it gave me so many errors - I disabled it. It'd be nice to use these from the beginning on a project.
[Raible Designs]
I'd heard of CheckStyle, but
never tried it before. I played around with PMD
last night. I never really got past CPD,
the Copy and Paste detector. It churned on a portion of our code for about
four hours and finally popped up an interesting report that we talked about
at work today. It had found lots of duplication in our DTD and DB Beans, but
it had also flagged some code in our command handling that was really interesting.
We have some code that was doing the same darned thing in about 10 places while
pulling apart common XML constructs. We've identified it now and will factor
that out ASAP. That made the wait quite worthwhile.
These items seem worth the time to add to the bag of tricks while I'm in a
period where I don't have anything due three hours from a week ago.
11:41:17 PM
|
|