PMD 7.14.0 released

30 May 2025


30-May-2025 - 7.14.0

The PMD team is pleased to announce PMD 7.14.0.

This is a minor release.

Table Of Contents

🚀 New and noteworthy

PMD CLI now uses threaded execution by default

In the PMD CLI, the --threads (-t) option can now accept a thread count given relative to the number of cores of the machine. For instance, it is now possible to write -t 1C to spawn one thread per core, or -t 0.5C to spawn one thread for every other core.

The thread count option now defaults to 1C, meaning parallel execution is used by default. You can disable this by using -t 1.

New Rule UnnecessaryWarningSuppression (experimental)

This new Java rule UnnecessaryWarningSuppression reports unused suppression annotations and comments. Violations of this rule cannot be suppressed.

How to use it? Just include it in your ruleset:

<rule ref="category/java/bestpractices.xml/UnnecessaryWarningSuppression" />

Note: This rule is currently experimental. It is available for now only for Java. The rule for now only reports annotations specific to PMD, like @SuppressWarnings("PMD"). In the future we might be able to check for other common ones like @SuppressWarnings("unchecked") or "fallthrough". Since violations of this rule cannot be suppressed, we opted here on the side of false-negatives and don’t report every unused case yet. However, suppressing specific PMD rules is working as expected.

Migrating to Central Publisher Portal

We’ve now migrated to Central Publisher Portal. Snapshots of PMD are still available, however the repository URL changed. To consume these with maven, you can use the following snippet:

<repositories>
  <repository>
    <name>Central Portal Snapshots</name>
    <id>central-portal-snapshots</id>
    <url>https://central.sonatype.com/repository/maven-snapshots/</url>
    <releases>
      <enabled>false</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>

Releases of PMD are available on Maven Central as before without change.

More CLI parameters shared between PMD and CPD

When executing PMD or CPD, the same parameters are now understood for selecting which files should be analyzed. See File collection options for a list of common, shared parameters that are valid for both commands.

🐛 Fixed Issues

  • core
    • #648: [core] Warn on unneeded suppression
    • #5700: [core] Don’t accidentally catch unexpected runtime exceptions in CpdAnalysis
    • #5705: [cli] PMD’s start script fails if PMD_HOME is set
  • java-bestpractices
    • #5061: [java] UnusedLocalVariable false positive when variable is read as side effect of an assignment
    • #5621: [java] UnusedPrivateMethod with method ref
    • #5724: [java] ImplicitFunctionalInterface should not be reported on sealed interfaces
  • java-codestyle
    • #2462: [java] LinguisticNaming must ignore setters that returns current type (Builder pattern)
    • #5634: [java] CommentDefaultAccessModifier doesn’t recognize /* package */ comment at expected location for constructors
  • java-design
    • #5568: [java] High NPathComplexity in switch expression
    • #5647: [java] NPathComplexity does not account for returns
  • java-errorprone
    • #5702: [java] InvalidLogMessageFormat: Lombok @Slf4j annotation is not interpreted by PMD
  • java-performance
    • #5711: [java] UseArraysAsList false positive with Sets
  • visualforce
    • #5476: [visualforce] NPE when analyzing standard field references in visualforce page

🚹 API Changes

CLI

  • CPD now supports --report-file (-r) and --exclude-file-list.
  • PMD now supports --exclude and --non-recursive.
  • The option --ignore-list in PMD is renamed to --exclude-file-list.

Deprecations

Experimental

✹ Merged pull requests

📩 Dependency updates

  • #5706: Bump PMD from 7.12.0 to 7.13.0
  • #5709: Bump com.google.code.gson:gson from 2.13.0 to 2.13.1
  • #5710: Bump com.puppycrawl.tools:checkstyle from 10.23.0 to 10.23.1
  • #5717: Bump scalameta.version from 4.13.4 to 4.13.5
  • #5718: Bump org.checkerframework:checker-qual from 3.49.2 to 3.49.3
  • #5719: Bump org.jsoup:jsoup from 1.19.1 to 1.20.1
  • #5751: Bump scalameta.version from 4.13.5 to 4.13.6
  • #5754: Bump com.google.protobuf:protobuf-java from 4.30.2 to 4.31.0
  • #5766: Bump io.github.git-commit-id:git-commit-id-maven-plugin from 9.0.1 to 9.0.2
  • #5767: Bump org.mockito:mockito-core from 5.17.0 to 5.18.0
  • #5768: Bump com.puppycrawl.tools:checkstyle from 10.23.1 to 10.24.0

📈 Stats

  • 165 commits
  • 33 closed tickets & PRs
  • Days since last release: 35