25 October 2024
The PMD team is pleased to announce PMD 7.7.0.
This is a minor release.
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 for details.
SwitchStmtsShouldHaveDefault
(Java Best Practices) doesn’t report empty switch statements anymore.
To detect these, use EmptyControlStatement
.UnitTestShouldUseAfterAnnotation
(Java Best Practices) now also considers JUnit 5 and TestNG tests.UnitTestShouldUseBeforeAnnotation
(Java Best Practices) now also considers JUnit 5 and TestNG tests.TooFewBranchesForSwitch
(Java Performance) doesn’t report empty switches anymore.
To detect these, use EmptyControlStatement
.UnitTestAssertionsShouldIncludeMessage
(Java Best Practices) has been renamed from JUnitAssertionsShouldIncludeMessage
.UnitTestContainsTooManyAsserts
(Java Best Practices) has been renamed from JUnitTestContainsTooManyAsserts
.UnitTestShouldIncludeAssert
(Java Best Practices) has been renamed from JUnitTestsShouldIncludeAssert
.UnitTestShouldUseAfterAnnotation
(Java Best Practices) has been renamed from JUnit4TestShouldUseAfterAnnotation
.UnitTestShouldUseBeforeAnnotation
(Java Best Practices) has been renamed from JUnit4TestShouldUseBeforeAnnotation
.UnitTestShouldUseTestAnnotation
(Java Best Practices) has been renamed from JUnit4TestShouldUseTestAnnotation
.DefaultLabelNotLastInSwitch
(Java Best Practices) has been renamed from DefaultLabelNotLastInSwitchStmt
.NonCaseLabelInSwitch
(Java Error Prone) has been renamed from NonCaseLabelInSwitchStatement
.TooFewBranchesForSwitch
(Java Performance) has been renamed from TooFewBranchesForASwitchStatement
.NonExhaustiveSwitch
(Java Best Practices) has been renamed from SwitchStmtsShouldHaveDefault
.The old rule names still work but are deprecated.
Boolean
wrapperJUnit4TestShouldUseAfterAnnotation
has been deprecated. Use the new name UnitTestShouldUseAfterAnnotation
instead.JUnit4TestShouldUseBeforeAnnotation
has been deprecated. Use the new name UnitTestShouldUseBeforeAnnotation
instead.JUnit4TestShouldUseTestAnnotation
has been deprecated. Use the new name UnitTestShouldUseTestAnnotation
instead.JUnitAssertionsShouldIncludeMessage
has been deprecated. Use the new name UnitTestAssertionsShouldIncludeMessage
instead.JUnitTestContainsTooManyAsserts
has been deprecated. Use the new name UnitTestContainsTooManyAsserts
instead.JUnitTestsShouldIncludeAssert
has been deprecated. Use the new name UnitTestShouldIncludeAssert
instead.DefaultLabelNotLastInSwitchStmt
has been deprecated. Use the new name DefaultLabelNotLastInSwitch
instead.SwitchStmtsShouldHaveDefault
has been deprecated. USe the new name NonExhaustiveSwitch
instead.NonCaseLabelInSwitchStatement
has been deprecated. Use the new name NonCaseLabelInSwitch
instead.TooFewBranchesForASwitchStatement
has been deprecated. Use the new name TooFewBranchesForSwitch
instead.