You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: ruleset.xml
+10-2
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@
10
10
<ruleref="category/java/bestpractices.xml">
11
11
<excludename="AvoidReassigningParameters"/> <!-- In Java, this is OK, IMO -->
12
12
<excludename="SwitchStmtsShouldHaveDefault"/><!-- PMD doesn't recognize Java's new switch statements -->
13
+
<excludename="UseVarargs"/> <!-- PMD would suggest varargs wherever we pass an array to be sorted -->
13
14
</rule>
14
15
15
16
<ruleref="category/java/codestyle.xml">
@@ -21,6 +22,8 @@
21
22
<excludename="OnlyOneReturn"/> <!-- This rule might have made sense decades ago when methods where hundreds of lines long -->
22
23
<excludename="ShortClassName"/> <!-- Wouldn't allow class names like "User" -->
23
24
<excludename="ShortMethodName"/> <!-- Wouldn't allow method names like "of" -->
25
+
<excludename="ShortVariable"/> <!-- This is usually a valid check; however, in the search algorithms, we often use variables "i" and "j"Wouldn't allow method names like "of" -->
26
+
<excludename="CallSuperInConstructor"/> <!-- IMO, this would be noise -->
<excludename="LawOfDemeter"/> <!-- We don't want to apply this law -->
43
+
<excludename="CognitiveComplexity"/> <!-- This is usually a valid check; however, search algorithms *are* complex (we could make the code easier by extracting several methods, but I prefer to have it as close to the actual algorithm description as possible) -->
44
+
<excludename="CyclomaticComplexity"/> <!-- This is usually a valid check; however, search algorithms *are* complex (we could make the code easier by extracting several methods, but I prefer to have it as close to the actual algorithm description as possible) -->
45
+
<excludename="NPathComplexity"/> <!-- This is usually a valid check; however, search algorithms *are* complex (we could make the code easier by extracting several methods, but I prefer to have it as close to the actual algorithm description as possible) -->
0 commit comments