From b6ce0d59e2a134cece5f8fe5674703f7ba91390f Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 31 Jul 2021 18:44:30 +0200 Subject: [PATCH 1/6] Prepare pmd release 6.37.0 --- docs/_config.yml | 2 +- docs/pages/next_major_development.md | 55 ++++++++++++++++++++++++++++ docs/pages/release_notes.md | 5 +++ 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/docs/_config.yml b/docs/_config.yml index 38d16f98ea..358636c152 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,7 +1,7 @@ repository: pmd/pmd pmd: - version: 6.37.0-SNAPSHOT + version: 6.37.0 previous_version: 6.36.0 date: 31-July-2021 release_type: minor diff --git a/docs/pages/next_major_development.md b/docs/pages/next_major_development.md index 769c42ab6f..f44548b64c 100644 --- a/docs/pages/next_major_development.md +++ b/docs/pages/next_major_development.md @@ -125,6 +125,34 @@ the breaking API changes will be performed in 7.0.0. an API is tagged as `@Deprecated` or not in the latest minor release. During the development of 7.0.0, we may decide to remove some APIs that were not tagged as deprecated, though we'll try to avoid it." %} +#### 6.37.0 + +##### PMD CLI + +* PMD has a new CLI option `-force-language`. With that a language can be forced to be used for all input files, + irrespective of filenames. When using this option, the automatic language selection by extension is disabled + and all files are tried to be parsed with the given language. Parsing errors are ignored and unparsable files + are skipped. + + This option allows to use the xml language for files, that don't use xml as extension. + See also the examples on [PMD CLI reference](pmd_userdocs_cli_reference.html#analyze-other-xml-formats). + +##### Experimental APIs + +* The AST types and APIs around Sealed Classes are not experimental anymore: + * {% jdoc !!java::lang.java.ast.ASTClassOrInterfaceDeclaration#isSealed() %}, + {% jdoc !!java::lang.java.ast.ASTClassOrInterfaceDeclaration#isNonSealed() %}, + {% jdoc !!java::lang.java.ast.ASTClassOrInterfaceDeclaration#getPermittedSubclasses() %} + * {% jdoc java::lang.java.ast.ASTPermitsList %} + +##### Internal API + +Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0. +You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning. + +* The inner class {% jdoc !!core::cpd.TokenEntry.State %} is considered to be internal API. + It will probably be moved away with PMD 7. + #### 6.36.0 No changes. @@ -1209,3 +1237,30 @@ large projects, with many duplications, it was causing `OutOfMemoryError`s (see * The Java rule {% rule "java/errorprone/CloneThrowsCloneNotSupportedException" %} has been deprecated without replacement. +* The following Java rules are deprecated and removed from the quickstart ruleset, + as the new rule {% rule java/bestpractices/SimplifiableTestAssertion %} merges + their functionality: + * {% rule java/bestpractices/UseAssertEqualsInsteadOfAssertTrue %} + * {% rule java/bestpractices/UseAssertNullInsteadOfAssertTrue %} + * {% rule java/bestpractices/UseAssertSameInsteadOfAssertTrue %} + * {% rule java/bestpractices/UseAssertTrueInsteadOfAssertEquals %} + * {% rule java/design/SimplifyBooleanAssertion %} + +* The Java rule {% rule java/errorprone/ReturnEmptyArrayRatherThanNull %} is deprecated and removed from + the quickstart ruleset, as the new rule {% rule java/errorprone/ReturnEmptyCollectionRatherThanNull %} + supersedes it. + +* The following Java rules are deprecated and removed from the quickstart ruleset, + as the new rule {% rule java/bestpractices/PrimitiveWrapperInstantiation %} merges + their functionality: + * {% rule java/performance/BooleanInstantiation %} + * {% rule java/performance/ByteInstantiation %} + * {% rule java/performance/IntegerInstantiation %} + * {% rule java/performance/LongInstantiation %} + * {% rule java/performance/ShortInstantiation %} + +* The Java rule {% rule java/performance/UnnecessaryWrapperObjectCreation %} is deprecated + with no planned replacement before PMD 7. In it's current state, the rule is not useful + as it finds only contrived cases of creating a primitive wrapper and unboxing it explicitly + in the same expression. In PMD 7 this and more cases will be covered by a + new rule `UnnecessaryBoxing`. diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index daf7463648..2c8bbb3ebc 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -158,5 +158,10 @@ You can identify them with the `@InternalApi` annotation. You'll also get a depr * [#3388](https://github.com/pmd/pmd/pull/3388): \[doc] Add Code Inspector in the list of tools - [Julien Delange](https://github.com/juli1) * [#3417](https://github.com/pmd/pmd/pull/3417): \[core] Support forcing a specific language from the command-line - [Aidan Harding](https://github.com/aidan-harding) +### Stats +* 82 commits +* 29 closed tickets & PRs +* Days since last release: 35 + {% endtocmaker %} From c7cc40fcda426c0c521fe63e795d63684a4daf6f Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 31 Jul 2021 18:49:12 +0200 Subject: [PATCH 2/6] Remove dogfood profile temporarily for release --- pom.xml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/pom.xml b/pom.xml index dc6d2895f4..ad1beb1882 100644 --- a/pom.xml +++ b/pom.xml @@ -1055,32 +1055,6 @@ - - pmd-dogfood - - ${project.version} - - - - - org.apache.maven.plugins - maven-pmd-plugin - - - net.sourceforge.pmd - pmd-core - ${pmd.dogfood.version} - - - net.sourceforge.pmd - pmd-java - ${pmd.dogfood.version} - - - - - - From 18df47ce6eaa0f692f92da004d84deb3c20b50b7 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 31 Jul 2021 19:01:59 +0200 Subject: [PATCH 3/6] [maven-release-plugin] prepare release pmd_releases/6.37.0 --- pmd-apex-jorje/pom.xml | 2 +- pmd-apex/pom.xml | 2 +- pmd-core/pom.xml | 2 +- pmd-cpp/pom.xml | 2 +- pmd-cs/pom.xml | 2 +- pmd-dart/pom.xml | 2 +- pmd-dist/pom.xml | 2 +- pmd-doc/pom.xml | 2 +- pmd-fortran/pom.xml | 2 +- pmd-go/pom.xml | 2 +- pmd-groovy/pom.xml | 2 +- pmd-java/pom.xml | 2 +- pmd-java8/pom.xml | 2 +- pmd-javascript/pom.xml | 2 +- pmd-jsp/pom.xml | 2 +- pmd-kotlin/pom.xml | 2 +- pmd-lang-test/pom.xml | 2 +- pmd-lua/pom.xml | 2 +- pmd-matlab/pom.xml | 2 +- pmd-modelica/pom.xml | 2 +- pmd-objectivec/pom.xml | 2 +- pmd-perl/pom.xml | 2 +- pmd-php/pom.xml | 2 +- pmd-plsql/pom.xml | 2 +- pmd-python/pom.xml | 2 +- pmd-ruby/pom.xml | 2 +- pmd-scala-modules/pmd-scala-common/pom.xml | 2 +- pmd-scala-modules/pmd-scala_2.12/pom.xml | 2 +- pmd-scala-modules/pmd-scala_2.13/pom.xml | 2 +- pmd-scala/pom.xml | 2 +- pmd-swift/pom.xml | 2 +- pmd-test/pom.xml | 2 +- pmd-visualforce/pom.xml | 2 +- pmd-vm/pom.xml | 2 +- pmd-xml/pom.xml | 2 +- pom.xml | 6 +++--- 36 files changed, 38 insertions(+), 38 deletions(-) diff --git a/pmd-apex-jorje/pom.xml b/pmd-apex-jorje/pom.xml index ad47c46e5e..09ef0b3a88 100644 --- a/pmd-apex-jorje/pom.xml +++ b/pmd-apex-jorje/pom.xml @@ -8,7 +8,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-apex/pom.xml b/pmd-apex/pom.xml index 63b0b5e834..d08362e1d6 100644 --- a/pmd-apex/pom.xml +++ b/pmd-apex/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-core/pom.xml b/pmd-core/pom.xml index 80ebb00ea4..1904c8d9ce 100644 --- a/pmd-core/pom.xml +++ b/pmd-core/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-cpp/pom.xml b/pmd-cpp/pom.xml index d581f746bb..b378bde0ca 100644 --- a/pmd-cpp/pom.xml +++ b/pmd-cpp/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-cs/pom.xml b/pmd-cs/pom.xml index 112094ccd2..bfd7c99062 100644 --- a/pmd-cs/pom.xml +++ b/pmd-cs/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-dart/pom.xml b/pmd-dart/pom.xml index 308c51435f..c2f0362b6c 100644 --- a/pmd-dart/pom.xml +++ b/pmd-dart/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-dist/pom.xml b/pmd-dist/pom.xml index fb3e52dfc5..b13adc6a8a 100644 --- a/pmd-dist/pom.xml +++ b/pmd-dist/pom.xml @@ -8,7 +8,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-doc/pom.xml b/pmd-doc/pom.xml index b2ed4c59c0..43a203da7c 100644 --- a/pmd-doc/pom.xml +++ b/pmd-doc/pom.xml @@ -8,7 +8,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-fortran/pom.xml b/pmd-fortran/pom.xml index bc3f25bcf5..d8a3ae7d77 100644 --- a/pmd-fortran/pom.xml +++ b/pmd-fortran/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-go/pom.xml b/pmd-go/pom.xml index 347770e72b..be532aefb5 100644 --- a/pmd-go/pom.xml +++ b/pmd-go/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-groovy/pom.xml b/pmd-groovy/pom.xml index 0545af2b59..3cd06b85a8 100644 --- a/pmd-groovy/pom.xml +++ b/pmd-groovy/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-java/pom.xml b/pmd-java/pom.xml index a5d81f28cd..b648a255d7 100644 --- a/pmd-java/pom.xml +++ b/pmd-java/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-java8/pom.xml b/pmd-java8/pom.xml index ac8f20a5b7..8511f2a430 100644 --- a/pmd-java8/pom.xml +++ b/pmd-java8/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-javascript/pom.xml b/pmd-javascript/pom.xml index a9f9e41aad..36a06bda17 100644 --- a/pmd-javascript/pom.xml +++ b/pmd-javascript/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-jsp/pom.xml b/pmd-jsp/pom.xml index 4c8ddd7175..39b22ce846 100644 --- a/pmd-jsp/pom.xml +++ b/pmd-jsp/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-kotlin/pom.xml b/pmd-kotlin/pom.xml index 9bfd80380a..d4b52ba866 100644 --- a/pmd-kotlin/pom.xml +++ b/pmd-kotlin/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-lang-test/pom.xml b/pmd-lang-test/pom.xml index a4ad80a8d8..762cafc16c 100644 --- a/pmd-lang-test/pom.xml +++ b/pmd-lang-test/pom.xml @@ -12,7 +12,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-lua/pom.xml b/pmd-lua/pom.xml index 182ebdac95..fc8b32f45f 100644 --- a/pmd-lua/pom.xml +++ b/pmd-lua/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-matlab/pom.xml b/pmd-matlab/pom.xml index de42214780..80324ed3d7 100644 --- a/pmd-matlab/pom.xml +++ b/pmd-matlab/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-modelica/pom.xml b/pmd-modelica/pom.xml index 9e424f9ec5..6f251a9c4d 100644 --- a/pmd-modelica/pom.xml +++ b/pmd-modelica/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-objectivec/pom.xml b/pmd-objectivec/pom.xml index e51bda2b22..66671a40e3 100644 --- a/pmd-objectivec/pom.xml +++ b/pmd-objectivec/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-perl/pom.xml b/pmd-perl/pom.xml index de583691e1..23ffec4634 100644 --- a/pmd-perl/pom.xml +++ b/pmd-perl/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-php/pom.xml b/pmd-php/pom.xml index 3dbcf696df..a594a752a5 100644 --- a/pmd-php/pom.xml +++ b/pmd-php/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-plsql/pom.xml b/pmd-plsql/pom.xml index 464b9c3ae6..8ef4c229e6 100644 --- a/pmd-plsql/pom.xml +++ b/pmd-plsql/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-python/pom.xml b/pmd-python/pom.xml index d3aa542f05..4b2ca33927 100644 --- a/pmd-python/pom.xml +++ b/pmd-python/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-ruby/pom.xml b/pmd-ruby/pom.xml index 6330f5af6e..6179bc1fa5 100644 --- a/pmd-ruby/pom.xml +++ b/pmd-ruby/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-scala-modules/pmd-scala-common/pom.xml b/pmd-scala-modules/pmd-scala-common/pom.xml index 3ec3c49040..bc01a39cbd 100644 --- a/pmd-scala-modules/pmd-scala-common/pom.xml +++ b/pmd-scala-modules/pmd-scala-common/pom.xml @@ -8,7 +8,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../.. diff --git a/pmd-scala-modules/pmd-scala_2.12/pom.xml b/pmd-scala-modules/pmd-scala_2.12/pom.xml index 86c275868b..fcadd99270 100644 --- a/pmd-scala-modules/pmd-scala_2.12/pom.xml +++ b/pmd-scala-modules/pmd-scala_2.12/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd-scala-common - 6.37.0-SNAPSHOT + 6.37.0 ../pmd-scala-common diff --git a/pmd-scala-modules/pmd-scala_2.13/pom.xml b/pmd-scala-modules/pmd-scala_2.13/pom.xml index a0db001df3..d49faabfe5 100644 --- a/pmd-scala-modules/pmd-scala_2.13/pom.xml +++ b/pmd-scala-modules/pmd-scala_2.13/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd-scala-common - 6.37.0-SNAPSHOT + 6.37.0 ../pmd-scala-common diff --git a/pmd-scala/pom.xml b/pmd-scala/pom.xml index 96620fec37..4d1cdf9f39 100644 --- a/pmd-scala/pom.xml +++ b/pmd-scala/pom.xml @@ -9,7 +9,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-swift/pom.xml b/pmd-swift/pom.xml index 25acd13c50..6d4a9b08de 100644 --- a/pmd-swift/pom.xml +++ b/pmd-swift/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-test/pom.xml b/pmd-test/pom.xml index c98334a805..c8127984fc 100644 --- a/pmd-test/pom.xml +++ b/pmd-test/pom.xml @@ -8,7 +8,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-visualforce/pom.xml b/pmd-visualforce/pom.xml index fa7f78e94c..479a5ee03e 100644 --- a/pmd-visualforce/pom.xml +++ b/pmd-visualforce/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-vm/pom.xml b/pmd-vm/pom.xml index b91ec1172d..8faafa6977 100644 --- a/pmd-vm/pom.xml +++ b/pmd-vm/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pmd-xml/pom.xml b/pmd-xml/pom.xml index fbfa05127a..338dc4c131 100644 --- a/pmd-xml/pom.xml +++ b/pmd-xml/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 ../ diff --git a/pom.xml b/pom.xml index ad1beb1882..ad3abc086e 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 net.sourceforge.pmd pmd - 6.37.0-SNAPSHOT + 6.37.0 pom PMD @@ -55,7 +55,7 @@ scm:git:git://github.com/pmd/pmd.git scm:git:ssh://git@github.com/pmd/pmd.git https://github.com/pmd/pmd - HEAD + pmd_releases/6.37.0 @@ -76,7 +76,7 @@ - 2021-06-26T08:24:14Z + 2021-07-31T16:51:09Z 7 From 821f7a849bc42fe4b22ecc9e9578adda923cd920 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 31 Jul 2021 19:02:07 +0200 Subject: [PATCH 4/6] [maven-release-plugin] prepare for next development iteration --- pmd-apex-jorje/pom.xml | 2 +- pmd-apex/pom.xml | 2 +- pmd-core/pom.xml | 2 +- pmd-cpp/pom.xml | 2 +- pmd-cs/pom.xml | 2 +- pmd-dart/pom.xml | 2 +- pmd-dist/pom.xml | 2 +- pmd-doc/pom.xml | 2 +- pmd-fortran/pom.xml | 2 +- pmd-go/pom.xml | 2 +- pmd-groovy/pom.xml | 2 +- pmd-java/pom.xml | 2 +- pmd-java8/pom.xml | 2 +- pmd-javascript/pom.xml | 2 +- pmd-jsp/pom.xml | 2 +- pmd-kotlin/pom.xml | 2 +- pmd-lang-test/pom.xml | 2 +- pmd-lua/pom.xml | 2 +- pmd-matlab/pom.xml | 2 +- pmd-modelica/pom.xml | 2 +- pmd-objectivec/pom.xml | 2 +- pmd-perl/pom.xml | 2 +- pmd-php/pom.xml | 2 +- pmd-plsql/pom.xml | 2 +- pmd-python/pom.xml | 2 +- pmd-ruby/pom.xml | 2 +- pmd-scala-modules/pmd-scala-common/pom.xml | 2 +- pmd-scala-modules/pmd-scala_2.12/pom.xml | 2 +- pmd-scala-modules/pmd-scala_2.13/pom.xml | 2 +- pmd-scala/pom.xml | 2 +- pmd-swift/pom.xml | 2 +- pmd-test/pom.xml | 2 +- pmd-visualforce/pom.xml | 2 +- pmd-vm/pom.xml | 2 +- pmd-xml/pom.xml | 2 +- pom.xml | 6 +++--- 36 files changed, 38 insertions(+), 38 deletions(-) diff --git a/pmd-apex-jorje/pom.xml b/pmd-apex-jorje/pom.xml index 09ef0b3a88..1fbad57b7e 100644 --- a/pmd-apex-jorje/pom.xml +++ b/pmd-apex-jorje/pom.xml @@ -8,7 +8,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-apex/pom.xml b/pmd-apex/pom.xml index d08362e1d6..07347a24df 100644 --- a/pmd-apex/pom.xml +++ b/pmd-apex/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-core/pom.xml b/pmd-core/pom.xml index 1904c8d9ce..279e93c935 100644 --- a/pmd-core/pom.xml +++ b/pmd-core/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-cpp/pom.xml b/pmd-cpp/pom.xml index b378bde0ca..040ec9a4c8 100644 --- a/pmd-cpp/pom.xml +++ b/pmd-cpp/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-cs/pom.xml b/pmd-cs/pom.xml index bfd7c99062..9c4c6528ec 100644 --- a/pmd-cs/pom.xml +++ b/pmd-cs/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-dart/pom.xml b/pmd-dart/pom.xml index c2f0362b6c..3f432eeaba 100644 --- a/pmd-dart/pom.xml +++ b/pmd-dart/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-dist/pom.xml b/pmd-dist/pom.xml index b13adc6a8a..7a0e2dacd7 100644 --- a/pmd-dist/pom.xml +++ b/pmd-dist/pom.xml @@ -8,7 +8,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-doc/pom.xml b/pmd-doc/pom.xml index 43a203da7c..34a735f5da 100644 --- a/pmd-doc/pom.xml +++ b/pmd-doc/pom.xml @@ -8,7 +8,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-fortran/pom.xml b/pmd-fortran/pom.xml index d8a3ae7d77..9aa757cd84 100644 --- a/pmd-fortran/pom.xml +++ b/pmd-fortran/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-go/pom.xml b/pmd-go/pom.xml index be532aefb5..de0d29ef42 100644 --- a/pmd-go/pom.xml +++ b/pmd-go/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-groovy/pom.xml b/pmd-groovy/pom.xml index 3cd06b85a8..81748d5c73 100644 --- a/pmd-groovy/pom.xml +++ b/pmd-groovy/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-java/pom.xml b/pmd-java/pom.xml index b648a255d7..2fd7d4c0d2 100644 --- a/pmd-java/pom.xml +++ b/pmd-java/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-java8/pom.xml b/pmd-java8/pom.xml index 8511f2a430..9f08b33dcb 100644 --- a/pmd-java8/pom.xml +++ b/pmd-java8/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-javascript/pom.xml b/pmd-javascript/pom.xml index 36a06bda17..7089c683b1 100644 --- a/pmd-javascript/pom.xml +++ b/pmd-javascript/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-jsp/pom.xml b/pmd-jsp/pom.xml index 39b22ce846..e8e2536616 100644 --- a/pmd-jsp/pom.xml +++ b/pmd-jsp/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-kotlin/pom.xml b/pmd-kotlin/pom.xml index d4b52ba866..fa532436ef 100644 --- a/pmd-kotlin/pom.xml +++ b/pmd-kotlin/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-lang-test/pom.xml b/pmd-lang-test/pom.xml index 762cafc16c..f3b99287f3 100644 --- a/pmd-lang-test/pom.xml +++ b/pmd-lang-test/pom.xml @@ -12,7 +12,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-lua/pom.xml b/pmd-lua/pom.xml index fc8b32f45f..c690bc4986 100644 --- a/pmd-lua/pom.xml +++ b/pmd-lua/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-matlab/pom.xml b/pmd-matlab/pom.xml index 80324ed3d7..52a2ca2dd8 100644 --- a/pmd-matlab/pom.xml +++ b/pmd-matlab/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-modelica/pom.xml b/pmd-modelica/pom.xml index 6f251a9c4d..7bd4582829 100644 --- a/pmd-modelica/pom.xml +++ b/pmd-modelica/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-objectivec/pom.xml b/pmd-objectivec/pom.xml index 66671a40e3..165166a1fb 100644 --- a/pmd-objectivec/pom.xml +++ b/pmd-objectivec/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-perl/pom.xml b/pmd-perl/pom.xml index 23ffec4634..24082d4cca 100644 --- a/pmd-perl/pom.xml +++ b/pmd-perl/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-php/pom.xml b/pmd-php/pom.xml index a594a752a5..891dc1f892 100644 --- a/pmd-php/pom.xml +++ b/pmd-php/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-plsql/pom.xml b/pmd-plsql/pom.xml index 8ef4c229e6..c01f0d428f 100644 --- a/pmd-plsql/pom.xml +++ b/pmd-plsql/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-python/pom.xml b/pmd-python/pom.xml index 4b2ca33927..462e7151d2 100644 --- a/pmd-python/pom.xml +++ b/pmd-python/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-ruby/pom.xml b/pmd-ruby/pom.xml index 6179bc1fa5..131fc26250 100644 --- a/pmd-ruby/pom.xml +++ b/pmd-ruby/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-scala-modules/pmd-scala-common/pom.xml b/pmd-scala-modules/pmd-scala-common/pom.xml index bc01a39cbd..e927783cbf 100644 --- a/pmd-scala-modules/pmd-scala-common/pom.xml +++ b/pmd-scala-modules/pmd-scala-common/pom.xml @@ -8,7 +8,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../.. diff --git a/pmd-scala-modules/pmd-scala_2.12/pom.xml b/pmd-scala-modules/pmd-scala_2.12/pom.xml index fcadd99270..6928da5017 100644 --- a/pmd-scala-modules/pmd-scala_2.12/pom.xml +++ b/pmd-scala-modules/pmd-scala_2.12/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd-scala-common - 6.37.0 + 6.38.0-SNAPSHOT ../pmd-scala-common diff --git a/pmd-scala-modules/pmd-scala_2.13/pom.xml b/pmd-scala-modules/pmd-scala_2.13/pom.xml index d49faabfe5..189491bca6 100644 --- a/pmd-scala-modules/pmd-scala_2.13/pom.xml +++ b/pmd-scala-modules/pmd-scala_2.13/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd-scala-common - 6.37.0 + 6.38.0-SNAPSHOT ../pmd-scala-common diff --git a/pmd-scala/pom.xml b/pmd-scala/pom.xml index 4d1cdf9f39..375743dd0a 100644 --- a/pmd-scala/pom.xml +++ b/pmd-scala/pom.xml @@ -9,7 +9,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-swift/pom.xml b/pmd-swift/pom.xml index 6d4a9b08de..cd03470d2b 100644 --- a/pmd-swift/pom.xml +++ b/pmd-swift/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-test/pom.xml b/pmd-test/pom.xml index c8127984fc..cf40c4c74b 100644 --- a/pmd-test/pom.xml +++ b/pmd-test/pom.xml @@ -8,7 +8,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-visualforce/pom.xml b/pmd-visualforce/pom.xml index 479a5ee03e..7d944dc67a 100644 --- a/pmd-visualforce/pom.xml +++ b/pmd-visualforce/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-vm/pom.xml b/pmd-vm/pom.xml index 8faafa6977..c55b5d7bc0 100644 --- a/pmd-vm/pom.xml +++ b/pmd-vm/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pmd-xml/pom.xml b/pmd-xml/pom.xml index 338dc4c131..887b071d97 100644 --- a/pmd-xml/pom.xml +++ b/pmd-xml/pom.xml @@ -7,7 +7,7 @@ net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT ../ diff --git a/pom.xml b/pom.xml index ad3abc086e..0241ed3ec0 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 net.sourceforge.pmd pmd - 6.37.0 + 6.38.0-SNAPSHOT pom PMD @@ -55,7 +55,7 @@ scm:git:git://github.com/pmd/pmd.git scm:git:ssh://git@github.com/pmd/pmd.git https://github.com/pmd/pmd - pmd_releases/6.37.0 + HEAD @@ -76,7 +76,7 @@ - 2021-07-31T16:51:09Z + 2021-07-31T17:02:07Z 7 From 69541a02525eaf82348d0658786923e85b06eb0b Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 31 Jul 2021 19:03:42 +0200 Subject: [PATCH 5/6] Revert "Remove dogfood profile temporarily for release" This reverts commit c7cc40fcda426c0c521fe63e795d63684a4daf6f. --- pom.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/pom.xml b/pom.xml index 0241ed3ec0..9bf2386e27 100644 --- a/pom.xml +++ b/pom.xml @@ -1055,6 +1055,32 @@ + + pmd-dogfood + + ${project.version} + + + + + org.apache.maven.plugins + maven-pmd-plugin + + + net.sourceforge.pmd + pmd-core + ${pmd.dogfood.version} + + + net.sourceforge.pmd + pmd-java + ${pmd.dogfood.version} + + + + + + From 6969f1b3ccf4a20a4f73ac53985ad1901947322d Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 31 Jul 2021 19:06:44 +0200 Subject: [PATCH 6/6] Prepare next development version --- docs/_config.yml | 6 +- docs/pages/release_notes.md | 143 -------------------------- docs/pages/release_notes_old.md | 173 ++++++++++++++++++++++++++++++++ 3 files changed, 176 insertions(+), 146 deletions(-) diff --git a/docs/_config.yml b/docs/_config.yml index 358636c152..20ec943b05 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,9 +1,9 @@ repository: pmd/pmd pmd: - version: 6.37.0 - previous_version: 6.36.0 - date: 31-July-2021 + version: 6.38.0-SNAPSHOT + previous_version: 6.37.0 + date: 28-August-2021 release_type: minor # release types: major, minor, bugfix diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 2c8bbb3ebc..b8f8783555 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -14,154 +14,11 @@ This is a {{ site.pmd.release_type }} release. ### New and noteworthy -#### Java 17 Support - -This release of PMD brings support for Java 17. PMD supports [JEP 409: Sealed Classes](https://openjdk.java.net/jeps/409) -which has been promoted to be a standard language feature of Java 17. - -PMD also supports [JEP 406: Pattern Matching for switch (Preview)](https://openjdk.java.net/jeps/406) 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 `17-preview`: - - export PMD_JAVA_OPTS=--enable-preview - ./run.sh pmd -language java -version 17-preview ... - -Note: Support for Java 15 preview language features have been removed. The version "15-preview" is no longer available. - -#### Updated PMD Designer - -This PMD release ships a new version of the pmd-designer. -For the changes, see [PMD Designer Changelog](https://github.com/pmd/pmd-designer/releases/tag/6.37.0). - -#### New rules - -This release ships with 3 new Java rules. - -* {% rule java/bestpractices/PrimitiveWrapperInstantiation %} reports usages of primitive wrapper - constructors. They are deprecated since Java 9 and should not be used. - -```xml - -``` - - The rule is part of the quickstart.xml ruleset. - -* {% rule java/bestpractices/SimplifiableTestAssertion %} suggests rewriting - some test assertions to be more readable. - -```xml - -``` - - The rule is part of the quickstart.xml ruleset. - -* {% rule java/errorprone/ReturnEmptyCollectionRatherThanNull %} suggests returning empty collections / arrays - instead of null. - -```xml - -``` - - The rule is part of the quickstart.xml ruleset. - -#### Renamed rules - -* The Java rule {% rule java/errorprone/MissingBreakInSwitch %} has been renamed to - {% rule java/errorprone/ImplicitSwitchFallThrough %} (category error prone) to better reflect the rule's - purpose: The rule finds implicit fall-through cases in switch statements, which are most - likely unexpected. The old rule name described only one way how to avoid a fall-through, - namely using `break` but `continue`, `throw` and `return` avoid a fall-through - as well. This enables us to improve this rule in the future. - -#### Deprecated rules - -* The following Java rules are deprecated and removed from the quickstart ruleset, - as the new rule {% rule java/bestpractices/SimplifiableTestAssertion %} merges - their functionality: - * {% rule java/bestpractices/UseAssertEqualsInsteadOfAssertTrue %} - * {% rule java/bestpractices/UseAssertNullInsteadOfAssertTrue %} - * {% rule java/bestpractices/UseAssertSameInsteadOfAssertTrue %} - * {% rule java/bestpractices/UseAssertTrueInsteadOfAssertEquals %} - * {% rule java/design/SimplifyBooleanAssertion %} - -* The Java rule {% rule java/errorprone/ReturnEmptyArrayRatherThanNull %} is deprecated and removed from - the quickstart ruleset, as the new rule {% rule java/errorprone/ReturnEmptyCollectionRatherThanNull %} - supersedes it. - -* The following Java rules are deprecated and removed from the quickstart ruleset, - as the new rule {% rule java/bestpractices/PrimitiveWrapperInstantiation %} merges - their functionality: - * {% rule java/performance/BooleanInstantiation %} - * {% rule java/performance/ByteInstantiation %} - * {% rule java/performance/IntegerInstantiation %} - * {% rule java/performance/LongInstantiation %} - * {% rule java/performance/ShortInstantiation %} - -* The Java rule {% rule java/performance/UnnecessaryWrapperObjectCreation %} is deprecated - with no planned replacement before PMD 7. In it's current state, the rule is not useful - as it finds only contrived cases of creating a primitive wrapper and unboxing it explicitly - in the same expression. In PMD 7 this and more cases will be covered by a - new rule `UnnecessaryBoxing`. - ### Fixed Issues -* apex - * [#3201](https://github.com/pmd/pmd/issues/3201): \[apex] ApexCRUDViolation doesn't report Database class DMLs, inline no-arg object instantiations and inline list initialization - * [#3329](https://github.com/pmd/pmd/issues/3329): \[apex] ApexCRUDViolation doesn't report SOQL for loops -* core - * [#1603](https://github.com/pmd/pmd/issues/1603): \[core] Language version comparison - * [#2133](https://github.com/pmd/pmd/issues/2133): \[xml] Allow to check Salesforce XML Metadata using XPath rules - * [#3377](https://github.com/pmd/pmd/issues/3377): \[core] NPE when specifying report file in current directory in PMD CLI - * [#3387](https://github.com/pmd/pmd/issues/3387): \[core] CPD should avoid unnecessary copies when running with --skip-lexical-errors -* java-bestpractices - * [#2908](https://github.com/pmd/pmd/issues/2908): \[java] Merge Junit assertion simplification rules - * [#3235](https://github.com/pmd/pmd/issues/3235): \[java] UseTryWithResources false positive when closeable is provided as a method argument or class field -* java-errorprone - * [#3361](https://github.com/pmd/pmd/issues/3361): \[java] Rename rule MissingBreakInSwitch to ImplicitSwitchFallThrough - * [#3382](https://github.com/pmd/pmd/pull/3382): \[java] New rule ReturnEmptyCollectionRatherThanNull -* java-performance - * [#3420](https://github.com/pmd/pmd/issues/3420): \[java] NPE in `InefficientStringBuffering` with Records - ### API Changes -#### PMD CLI - -* PMD has a new CLI option `-force-language`. With that a language can be forced to be used for all input files, - irrespective of filenames. When using this option, the automatic language selection by extension is disabled - and all files are tried to be parsed with the given language. Parsing errors are ignored and unparsable files - are skipped. - - This option allows to use the xml language for files, that don't use xml as extension. - See also the examples on [PMD CLI reference](pmd_userdocs_cli_reference.html#analyze-other-xml-formats). - -#### Experimental APIs - -* The AST types and APIs around Sealed Classes are not experimental anymore: - * {% jdoc !!java::lang.java.ast.ASTClassOrInterfaceDeclaration#isSealed() %}, - {% jdoc !!java::lang.java.ast.ASTClassOrInterfaceDeclaration#isNonSealed() %}, - {% jdoc !!java::lang.java.ast.ASTClassOrInterfaceDeclaration#getPermittedSubclasses() %} - * {% jdoc java::lang.java.ast.ASTPermitsList %} - -#### Internal API - -Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0. -You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning. - -* The inner class {% jdoc !!core::cpd.TokenEntry.State %} is considered to be internal API. - It will probably be moved away with PMD 7. - ### External Contributions -* [#3367](https://github.com/pmd/pmd/pull/3367): \[apex] Check SOQL CRUD on for loops - [Jonathan Wiesel](https://github.com/jonathanwiesel) -* [#3373](https://github.com/pmd/pmd/pull/3373): \[apex] Add ApexCRUDViolation support for database class, inline no-arg object construction DML and inline list initialization DML - [Jonathan Wiesel](https://github.com/jonathanwiesel) -* [#3385](https://github.com/pmd/pmd/pull/3385): \[core] CPD: Optimize --skip-lexical-errors option - [Woongsik Choi](https://github.com/woongsikchoi) -* [#3388](https://github.com/pmd/pmd/pull/3388): \[doc] Add Code Inspector in the list of tools - [Julien Delange](https://github.com/juli1) -* [#3417](https://github.com/pmd/pmd/pull/3417): \[core] Support forcing a specific language from the command-line - [Aidan Harding](https://github.com/aidan-harding) - -### Stats -* 82 commits -* 29 closed tickets & PRs -* Days since last release: 35 - {% endtocmaker %} diff --git a/docs/pages/release_notes_old.md b/docs/pages/release_notes_old.md index 5092efedd0..c3f16303a4 100644 --- a/docs/pages/release_notes_old.md +++ b/docs/pages/release_notes_old.md @@ -5,6 +5,179 @@ permalink: pmd_release_notes_old.html Previous versions of PMD can be downloaded here: https://github.com/pmd/pmd/releases +## 28-August-2021 - 6.38.0-SNAPSHOT + +The PMD team is pleased to announce PMD 6.38.0-SNAPSHOT. + +This is a minor release. + +### Table Of Contents + +* [New and noteworthy](#new-and-noteworthy) + * [Java 17 Support](#java-17-support) + * [Updated PMD Designer](#updated-pmd-designer) + * [New rules](#new-rules) + * [Renamed rules](#renamed-rules) + * [Deprecated rules](#deprecated-rules) +* [Fixed Issues](#fixed-issues) +* [API Changes](#api-changes) + * [PMD CLI](#pmd-cli) + * [Experimental APIs](#experimental-apis) + * [Internal API](#internal-api) +* [External Contributions](#external-contributions) +* [Stats](#stats) + +### New and noteworthy + +#### Java 17 Support + +This release of PMD brings support for Java 17. PMD supports [JEP 409: Sealed Classes](https://openjdk.java.net/jeps/409) +which has been promoted to be a standard language feature of Java 17. + +PMD also supports [JEP 406: Pattern Matching for switch (Preview)](https://openjdk.java.net/jeps/406) 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 `17-preview`: + + export PMD_JAVA_OPTS=--enable-preview + ./run.sh pmd -language java -version 17-preview ... + +Note: Support for Java 15 preview language features have been removed. The version "15-preview" is no longer available. + +#### Updated PMD Designer + +This PMD release ships a new version of the pmd-designer. +For the changes, see [PMD Designer Changelog](https://github.com/pmd/pmd-designer/releases/tag/6.37.0). + +#### New rules + +This release ships with 3 new Java rules. + +* [`PrimitiveWrapperInstantiation`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_bestpractices.html#primitivewrapperinstantiation) reports usages of primitive wrapper + constructors. They are deprecated since Java 9 and should not be used. + +```xml + +``` + + The rule is part of the quickstart.xml ruleset. + +* [`SimplifiableTestAssertion`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_bestpractices.html#simplifiabletestassertion) suggests rewriting + some test assertions to be more readable. + +```xml + +``` + + The rule is part of the quickstart.xml ruleset. + +* [`ReturnEmptyCollectionRatherThanNull`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_errorprone.html#returnemptycollectionratherthannull) suggests returning empty collections / arrays + instead of null. + +```xml + +``` + + The rule is part of the quickstart.xml ruleset. + +#### Renamed rules + +* The Java rule [`MissingBreakInSwitch`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_errorprone.html#missingbreakinswitch) has been renamed to + [`ImplicitSwitchFallThrough`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_errorprone.html#implicitswitchfallthrough) (category error prone) to better reflect the rule's + purpose: The rule finds implicit fall-through cases in switch statements, which are most + likely unexpected. The old rule name described only one way how to avoid a fall-through, + namely using `break` but `continue`, `throw` and `return` avoid a fall-through + as well. This enables us to improve this rule in the future. + +#### Deprecated rules + +* The following Java rules are deprecated and removed from the quickstart ruleset, + as the new rule [`SimplifiableTestAssertion`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_bestpractices.html#simplifiabletestassertion) merges + their functionality: + * [`UseAssertEqualsInsteadOfAssertTrue`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_bestpractices.html#useassertequalsinsteadofasserttrue) + * [`UseAssertNullInsteadOfAssertTrue`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_bestpractices.html#useassertnullinsteadofasserttrue) + * [`UseAssertSameInsteadOfAssertTrue`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_bestpractices.html#useassertsameinsteadofasserttrue) + * [`UseAssertTrueInsteadOfAssertEquals`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_bestpractices.html#useasserttrueinsteadofassertequals) + * [`SimplifyBooleanAssertion`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_design.html#simplifybooleanassertion) + +* The Java rule [`ReturnEmptyArrayRatherThanNull`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_errorprone.html#returnemptyarrayratherthannull) is deprecated and removed from + the quickstart ruleset, as the new rule [`ReturnEmptyCollectionRatherThanNull`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_errorprone.html#returnemptycollectionratherthannull) + supersedes it. + +* The following Java rules are deprecated and removed from the quickstart ruleset, + as the new rule [`PrimitiveWrapperInstantiation`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_bestpractices.html#primitivewrapperinstantiation) merges + their functionality: + * [`BooleanInstantiation`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_performance.html#booleaninstantiation) + * [`ByteInstantiation`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_performance.html#byteinstantiation) + * [`IntegerInstantiation`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_performance.html#integerinstantiation) + * [`LongInstantiation`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_performance.html#longinstantiation) + * [`ShortInstantiation`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_performance.html#shortinstantiation) + +* The Java rule [`UnnecessaryWrapperObjectCreation`](https://pmd.github.io/pmd-6.38.0-SNAPSHOT/pmd_rules_java_performance.html#unnecessarywrapperobjectcreation) is deprecated + with no planned replacement before PMD 7. In it's current state, the rule is not useful + as it finds only contrived cases of creating a primitive wrapper and unboxing it explicitly + in the same expression. In PMD 7 this and more cases will be covered by a + new rule `UnnecessaryBoxing`. + +### Fixed Issues + +* apex + * [#3201](https://github.com/pmd/pmd/issues/3201): \[apex] ApexCRUDViolation doesn't report Database class DMLs, inline no-arg object instantiations and inline list initialization + * [#3329](https://github.com/pmd/pmd/issues/3329): \[apex] ApexCRUDViolation doesn't report SOQL for loops +* core + * [#1603](https://github.com/pmd/pmd/issues/1603): \[core] Language version comparison + * [#2133](https://github.com/pmd/pmd/issues/2133): \[xml] Allow to check Salesforce XML Metadata using XPath rules + * [#3377](https://github.com/pmd/pmd/issues/3377): \[core] NPE when specifying report file in current directory in PMD CLI + * [#3387](https://github.com/pmd/pmd/issues/3387): \[core] CPD should avoid unnecessary copies when running with --skip-lexical-errors +* java-bestpractices + * [#2908](https://github.com/pmd/pmd/issues/2908): \[java] Merge Junit assertion simplification rules + * [#3235](https://github.com/pmd/pmd/issues/3235): \[java] UseTryWithResources false positive when closeable is provided as a method argument or class field +* java-errorprone + * [#3361](https://github.com/pmd/pmd/issues/3361): \[java] Rename rule MissingBreakInSwitch to ImplicitSwitchFallThrough + * [#3382](https://github.com/pmd/pmd/pull/3382): \[java] New rule ReturnEmptyCollectionRatherThanNull +* java-performance + * [#3420](https://github.com/pmd/pmd/issues/3420): \[java] NPE in `InefficientStringBuffering` with Records + +### API Changes + +#### PMD CLI + +* PMD has a new CLI option `-force-language`. With that a language can be forced to be used for all input files, + irrespective of filenames. When using this option, the automatic language selection by extension is disabled + and all files are tried to be parsed with the given language. Parsing errors are ignored and unparsable files + are skipped. + + This option allows to use the xml language for files, that don't use xml as extension. + See also the examples on [PMD CLI reference](pmd_userdocs_cli_reference.html#analyze-other-xml-formats). + +#### Experimental APIs + +* The AST types and APIs around Sealed Classes are not experimental anymore: + * ASTClassOrInterfaceDeclaration#isSealed, + ASTClassOrInterfaceDeclaration#isNonSealed, + ASTClassOrInterfaceDeclaration#getPermittedSubclasses + * ASTPermitsList + +#### Internal API + +Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0. +You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning. + +* The inner class net.sourceforge.pmd.cpd.TokenEntry.State is considered to be internal API. + It will probably be moved away with PMD 7. + +### External Contributions + +* [#3367](https://github.com/pmd/pmd/pull/3367): \[apex] Check SOQL CRUD on for loops - [Jonathan Wiesel](https://github.com/jonathanwiesel) +* [#3373](https://github.com/pmd/pmd/pull/3373): \[apex] Add ApexCRUDViolation support for database class, inline no-arg object construction DML and inline list initialization DML - [Jonathan Wiesel](https://github.com/jonathanwiesel) +* [#3385](https://github.com/pmd/pmd/pull/3385): \[core] CPD: Optimize --skip-lexical-errors option - [Woongsik Choi](https://github.com/woongsikchoi) +* [#3388](https://github.com/pmd/pmd/pull/3388): \[doc] Add Code Inspector in the list of tools - [Julien Delange](https://github.com/juli1) +* [#3417](https://github.com/pmd/pmd/pull/3417): \[core] Support forcing a specific language from the command-line - [Aidan Harding](https://github.com/aidan-harding) + +### Stats +* 82 commits +* 29 closed tickets & PRs +* Days since last release: 35 + ## 26-June-2021 - 6.36.0 The PMD team is pleased to announce PMD 6.36.0.