02 September 2018
The PMD team is pleased to announce PMD 6.7.0.
This is a minor release.
java-bestpractices) has been revamped to
consider not only local variable declarations, but field declarations too.
The new Java rule
detects cases, when a method name indicates it returns a boolean (such as
isSmall()) but it doesn’t.
Besides method names, the rule also checks field and variable names. It also checks, that getters return
something but setters won’t. The rule has several properties with which it can be customized.
The new PL/SQL rule
enforces a naming convention for “for loops”. Both “cursor for loops” and “index for loops” are covered.
The rule can be customized via patterns. By default, short variable names are reported.
The new Java rule
detects field names that don’t comply to a given convention. It defaults to standard Java convention of using camelCase,
but can be configured with ease for e.g. constants or static fields.
The new Apex rule
apex-codestyle) enforces declaring a
single field / variable per line; or per statement if the
strictMode property is set.
It’s an Apex equivalent of the already existing Java rule of the same name.
now deprecated, and will be removed with version 7.0.0. They are replaced by the more general
All classes in the package
net.sourceforge.pmd.lang.dfa.report have been deprecated and will be removed
with PMD 7.0.0. This includes the class
net.sourceforge.pmd.lang.dfa.report.ReportTree. The reason is,
that this class is very specific to Java and not suitable for other languages. It has only been used for
YAHTMLRenderer, which has been rewritten to work without these classes.
The nodes RUNSIGNEDSHIFT and RSIGNEDSHIFT are deprecated and will be removed from the AST with PMD 7.0.0. These represented the operator of ShiftExpression in two cases out of three, but they’re not needed and make ShiftExpression inconsistent. The operator of a ShiftExpression is now accessible through ShiftExpression#getOperator.