[java] JUnitTestsShouldIncludeAssert - false positive with SoftAssertionsExtension #4113
Labels
a:false-positive
PMD flags a piece of code that is not problematic
Milestone
Affects PMD Version:
6.48.0+
7.0.0
Rule:
JUnitTestsShouldIncludeAssert
Description:
Rule has false positives when using
@ExtendWith(SoftAssertionsExtension.class)
for AssertJ soft assertions, which callassertAll
automatically so it's not required to call it explicitly in the tests.Code Sample demonstrating the issue:
Expected outcome:
No violations reported, but PMD incorrectly reports a violation for both
falsePositive1
andfalsePositive2
.Running PMD through: Gradle
The text was updated successfully, but these errors were encountered: