Version | Change log |
PMD 7.2.0 Jun 5, 2024 | |
PMD 7.1.0 Apr 26, 2024 | |
PMD 6.55.0 Feb 26, 2023 | |
PMD 6.54.0 Jan 28, 2023 | |
PMD 6.38.0 Aug 28, 2021 | |
PMD 6.32.0 Feb 27, 2021 |
New and noteworthy: Java 16 Support: This release of PMD brings support for Java 16. PMD supports JEP 394: Pattern Matching for instanceof and JEP 395: Records. Both have been promoted to be a standard language feature of Java 16. PMD also supports JEP 397: Sealed Classes (Second Preview) as a preview language feature. In order to analyze a project with PMD that uses these language features, you’ll need to enable it via the environment variable PMD_JAVA_OPTS and select the new language version 16-preview: export PMD_JAVA_OPTS=--enable-preview ./run.sh pmd -language java -version 16-preview ... Note: Support for Java 14 preview language features have been removed. The version “14-preview” is no longer available. Modified Rules: The Apex rule ApexDoc has two new properties: reportPrivate and reportProtected. Previously the rule only considered public and global classes, methods, and properties. |
PMD 6.24.0 Mar 13, 2020 |
New and noteworthy: CPD now supports XML as well: Thanks to Fernando Cosso CPD can now find duplicates in XML files as well. This is useful to find duplicated sections in XML files. Updated PMD Designer: This PMD release ships a new version of the pmd-designer. For the changes, see PMD Designer Changelog. New Rules: The new Java Rule LiteralsFirstInComparisons (java-bestpractices) find String literals, that are used in comparisons and are not positioned first. Using the String literal as the receiver of e.g. equals helps to avoid NullPointerExceptions. This rule is replacing the two old rules PositionLiteralsFirstInComparisons and PositionLiteralsFirstInCaseInsensitiveComparisons and extends the check for the methods compareTo, compareToIgnoreCase and contentEquals in addition to equals and equalsIgnoreCase. Note: This rule also replaces the two mentioned rules in Java's quickstart ruleset. Deprecated Rules: The two Java rules PositionLiteralsFirstInComparisons and PositionLiteralsFirs |
PMD 6.23.0 Mar 13, 2020 |
New and noteworthy: Updated PMD Designer: This PMD release ships a new version of the pmd-designer. For the changes, see PMD Designer Changelog. Java Metrics The new metric “Class Fan Out Complexity” has been added. See Java Metrics Documentation for details. Modified Rules: The Java rules InvalidLogMessageFormat and MoreThanOneLogger (java-errorprone) now both support Log4j2. Note that the rule “InvalidSlf4jMessageFormat” has been renamed to “InvalidLogMessageFormat” to reflect the fact, that it now supports more than slf4j. The Java rule LawOfDemeter (java-design) ignores now also Builders, that are not assigned to a local variable, but just directly used within a method call chain. The method, that creates the builder needs to end with “Builder”, e.g. newBuilder() or initBuilder() works. This change fixes a couple of false positives. The Java rule DataflowAnomalyAnalysis (java-errorprone) doesn’t check for UR anomalies (undefined and then referenced) anymore. These checks were all f |
PMD 6.22.0 Mar 13, 2020 |
New and noteworthy: Java 14 Support: This release of PMD brings support for Java 14. PMD can parse Switch Expressions, which have been promoted to be a standard language feature of Java. |
PMD 6.21.0 Dec 3, 2019 |
New and noteworthy: Modelica support: Thanks to Anatoly Trosinenko PMD supports now a new language: Modelica is a language to model complex physical systems. Both PMD and CPD are supported and there are already 3 rules available. The PMD Designer supports syntax highlighting for Modelica. While the language implementation is quite complete, Modelica support is considered experimental for now. This is to allow us to change the rule API (e.g. the AST classes) slightly and improve the implementation based on your feedback. Simple XML dump of AST: We added a experimental feature to dump the AST of a source file into XML. The XML format is of course PMD specific and language dependent. That XML file can be used to execute (XPath) queries against without PMD. It can also be used as a textual visualization of the AST if you don't want to use the Designer. This feature is experimental and might change or even be removed in the future, if it is not useful. A short description how to use it is a |