PMD 6.54.0 (28-January-2023)
28-January-2023 - 6.54.0
The PMD team is pleased to announce PMD 6.54.0.
This is a minor release.
Table Of Contents
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
- java
- #4364: [java] Parsing error with textblock containing quote followed by two backslashes
- testing
- #4236: [test] kotest logs look broken
API Changes
PMD CLI
- PMD now supports a new
--relativize-paths-with
flag (or short-z
), which replaces--short-names
.
It serves the same purpose: Shortening the pathnames in the reports. However, with the new flag it's possible
to explicitly define one or more pathnames that should be used as the base when creating relative paths.
The old flag--short-names
is deprecated.
Deprecated APIs
For removal
-
ApexRootNode#getApexVersion
has been deprecated for removal. The version returned is
alwaysVersion.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
forCPDConfiguration
which extendsAbstractConfiguration
. -
BaseCLITest
andBaseCPDCLITest
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. -
FileCollector#addZipFile
has been deprecated. It is replaced
byFileCollector#addZipFileWithContent
which directly adds the
content of the zip file for analysis. -
PMDConfiguration#setReportShortNames
and
PMDConfiguration#isReportShortNames
have been deprecated for removal.
UsePMDConfiguration#addRelativizeRoot
instead.
Internal APIs
CSVWriter
- Some fields in
AbstractAntTestHelper
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)
Stats
- 107 commits
- 19 closed tickets & PRs
- Days since last release: 27