PMD 6.30.0 released

12 December 2020


12-December-2020 - 6.30.0

The PMD team is pleased to announce PMD 6.30.0.

This is a minor release.

Table Of Contents

New and noteworthy

CPD
  • The C# module now supports the new option --ignore-literal-sequences, which can be used to avoid detection of some uninteresting clones. Support for other languages may be added in the future. See #2945

  • The Scala module now supports suppression through CPD-ON/CPD-OFF comment pairs. See #2929

Type information for VisualForce

The Visualforce AST now can resolve the data type of Visualforce expressions that reference Apex Controller properties and Custom Object fields. This feature improves the precision of existing rules, like VfUnescapeEl.

This can be configured using two environment variables:

  • PMD_VF_APEXDIRECTORIES: Comma separated list of directories for Apex classes. Absolute or relative to the Visualforce directory. Default is ../classes. Specifying an empty string will disable data type resolution for Apex Controller properties.
  • PMD_VF_OBJECTSDIRECTORIES: Comma separated list of directories for Custom Objects. Absolute or relative to the Visualforce directory. Default is ../objects. Specifying an empty string will disable data type resolution for Custom Object fields.

This feature is experimental, in particular, expect changes to the way the configuration is specified. We’ll probably extend the CLI instead of relying on environment variables in a future version.

Thanks to Jeff Bartolotta and Roopa Mohan for contributing this!

Fixed Issues

  • core
    • #1939: [core] XPath expressions return handling
    • #1961: [core] Text renderer should include name of violated rule
    • #2874: [core] Fix XMLRenderer with UTF-16
  • cs
    • #2938: [cs] CPD: ignoring using directives could not be disabled
  • java
    • #2911: [java] ClassTypeResolver#searchNodeNameForClass leaks memory
    • #2934: [java] CompareObjectsWithEquals / UseEqualsToCompareStrings - False negatives with fields
    • #2940: [java] Catch additional TypeNotPresentExceptions / LinkageErrors
  • scala
    • #2480: [scala] Support CPD suppressions

API Changes

Deprecated API

Around RuleSet parsing
Around the PMD class

Many classes around PMD’s entry point (PMD) have been deprecated as internal, including:

Miscellaneous

Internal API

Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0. You can identify them with the @InternalApi annotation. You’ll also get a deprecation warning.

External Contributions

Stats

  • 190 commits
  • 25 closed tickets & PRs
  • Days since last release: 49