Tom Copeland's Recent Posts

RSS Feeds

« "Generating Parsers With JavaCC" now available! | Main | svn+http on RubyForge »

PMD 4.0 released!

PMD 4.0 is out!  This release (our first major release since Dec 2006) includes a shift to Java 1.5 both internally and in terms of PMD's defaults; you can still process Java 1.4 code but you'll need to use the targetjdk parameter.  Other changes since PMD 3.9 include ten new rules, prodigious XPath rule speedups, better memory usage, and lots of bugfixes all around.

You can download this release or view the full changelog.

I'm pretty excited about some of the stuff we're looking at for PMD these days.  I think we're finally going to buckle down and get PMD to do full type resolution, so a rule won't just match on typeName.equals("StringBuffer") but will actually resolve the types to ensure it's checking something with StringBuffer.class.  This will eliminate a ton of false positives and should find a lot more problems, too.  On a different note, Ryan Gustafson is working on an optimized XPath 2.0 engine for PMD that would make XPath rules even faster - and would give us more advanced XPath capabilities.  Should be a fun next few months!

If you're using PMD, get the PMD book!  Or, if you're interested in the JavaCC parser generator that powers PMD, get the JavaCC book!

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83451d3c069e200e55070ab698834

Listed below are links to weblogs that reference PMD 4.0 released!:

Comments

Thanks, I've been hanging out for a Java 5 updated. Can't wait to see what problems the new version can find in my code base.

Craig - Cool, yup, hope it finds some good stuff!

How do you generate the html documentation for each rule in PMD 4.0 ? It's helpful to be able to link the violations in a PMD html report to the corresponding rule's html documentation.

Thanks very much,

Tom

Thomas - It's generated with a Maven 1.1 Jelly script - the .jsl file is in etc/jsl/rule-format.jsl, and you can run it with "maven -qb pmd:ruleset-docs".

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.