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!
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.
Posted by: Craig Baker | July 20, 2007 at 09:00 PM
Craig - Cool, yup, hope it finds some good stuff!
Posted by: Tom Copeland | July 20, 2007 at 10:32 PM
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
Posted by: Thomas Holmes | August 13, 2007 at 03:00 PM
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".
Posted by: tomcopeland | August 15, 2007 at 06:41 PM