28-January-2023 - 6.54.0-SNAPSHOT

The PMD team is pleased to announce PMD 6.54.0-SNAPSHOT.

This is a minor release.

New and noteworthy

New report format html-report-v2.xslt

Thanks to @mohan-chinnappan-n a new PMD report format has been added which features a data table with charting functions. It uses an XSLT stylesheet to convert PMD’s XML format into HTML.

See the example report.

Fixed Issues

  • apex-bestpractices
    • #2669: [apex] UnusedLocalVariable false positive in dynamic SOQL
  • core
    • #4279: [core] Can not set ruleset property value to empty
    • #4329: [core] Refactor usage of snakeyaml
    • #4340: [core] Allow to filter found matches in CPDReport
  • testing
    • #4236: [test] kotest logs look broken

API Changes

Deprecated APIs

For removal
  • ApexRootNode#getApexVersion has been deprecated for removal. The version returned is always Version.CURRENT, as the apex compiler integration doesn’t use additional information which Apex version actually is used. Therefore, this method can’t be used to determine the Apex version of the project that is being analyzed.
  • CPDConfiguration#setEncoding and CPDConfiguration#getEncoding. Use the methods getSourceEncoding and setSourceEncoding instead. Both are available for CPDConfiguration which extends AbstractConfiguration.
  • BaseCLITest and BaseCPDCLITest have been deprecated for removal without replacement. CLI tests should be done in pmd-core only (and in PMD7 in pmd-cli). Individual language modules shouldn’t need to test the CLI integration logic again. Instead, the individual language modules should test their functionality as unit tests.
  • CPDConfiguration.LanguageConverter
Internal APIs
Experimental APIs
  • CPDReport has a new method which limited mutation of a given report:
    • filterMatches creates a new CPD report with some matches removed with a given predicate based filter.

External Contributions

  • #4110: [apex] Feature/unused variable bind false positive with dynamic SOQL - Thomas Prouvot (@tprouvot)
  • #4125: [core] New report format html-report-v2.xslt to provide html with datatable and chart features - Mohan Chinnappan - (@mohan-chinnappan-n)
  • #4280: [apex] Deprecate ApexRootNode.getApexVersion - Aaron Hurst (@aaronhurst-google)
  • #4285: [java] CommentDefaultAccessModifier - add co.elastic.clients.util.VisibleForTesting as default suppressed annotation - Matthew Luckam (@mluckam)