|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: PMD 7.13.0 released |
| 4 | +--- |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | +## 25-April-2025 - 7.13.0 |
| 9 | + |
| 10 | +The PMD team is pleased to announce PMD 7.13.0. |
| 11 | + |
| 12 | +This is a minor release. |
| 13 | + |
| 14 | +### Table Of Contents |
| 15 | + |
| 16 | +* [🚀 New and noteworthy](#new-and-noteworthy) |
| 17 | + * [Docker images](#docker-images) |
| 18 | + * [Experimental support for language dialects](#experimental-support-for-language-dialects) |
| 19 | + * [✨ New Rules](#new-rules) |
| 20 | +* [🐛 Fixed Issues](#fixed-issues) |
| 21 | +* [🚨 API Changes](#api-changes) |
| 22 | + * [Deprecations](#deprecations) |
| 23 | + * [Experimental API](#experimental-api) |
| 24 | +* [✨ Merged pull requests](#merged-pull-requests) |
| 25 | +* [📦 Dependency updates](#dependency-updates) |
| 26 | +* [📈 Stats](#stats) |
| 27 | + |
| 28 | +### 🚀 New and noteworthy |
| 29 | + |
| 30 | +#### Docker images |
| 31 | + |
| 32 | +PMD is now providing official docker images at <https://hub.docker.com/r/pmdcode/pmd> and |
| 33 | +<https://github.com/pmd/docker/pkgs/container/pmd>. |
| 34 | + |
| 35 | +You can now analyze your code with PMD by using docker like so: |
| 36 | + |
| 37 | +``` |
| 38 | +docker run --rm --tty -v $PWD:/src pmdcode/pmd:latest check -d . -R rulesets/java/quickstart.xml` |
| 39 | +``` |
| 40 | + |
| 41 | +More information is available at <https://github.com/pmd/docker>. |
| 42 | + |
| 43 | +#### Experimental support for language dialects |
| 44 | + |
| 45 | +A dialect is a particular form of another supported language. For example, an XSLT is a particular |
| 46 | +form of an XML. Even though the dialect has its own semantics and uses, the contents are still readable |
| 47 | +by any tool capable of understanding the base language. |
| 48 | + |
| 49 | +In PMD, a dialect allows to set up completely custom rules, XPath functions, properties and metrics |
| 50 | +for these files; while retaining the full support of the underlying base language including |
| 51 | +already existing rules and XPath functions. |
| 52 | + |
| 53 | +See [[core] Support language dialects #5438](https://github.com/pmd/pmd/pull/5438) and |
| 54 | +[Adding a new dialect](https://docs.pmd-code.org/pmd-doc-7.13.0/pmd_devdocs_major_adding_dialect.html) for more information. |
| 55 | + |
| 56 | +#### ✨ New Rules |
| 57 | + |
| 58 | +* The new Apex rule [`TypeShadowsBuiltInNamespace`](https://docs.pmd-code.org/pmd-doc-7.13.0/pmd_rules_apex_errorprone.html#typeshadowsbuiltinnamespace) finds Apex classes, enums, and interfaces |
| 59 | + that have the same name as a class, enum, or interface in the `System` or `Schema` namespace. |
| 60 | + Shadowing these namespaces in this way can lead to confusion and unexpected behavior. |
| 61 | + |
| 62 | +### 🐛 Fixed Issues |
| 63 | +* core |
| 64 | + * [#5438](https://github.com/pmd/pmd/issues/5438): \[core] Support language dialects |
| 65 | + * [#5448](https://github.com/pmd/pmd/issues/5448): Maintain a public PMD docker image |
| 66 | + * [#5525](https://github.com/pmd/pmd/issues/5525): \[core] Add rule priority as level to Sarif report |
| 67 | + * [#5623](https://github.com/pmd/pmd/issues/5623): \[dist] Make pmd launch script compatible with /bin/sh |
| 68 | +* apex-bestpractices |
| 69 | + * [#5667](https://github.com/pmd/pmd/issues/5667): \[apex] ApexUnitTestShouldNotUseSeeAllDataTrue false negative when seeAllData parameter is a string |
| 70 | +* apex-errorprone |
| 71 | + * [#3184](https://github.com/pmd/pmd/issues/3184): \[apex] Prevent classes from shadowing System Namespace |
| 72 | +* java |
| 73 | + * [#5645](https://github.com/pmd/pmd/issues/5645): \[java] Parse error on switch with yield |
| 74 | +* java-bestpractices |
| 75 | + * [#5687](https://github.com/pmd/pmd/issues/5687): \[java] UnusedPrivateMethodRule: exclude serialization method readObjectNoData() |
| 76 | +* plsql |
| 77 | + * [#5675](https://github.com/pmd/pmd/issues/5675): \[plsql] Parse error with TREAT function |
| 78 | + |
| 79 | +### 🚨 API Changes |
| 80 | + |
| 81 | +#### Deprecations |
| 82 | +* <a href="https://docs.pmd-code.org/apidocs/pmd-xml/7.13.0/net/sourceforge/pmd/lang/xml/pom/PomLanguageModule.html#"><code>net.sourceforge.pmd.lang.xml.pom.PomLanguageModule</code></a> is deprecated. POM is now a dialect of XML. |
| 83 | + Use <a href="https://docs.pmd-code.org/apidocs/pmd-xml/7.13.0/net/sourceforge/pmd/lang/xml/pom/PomDialectModule.html#"><code>PomDialectModule</code></a> instead. |
| 84 | +* <a href="https://docs.pmd-code.org/apidocs/pmd-xml/7.13.0/net/sourceforge/pmd/lang/xml/wsdl/WsdlLanguageModule.html#"><code>net.sourceforge.pmd.lang.xml.wsdl.WsdlLanguageModule</code></a> is deprecated. WSDL is now a dialect of XML. |
| 85 | + Use <a href="https://docs.pmd-code.org/apidocs/pmd-xml/7.13.0/net/sourceforge/pmd/lang/xml/wsdl/WsdlDialectModule.html#"><code>WsdlDialectModule</code></a> instead. |
| 86 | +* <a href="https://docs.pmd-code.org/apidocs/pmd-xml/7.13.0/net/sourceforge/pmd/lang/xml/xsl/XslLanguageModule.html#"><code>net.sourceforge.pmd.lang.xml.xsl.XslLanguageModule</code></a> is deprecated. XSL is now a dialect of XML. |
| 87 | + Use <a href="https://docs.pmd-code.org/apidocs/pmd-xml/7.13.0/net/sourceforge/pmd/lang/xml/xsl/XslDialectModule.html#"><code>XslDialectModule</code></a> instead. |
| 88 | + |
| 89 | +#### Experimental API |
| 90 | +* The core API around support for language dialects: |
| 91 | + * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.13.0/net/sourceforge/pmd/lang/Language.html#getBaseLanguageId()"><code>Language#getBaseLanguageId</code></a> |
| 92 | + * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.13.0/net/sourceforge/pmd/lang/Language.html#isDialectOf(net.sourceforge.pmd.lang.Language)"><code>Language#isDialectOf</code></a> |
| 93 | + * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.13.0/net/sourceforge/pmd/lang/LanguageModuleBase.html#<init>(net.sourceforge.pmd.lang.LanguageModuleBase.DialectLanguageMetadata)"><code>LanguageModuleBase#<init></code></a> |
| 94 | + * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.13.0/net/sourceforge/pmd/lang/LanguageModuleBase.html#asDialectOf(java.lang.String)"><code>LanguageModuleBase#asDialectOf</code></a> |
| 95 | + * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.13.0/net/sourceforge/pmd/lang/LanguageModuleBase.DialectLanguageMetadata.html#"><code>LanguageModuleBase.DialectLanguageMetadata</code></a> |
| 96 | + * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.13.0/net/sourceforge/pmd/lang/impl/BasePmdDialectLanguageVersionHandler.html#"><code>BasePmdDialectLanguageVersionHandler</code></a> |
| 97 | + * <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.13.0/net/sourceforge/pmd/lang/impl/SimpleDialectLanguageModuleBase.html#"><code>SimpleDialectLanguageModuleBase</code></a> |
| 98 | + |
| 99 | +### ✨ Merged pull requests |
| 100 | +<!-- content will be automatically generated, see /do-release.sh --> |
| 101 | +* [#5438](https://github.com/pmd/pmd/pull/5438): \[core] Support language dialects - [Juan Martín Sotuyo Dodero](https://github.com/jsotuyod) (@jsotuyod) |
| 102 | +* [#5450](https://github.com/pmd/pmd/pull/5450): Fix #3184: \[apex] New Rule: TypeShadowsBuiltInNamespace - [Mitch Spano](https://github.com/mitchspano) (@mitchspano) |
| 103 | +* [#5573](https://github.com/pmd/pmd/pull/5573): Fix #5525: \[core] Add Sarif Level Property - [julees7](https://github.com/julees7) (@julees7) |
| 104 | +* [#5623](https://github.com/pmd/pmd/pull/5623): \[dist] Make pmd launch script compatible with /bin/sh - [Clément Fournier](https://github.com/oowekyala) (@oowekyala) |
| 105 | +* [#5648](https://github.com/pmd/pmd/pull/5648): Fix #5645: \[java] Parse error with yield statement - [Clément Fournier](https://github.com/oowekyala) (@oowekyala) |
| 106 | +* [#5652](https://github.com/pmd/pmd/pull/5652): \[java] Cleanup `AccessorClassGenerationRule` implementation - [Pankraz76](https://github.com/Pankraz76) (@Pankraz76) |
| 107 | +* [#5672](https://github.com/pmd/pmd/pull/5672): \[doc] Fix its/it's and doable/double typos - [John Jetmore](https://github.com/jetmore) (@jetmore) |
| 108 | +* [#5674](https://github.com/pmd/pmd/pull/5674): Fix #5448: \[ci] Maintain public Docker image - [Andreas Dangel](https://github.com/adangel) (@adangel) |
| 109 | +* [#5684](https://github.com/pmd/pmd/pull/5684): Fix #5667: \[apex] ApexUnitTestShouldNotUseSeeAllDataTrue false negative when seeAllDate parameter is a string - [Thomas Prouvot](https://github.com/tprouvot) (@tprouvot) |
| 110 | +* [#5685](https://github.com/pmd/pmd/pull/5685): \[doc] typo fix in PMD Designer reference - [Douglas Griffith](https://github.com/dwgrth) (@dwgrth) |
| 111 | +* [#5686](https://github.com/pmd/pmd/pull/5686): Fix #5675: \[plsql] Support TREAT function with specified datatype - [Andreas Dangel](https://github.com/adangel) (@adangel) |
| 112 | +* [#5687](https://github.com/pmd/pmd/pull/5687): \[java] UnusedPrivateMethodRule: exclude serialization method readObjectNoData() - [Gili Tzabari](https://github.com/cowwoc) (@cowwoc) |
| 113 | +* [#5688](https://github.com/pmd/pmd/pull/5688): \[java] Fix Double Literal for Java19+ compatibility - [Andreas Dangel](https://github.com/adangel) (@adangel) |
| 114 | + |
| 115 | +### 📦 Dependency updates |
| 116 | +<!-- content will be automatically generated, see /do-release.sh --> |
| 117 | +* [#5607](https://github.com/pmd/pmd/pull/5607): Bump org.junit:junit-bom from 5.11.4 to 5.12.1 |
| 118 | +* [#5641](https://github.com/pmd/pmd/pull/5641): Bump PMD from 7.11.0 to 7.12.0 |
| 119 | +* [#5653](https://github.com/pmd/pmd/pull/5653): Bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.0.0.4389 to 5.1.0.4751 |
| 120 | +* [#5654](https://github.com/pmd/pmd/pull/5654): Bump surefire.version from 3.5.2 to 3.5.3 |
| 121 | +* [#5655](https://github.com/pmd/pmd/pull/5655): Bump com.google.guava:guava from 33.4.5-jre to 33.4.6-jre |
| 122 | +* [#5656](https://github.com/pmd/pmd/pull/5656): Bump org.ow2.asm:asm from 9.7.1 to 9.8 |
| 123 | +* [#5657](https://github.com/pmd/pmd/pull/5657): Bump com.google.protobuf:protobuf-java from 4.30.1 to 4.30.2 |
| 124 | +* [#5658](https://github.com/pmd/pmd/pull/5658): Bump logger from 1.6.6 to 1.7.0 in /.ci/files in the all-gems group across 1 directory |
| 125 | +* [#5671](https://github.com/pmd/pmd/pull/5671): Bump checkstyle from 10.21.4 to 10.23.0 |
| 126 | +* [#5676](https://github.com/pmd/pmd/pull/5676): Bump org.checkerframework:checker-qual from 3.49.1 to 3.49.2 |
| 127 | +* [#5677](https://github.com/pmd/pmd/pull/5677): Bump junit5.platform.version from 1.12.1 to 1.12.2 |
| 128 | +* [#5678](https://github.com/pmd/pmd/pull/5678): Bump org.apache.commons:commons-text from 1.13.0 to 1.13.1 |
| 129 | +* [#5679](https://github.com/pmd/pmd/pull/5679): Bump com.google.guava:guava from 33.4.6-jre to 33.4.7-jre |
| 130 | +* [#5680](https://github.com/pmd/pmd/pull/5680): Bump org.mockito:mockito-core from 5.16.1 to 5.17.0 |
| 131 | +* [#5681](https://github.com/pmd/pmd/pull/5681): Bump org.jacoco:jacoco-maven-plugin from 0.8.12 to 0.8.13 |
| 132 | +* [#5682](https://github.com/pmd/pmd/pull/5682): Bump net.bytebuddy:byte-buddy-agent from 1.17.4 to 1.17.5 |
| 133 | +* [#5683](https://github.com/pmd/pmd/pull/5683): Bump the all-gems group across 2 directories with 2 updates |
| 134 | +* [#5691](https://github.com/pmd/pmd/pull/5691): Bump com.google.code.gson:gson from 2.12.1 to 2.13.0 |
| 135 | +* [#5692](https://github.com/pmd/pmd/pull/5692): Bump com.google.guava:guava from 33.4.7-jre to 33.4.8-jre |
| 136 | +* [#5693](https://github.com/pmd/pmd/pull/5693): Bump net.bytebuddy:byte-buddy from 1.17.4 to 1.17.5 |
| 137 | +* [#5694](https://github.com/pmd/pmd/pull/5694): Bump org.junit:junit-bom from 5.12.1 to 5.12.2 |
| 138 | +* [#5696](https://github.com/pmd/pmd/pull/5696): Bump info.picocli:picocli from 4.7.6 to 4.7.7 |
| 139 | +* [#5697](https://github.com/pmd/pmd/pull/5697): Bump com.github.hazendaz.maven:coveralls-maven-plugin from 4.5.0-M6 to 4.7.0 |
| 140 | +* [#5704](https://github.com/pmd/pmd/pull/5704): Bump nokogiri from 1.18.5 to 1.18.8 |
| 141 | + |
| 142 | +### 📈 Stats |
| 143 | +<!-- content will be automatically generated, see /do-release.sh --> |
| 144 | +* 117 commits |
| 145 | +* 19 closed tickets & PRs |
| 146 | +* Days since last release: 27 |
0 commit comments