Skip to content

Commit 016c14d

Browse files
committed
Update junit related PMD rules
The following rules are disabled: * JUnitSpelling: Checking the spelling of several junit methods is no longer required with junit 4 since we use annotations to mark junit related methods. * JUnitTestsShouldIncludeAssert: We use Mockito verification in many tests. Hence, it is okay to have tests without asserts. * JUnitAssertionsShouldIncludeMessage: Including a message in every assert appears to be too verbose. The commit also adds the .eclipse-pmd file to gitignore. This file holds the configuration of the eclipse-pmd plugin (an alternative to the pmd-eclipse-plugin).
1 parent 16c3bcb commit 016c14d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Ignore Eclipse project files:
55
.checkstyle
66
.pmd
7+
.eclipse-pmd
78
.classpath
89
.project
910
.settings/

quality_assurance/pmd_rules.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050
</rule>
5151
<rule ref="rulesets/java/junit.xml">
5252
<exclude name="JUnitTestContainsTooManyAsserts" />
53-
<exclude name="UseAssertTrueInsteadOfAssertEquals" />
53+
<exclude name="JUnitSpelling" />
54+
<exclude name="JUnitAssertionsShouldIncludeMessage" />
55+
<exclude name="JUnitTestsShouldIncludeAssert" />
5456
</rule>
5557
<rule ref="rulesets/java/logging-java.xml" />
5658
<rule ref="rulesets/java/migrating.xml" />

0 commit comments

Comments
 (0)