Closed renovate[bot] closed 1 month ago
This PR contains the following updates:
7.6.0
7.7.0
π Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).
π¦ Automerge: Enabled.
β» Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
This PR contains the following updates:
7.6.0
->7.7.0
Release Notes
pmd/pmd (pmd)
### [`v7.7.0`](https://redirect.github.com/pmd/pmd/releases/tag/pmd_releases/7.7.0): PMD 7.7.0 (25-October-2024) ##### 25-October-2024 - 7.7.0 The PMD team is pleased to announce PMD 7.7.0. This is a minor release. ##### Table Of Contents - [π New and noteworthy](#new-and-noteworthy) - [CPD can now ignore literals and identifiers in C++ code](#cpd-can-now-ignore-literals-and-identifiers-in-c-code) - [π Rule Changes](#rule-changes) - [Changed Rules](#changed-rules) - [Renamed Rules](#renamed-rules) - [π Fixed Issues](#fixed-issues) - [π¨ API Changes](#api-changes) - [β¨ Merged pull requests](#merged-pull-requests) - [π¦ Dependency updates](#dependency-updates) - [π Stats](#stats) ##### π New and noteworthy ##### CPD can now ignore literals and identifiers in C++ code When searching for duplicated code in C++ differences in literals or identifiers can be ignored now (like in Java). This can be enabled via the command line options `--ignore-literal` and `--ignore-identifiers`.\ See [PR #5040](https://redirect.github.com/pmd/pmd/pull/5040) for details. ##### π Rule Changes ##### Changed Rules - [`SwitchStmtsShouldHaveDefault`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#switchstmtsshouldhavedefault) (Java Best Practices) doesn't report empty switch statements anymore. To detect these, use [`EmptyControlStatement`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_codestyle.html#emptycontrolstatement). - [`UnitTestShouldUseAfterAnnotation`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestshoulduseafterannotation) (Java Best Practices) now also considers JUnit 5 and TestNG tests. - [`UnitTestShouldUseBeforeAnnotation`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestshouldusebeforeannotation) (Java Best Practices) now also considers JUnit 5 and TestNG tests. - [`TooFewBranchesForSwitch`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_performance.html#toofewbranchesforswitch) (Java Performance) doesn't report empty switches anymore. To detect these, use [`EmptyControlStatement`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_codestyle.html#emptycontrolstatement). ##### Renamed Rules - Several rules for unit testing have been renamed to better reflect their actual scope. Lots of them were called after JUnit / JUnit 4, even when they applied to JUnit 5 and / or TestNG. - [`UnitTestAssertionsShouldIncludeMessage`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestassertionsshouldincludemessage) (Java Best Practices) has been renamed from `JUnitAssertionsShouldIncludeMessage`. - [`UnitTestContainsTooManyAsserts`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestcontainstoomanyasserts) (Java Best Practices) has been renamed from `JUnitTestContainsTooManyAsserts`. - [`UnitTestShouldIncludeAssert`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestshouldincludeassert) (Java Best Practices) has been renamed from `JUnitTestsShouldIncludeAssert`. - [`UnitTestShouldUseAfterAnnotation`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestshoulduseafterannotation) (Java Best Practices) has been renamed from `JUnit4TestShouldUseAfterAnnotation`. - [`UnitTestShouldUseBeforeAnnotation`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestshouldusebeforeannotation) (Java Best Practices) has been renamed from `JUnit4TestShouldUseBeforeAnnotation`. - [`UnitTestShouldUseTestAnnotation`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestshouldusetestannotation) (Java Best Practices) has been renamed from `JUnit4TestShouldUseTestAnnotation`. - Several rules about switch statements and switch expression have been renamed, as they apply both to Switch Statements and to Switch Expressions: - [`DefaultLabelNotLastInSwitch`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#defaultlabelnotlastinswitch) (Java Best Practices) has been renamed from `DefaultLabelNotLastInSwitchStmt`. - [`NonCaseLabelInSwitch`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_errorprone.html#noncaselabelinswitch) (Java Error Prone) has been renamed from `NonCaseLabelInSwitchStatement`. - [`TooFewBranchesForSwitch`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_performance.html#toofewbranchesforswitch) (Java Performance) has been renamed from `TooFewBranchesForASwitchStatement`. - [`NonExhaustiveSwitch`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#nonexhaustiveswitch) (Java Best Practices) has been renamed from `SwitchStmtsShouldHaveDefault`. The old rule names still work but are deprecated. ##### π Fixed Issues - apex-performance - [#5270](https://redirect.github.com/pmd/pmd/issues/5270): \[apex] AvoidNonRestrictiveQueries when LIMIT is followed by bind expression - java - [#4532](https://redirect.github.com/pmd/pmd/issues/4532): \[java] Rule misnomer for JUnit\* rules - [#5261](https://redirect.github.com/pmd/pmd/issues/5261): \[java] Record patterns with empty deconstructor lists lead to NPE - java-bestpractices - [#4286](https://redirect.github.com/pmd/pmd/issues/4286): \[java] Rename rule SwitchStmtsShouldHaveDefault to NonExhaustiveSwitch - [#4813](https://redirect.github.com/pmd/pmd/issues/4813): \[java] SwitchStmtsShouldHaveDefault false positive with pattern matching - java-codestyle - [#5253](https://redirect.github.com/pmd/pmd/issues/5253): \[java] BooleanGetMethodName: False-negatives with `Boolean` wrapper - java-design - [#5030](https://redirect.github.com/pmd/pmd/issues/5030): \[java] SwitchDensity false positive with pattern matching - java-errorprone - [#3362](https://redirect.github.com/pmd/pmd/issues/3362): \[java] ImplicitSwitchFallThrough should consider switch expressions - [#5067](https://redirect.github.com/pmd/pmd/issues/5067): \[java] CloseResource: False positive for FileSystems.getDefault() - [#5244](https://redirect.github.com/pmd/pmd/issues/5244): \[java] UselessOperationOnImmutable should detect java.time types - [#5257](https://redirect.github.com/pmd/pmd/issues/5257): \[java] NonCaseLabelInSwitch should consider switch expressions - java-performance - [#5249](https://redirect.github.com/pmd/pmd/issues/5249): \[java] TooFewBranchesForASwitchStatement false positive for Pattern Matching - [#5250](https://redirect.github.com/pmd/pmd/issues/5250): \[java] TooFewBranchesForASwitchStatement should consider Switch Expressions ##### π¨ API Changes - java-bestpractices - The old rule name `JUnit4TestShouldUseAfterAnnotation` has been deprecated. Use the new name [`UnitTestShouldUseAfterAnnotation`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestshoulduseafterannotation) instead. - The old rule name `JUnit4TestShouldUseBeforeAnnotation` has been deprecated. Use the new name [`UnitTestShouldUseBeforeAnnotation`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestshouldusebeforeannotation) instead. - The old rule name `JUnit4TestShouldUseTestAnnotation` has been deprecated. Use the new name [`UnitTestShouldUseTestAnnotation`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestshouldusetestannotation) instead. - The old rule name `JUnitAssertionsShouldIncludeMessage` has been deprecated. Use the new name [`UnitTestAssertionsShouldIncludeMessage`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestassertionsshouldincludemessage) instead. - The old rule name `JUnitTestContainsTooManyAsserts` has been deprecated. Use the new name [`UnitTestContainsTooManyAsserts`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestcontainstoomanyasserts) instead. - The old rule name `JUnitTestsShouldIncludeAssert` has been deprecated. Use the new name [`UnitTestShouldIncludeAssert`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unittestshouldincludeassert) instead. - The old rule name `DefaultLabelNotLastInSwitchStmt` has been deprecated. Use the new name [`DefaultLabelNotLastInSwitch`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#defaultlabelnotlastinswitch) instead. - The old rule name `SwitchStmtsShouldHaveDefault` has been deprecated. USe the new name [`NonExhaustiveSwitch`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#nonexhaustiveswitch) instead. - java-errorprone - The old rule name `NonCaseLabelInSwitchStatement` has been deprecated. Use the new name [`NonCaseLabelInSwitch`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_errorprone.html#noncaselabelinswitch) instead. - java-performance - The old rule name `TooFewBranchesForASwitchStatement` has been deprecated. Use the new name [`TooFewBranchesForSwitch`](https://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_performance.html#toofewbranchesforswitch) instead. ##### β¨ Merged pull requests - [#4965](https://redirect.github.com/pmd/pmd/pull/4965): Fix [#4532](https://redirect.github.com/pmd/pmd/issues/4532): \[java] Rename JUnit rules with overly restrictive names - [Juan MartΓn Sotuyo Dodero](https://redirect.github.com/jsotuyod) ([@jsotuyod](https://redirect.github.com/jsotuyod)) - [#5040](https://redirect.github.com/pmd/pmd/pull/5040): \[cpp] Ignore literals and ignore identifiers capability to C++ CPD - [Jakub Dupak](https://redirect.github.com/jdupak) ([@jdupak](https://redirect.github.com/jdupak)) - [#5225](https://redirect.github.com/pmd/pmd/pull/5225): Fix [#5067](https://redirect.github.com/pmd/pmd/issues/5067): \[java] CloseResource: False positive for FileSystems.getDefault() - [Lukas GrΓ€f](https://redirect.github.com/lukasgraef) ([@lukasgraef](https://redirect.github.com/lukasgraef)) - [#5241](https://redirect.github.com/pmd/pmd/pull/5241): Ignore javacc code in coverage report - [Juan MartΓn Sotuyo Dodero](https://redirect.github.com/jsotuyod) ([@jsotuyod](https://redirect.github.com/jsotuyod)) - [#5245](https://redirect.github.com/pmd/pmd/pull/5245): \[java] Improve UnitTestShouldUse{After,Before}Annotation rules to support JUnit5 and TestNG - [Andreas Dangel](https://redirect.github.com/adangel) ([@adangel](https://redirect.github.com/adangel)) - [#5247](https://redirect.github.com/pmd/pmd/pull/5247): Fix [#5030](https://redirect.github.com/pmd/pmd/issues/5030): \[java] SwitchDensity false positive with pattern matching - [Andreas Dangel](https://redirect.github.com/adangel) ([@adangel](https://redirect.github.com/adangel)) - [#5248](https://redirect.github.com/pmd/pmd/pull/5248): Fix [#3362](https://redirect.github.com/pmd/pmd/issues/3362): \[java] ImplicitSwitchFallThrough should consider switch expressions - [Andreas Dangel](https://redirect.github.com/adangel) ([@adangel](https://redirect.github.com/adangel)) - [#5251](https://redirect.github.com/pmd/pmd/pull/5251): Fix [#5249](https://redirect.github.com/pmd/pmd/issues/5249) and [#5250](https://redirect.github.com/pmd/pmd/issues/5250): \[java] TooFewBranchesForSwitch ignore pattern matching and support switch expressions - [Andreas Dangel](https://redirect.github.com/adangel) ([@adangel](https://redirect.github.com/adangel)) - [#5252](https://redirect.github.com/pmd/pmd/pull/5252): Fix [#4813](https://redirect.github.com/pmd/pmd/issues/4813): \[java] SwitchStmtsShouldHaveDefault false positive with pattern matching - [Andreas Dangel](https://redirect.github.com/adangel) ([@adangel](https://redirect.github.com/adangel)) - [#5255](https://redirect.github.com/pmd/pmd/pull/5255): \[java] Rename rule DefaultLabelNotLastInSwitch - [Andreas Dangel](https://redirect.github.com/adangel) ([@adangel](https://redirect.github.com/adangel)) - [#5256](https://redirect.github.com/pmd/pmd/pull/5256): Fix [#5257](https://redirect.github.com/pmd/pmd/issues/5257): \[java] NonCaseLabelInSwitch - support switch expressions - [Andreas Dangel](https://redirect.github.com/adangel) ([@adangel](https://redirect.github.com/adangel)) - [#5258](https://redirect.github.com/pmd/pmd/pull/5258): Ignore generated antlr classes in coverage reports - [Juan MartΓn Sotuyo Dodero](https://redirect.github.com/jsotuyod) ([@jsotuyod](https://redirect.github.com/jsotuyod)) - [#5264](https://redirect.github.com/pmd/pmd/pull/5264): Fix [#5261](https://redirect.github.com/pmd/pmd/issues/5261): \[java] Fix NPE with empty pattern list - [ClΓ©ment Fournier](https://redirect.github.com/oowekyala) ([@oowekyala](https://redirect.github.com/oowekyala)) - [#5267](https://redirect.github.com/pmd/pmd/pull/5267): \[java] Rename rule SwitchStmtsShouldHaveDefault to NonExhaustiveSwitch - [Andreas Dangel](https://redirect.github.com/adangel) ([@adangel](https://redirect.github.com/adangel)) - [#5269](https://redirect.github.com/pmd/pmd/pull/5269): Fix [#5253](https://redirect.github.com/pmd/pmd/issues/5253): \[java] Support Boolean wrapper class for BooleanGetMethodName rule - [Aryant Tripathi](https://redirect.github.com/Aryant-Tripathi) ([@Aryant-Tripathi](https://redirect.github.com/Aryant-Tripathi)) - [#5273](https://redirect.github.com/pmd/pmd/pull/5273): Fix [#5270](https://redirect.github.com/pmd/pmd/issues/5270): \[apex] AvoidNonRestrictiveQueries: Fix regex for detecting LIMIT clause - [Andreas Dangel](https://redirect.github.com/adangel) ([@adangel](https://redirect.github.com/adangel)) - [#5275](https://redirect.github.com/pmd/pmd/pull/5275): Use plugin-classpath to simplify javacc-wrapper.xml - [Andreas Dangel](https://redirect.github.com/adangel) ([@adangel](https://redirect.github.com/adangel)) - [#5278](https://redirect.github.com/pmd/pmd/pull/5278): \[java] CouplingBetweenObjects: improve violation message - [Andreas Dangel](https://redirect.github.com/adangel) ([@adangel](https://redirect.github.com/adangel)) - [#5279](https://redirect.github.com/pmd/pmd/pull/5279): Fix [#5244](https://redirect.github.com/pmd/pmd/issues/5244): \[java] UselessOperationOnImmutable: consider java.time.\* types - [Andreas Dangel](https://redirect.github.com/adangel) ([@adangel](https://redirect.github.com/adangel)) ##### π¦ Dependency updates - [#5234](https://redirect.github.com/pmd/pmd/issues/5234): Bump com.google.protobuf:protobuf-java from 3.25.3 to 4.28.2 - [#5274](https://redirect.github.com/pmd/pmd/issues/5274): Bump org.junit from 5.8.2 to 5.11.2 - [#5276](https://redirect.github.com/pmd/pmd/issues/5276): Bump org.checkerframework:checker-qual from 2.11.1 to 3.48.1 - [#5280](https://redirect.github.com/pmd/pmd/issues/5280): Bump danger from 9.5.0 to 9.5.1 in the all-gems group across 1 directory - [#5281](https://redirect.github.com/pmd/pmd/issues/5281): Bump org.scala-lang:scala-reflect from 2.13.13 to 2.13.15 ##### π Stats - 98 commits - 32 closed tickets & PRs - Days since last release: 27Configuration
π Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).
π¦ Automerge: Enabled.
β» Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.