-
Notifications
You must be signed in to change notification settings - Fork 26
/
pmd-rulesets.xml
88 lines (76 loc) · 5.61 KB
/
pmd-rulesets.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?xml version="1.0"?>
<ruleset name="PMD-Rules">
<description>
The rulesets we want to use in pmd. For a detailed description of pmd rulesets: http://pmd.sourceforge.net/rules/index.html
</description>
<rule ref="rulesets/basic.xml/BooleanInstantiation"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/CollapsibleIfStatements"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/DoubleCheckedLocking"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/EmptyCatchBlock"> <priority>1</priority></rule>
<rule ref="rulesets/basic.xml/EmptyFinallyBlock"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/EmptyIfStmt"> <priority>1</priority></rule>
<rule ref="rulesets/basic.xml/EmptyStatementNotInLoop"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/EmptyStaticInitializer"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/EmptySwitchStatements"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/EmptySynchronizedBlock"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/EmptyTryBlock"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/EmptyWhileStmt"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/ForLoopShouldBeWhileLoop"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/JumbledIncrementer"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/OverrideBothEqualsAndHashcode"> <priority>1</priority></rule>
<rule ref="rulesets/basic.xml/ReturnFromFinallyBlock"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/UnconditionalIfStatement"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/UnnecessaryConversionTemporary"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/UnnecessaryFinalModifier"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/UnnecessaryReturn"> <priority>5</priority></rule>
<rule ref="rulesets/basic.xml/UselessOverridingMethod"> <priority>5</priority></rule>
<rule ref="rulesets/clone.xml/CloneMethodMustImplementCloneable"> <priority>1</priority></rule>
<rule ref="rulesets/clone.xml/CloneThrowsCloneNotSupportedException"> <priority>5</priority></rule>
<rule ref="rulesets/clone.xml/ProperCloneImplementation"> <priority>5</priority></rule>
<rule ref="rulesets/codesize.xml/CyclomaticComplexity"> <priority>5</priority></rule>
<rule ref="rulesets/codesize.xml/ExcessiveClassLength"> <priority>5</priority></rule>
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"> <priority>5</priority></rule>
<rule ref="rulesets/codesize.xml/ExcessiveParameterList"> <priority>5</priority></rule>
<rule ref="rulesets/codesize.xml/ExcessivePublicCount"> <priority>5</priority></rule>
<rule ref="rulesets/codesize.xml/TooManyFields"> <priority>5</priority></rule>
<rule ref="rulesets/controversial.xml/UnnecessaryConstructor"> <priority>5</priority></rule>
<rule ref="rulesets/controversial.xml/NullAssignment"> <priority>5</priority></rule>
<rule ref="rulesets/coupling.xml/CouplingBetweenObjects"> <priority>5</priority></rule>
<rule ref="rulesets/coupling.xml/ExcessiveImports"> <priority>5</priority></rule>
<rule ref="rulesets/coupling.xml/LooseCoupling"> <priority>5</priority></rule>
<rule ref="rulesets/finalizers.xml/EmptyFinalizer"> <priority>5</priority></rule>
<rule ref="rulesets/finalizers.xml/FinalizeOnlyCallsSuperFinalize"> <priority>5</priority></rule>
<rule ref="rulesets/finalizers.xml/FinalizeOverloaded"> <priority>5</priority></rule>
<rule ref="rulesets/finalizers.xml/FinalizeDoesNotCallSuperFinalize"> <priority>5</priority></rule>
<rule ref="rulesets/finalizers.xml/FinalizeShouldBeProtected"> <priority>5</priority></rule>
<rule ref="rulesets/finalizers.xml/AvoidCallingFinalize"> <priority>5</priority></rule>
<rule ref="rulesets/imports.xml/DuplicateImports"> <priority>1</priority></rule>
<rule ref="rulesets/imports.xml/DontImportJavaLang"> <priority>5</priority></rule>
<rule ref="rulesets/imports.xml/UnusedImports"> <priority>1</priority></rule>
<rule ref="rulesets/imports.xml/ImportFromSamePackage"> <priority>5</priority></rule>
<rule ref="rulesets/strings.xml/StringToString"> <priority>1</priority></rule>
<rule ref="rulesets/strings.xml/StringInstantiation"> <priority>5</priority></rule>
<rule ref="rulesets/sunsecure.xml/MethodReturnsInternalArray"> <priority>5</priority></rule>
<rule ref="rulesets/sunsecure.xml/ArrayIsStoredDirectly"> <priority>5</priority></rule>
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"> <priority>1</priority></rule>
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField"> <priority>1</priority></rule>
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"> <priority>1</priority></rule>
<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"> <priority>1</priority></rule>
<rule name="DontImportWild" message="Please no wild card imports" class="net.sourceforge.pmd.rules.XPathRule">
<description>We don't take kindly to imports such as java.net.* round these parts</description>
<priority>1</priority>
<properties>
<property name="xpath">
<value>
<![CDATA[/ImportDeclaration[@PackageName=@ImportedName]]]>
</value>
</property>
</properties>
<example>
<![CDATA[
import java.net.*; //is bad
import java.net.URL; //is better
]]>
</example>
</rule>
</ruleset>