-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpmd.xml
139 lines (114 loc) · 6.42 KB
/
pmd.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?xml version="1.0"?>
<ruleset name="exadelruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<rule ref="rulesets/basic.xml/EmptyCatchBlock">
<properties>
<property name="allowCommentedBlocks" value="true"/>
</properties>
</rule>
<rule ref="rulesets/basic.xml/EmptyIfStmt"/>
<rule ref="rulesets/basic.xml/EmptyWhileStmt"/>
<rule ref="rulesets/basic.xml/EmptyTryBlock"/>
<rule ref="rulesets/basic.xml/EmptyFinallyBlock"/>
<rule ref="rulesets/basic.xml/EmptySwitchStatements"/>
<rule ref="rulesets/basic.xml/JumbledIncrementer"/>
<rule ref="rulesets/basic.xml/UnnecessaryConversionTemporary"/>
<rule ref="rulesets/basic.xml/OverrideBothEqualsAndHashcode"/>
<rule ref="rulesets/basic.xml/ReturnFromFinallyBlock"/>
<rule ref="rulesets/basic.xml/EmptySynchronizedBlock"/>
<rule ref="rulesets/basic.xml/UnnecessaryReturn"/>
<rule ref="rulesets/basic.xml/EmptyStaticInitializer"/>
<rule ref="rulesets/basic.xml/UnconditionalIfStatement"/>
<rule ref="rulesets/basic.xml/BooleanInstantiation"/>
<rule ref="rulesets/basic.xml/UnnecessaryFinalModifier"/>
<rule ref="rulesets/basic.xml/UselessOverridingMethod"/>
<rule ref="rulesets/basic.xml/ClassCastExceptionWithToArray"/>
<rule ref="rulesets/basic.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/>
<rule ref="rulesets/basic.xml/UselessOperationOnImmutable"/>
<rule ref="rulesets/basic.xml/MisplacedNullCheck"/>
<rule ref="rulesets/basic.xml/UnusedNullCheckInEquals"/>
<rule ref="rulesets/basic.xml/BrokenNullCheck"/>
<rule ref="rulesets/basic.xml/BigIntegerInstantiation"/>
<rule ref="rulesets/clone.xml/ProperCloneImplementation"/>
<rule ref="rulesets/clone.xml/CloneThrowsCloneNotSupportedException"/>
<rule ref="rulesets/clone.xml/CloneMethodMustImplementCloneable"/>
<rule ref="rulesets/controversial.xml/UnnecessaryConstructor"/>
<rule ref="rulesets/controversial.xml/UnusedModifier"/>
<rule ref="rulesets/controversial.xml/AssignmentInOperand"/>
<!--rule ref="rulesets/controversial.xml/SingularField"/-->
<!--rule ref="rulesets/controversial.xml/DataflowAnomalyAnalysis"/-->
<rule ref="rulesets/coupling.xml/LooseCoupling"/>
<rule ref="rulesets/design.xml/SimplifyBooleanReturns"/>
<rule ref="rulesets/design.xml/SimplifyBooleanExpressions"/>
<rule ref="rulesets/design.xml/AvoidReassigningParameters"/>
<rule ref="rulesets/design.xml/ConstructorCallsOverridableMethod"/>
<rule ref="rulesets/design.xml/AccessorClassGeneration"/>
<rule ref="rulesets/design.xml/CloseResource"/>
<rule ref="rulesets/design.xml/NonStaticInitializer"/>
<rule ref="rulesets/design.xml/OptimizableToArrayCall"/>
<rule ref="rulesets/design.xml/DefaultLabelNotLastInSwitchStmt"/>
<rule ref="rulesets/design.xml/NonCaseLabelInSwitchStatement"/>
<rule ref="rulesets/design.xml/BadComparison"/>
<rule ref="rulesets/design.xml/EqualsNull"/>
<rule ref="rulesets/design.xml/InstantiationToGetClass"/>
<rule ref="rulesets/design.xml/IdempotentOperations"/>
<rule ref="rulesets/design.xml/SimpleDateFormatNeedsLocale"/>
<rule ref="rulesets/design.xml/ImmutableField"/>
<rule ref="rulesets/design.xml/UseLocaleWithCaseConversions"/>
<rule ref="rulesets/design.xml/AvoidProtectedFieldInFinalClass"/>
<rule ref="rulesets/design.xml/AssignmentToNonFinalStatic"/>
<rule ref="rulesets/design.xml/MissingStaticMethodInNonInstantiatableClass"/>
<!--<rule ref="rulesets/design.xml/AvoidSynchronizedAtMethodLevel"/>-->
<!-- TODO controversial rule -->
<!--rule ref="rulesets/design.xml/MissingBreakInSwitch"/-->
<rule ref="rulesets/design.xml/UseNotifyAllInsteadOfNotify"/>
<rule ref="rulesets/design.xml/AvoidInstanceofChecksInCatchClause"/>
<rule ref="rulesets/design.xml/AbstractClassWithoutAbstractMethod"/>
<rule ref="rulesets/design.xml/SimplifyConditional"/>
<rule ref="rulesets/design.xml/CompareObjectsWithEquals"/>
<rule ref="rulesets/design.xml/PositionLiteralsFirstInComparisons"/>
<rule ref="rulesets/design.xml/UnnecessaryLocalBeforeReturn"/>
<rule ref="rulesets/design.xml/NonThreadSafeSingleton"/>
<!--<rule ref="rulesets/design.xml/UncommentedEmptyMethod"/>-->
<!-- it can be used in subclasses -->
<rule ref="rulesets/design.xml/UncommentedEmptyConstructor"/>
<!--<rule ref="rulesets/design.xml/AvoidConstantsInterface"/>-->
<!-- TODO return it back -->
<rule ref="rulesets/design.xml/UnsynchronizedStaticDateFormatter"/>
<rule ref="rulesets/design.xml/PreserveStackTrace"/>
<rule ref="rulesets/design.xml/UseCollectionIsEmpty"/>
<rule ref="rulesets/design.xml/SingularField"/>
<rule ref="rulesets/design.xml/ReturnEmptyArrayRatherThanNull"/>
<rule ref="rulesets/design.xml/AbstractClassWithoutAnyMethod"/>
<rule ref="rulesets/finalizers.xml"/>
<rule ref="rulesets/imports.xml"/>
<!--<rule ref="rulesets/j2ee.xml"/>-->
<rule ref="rulesets/javabeans.xml">
<exclude name="BeanMembersShouldSerialize"/>
</rule>
<rule ref="rulesets/junit.xml"/>
<rule ref="rulesets/logging-java.xml/SystemPrintln"/>
<rule ref="rulesets/logging-java.xml/AvoidPrintStackTrace"/>
<rule ref="rulesets/logging-jakarta-commons.xml/UseCorrectExceptionLogging"/>
<rule ref="rulesets/optimizations.xml/SimplifyStartsWith"/>
<rule ref="rulesets/optimizations.xml/UseArraysAsList"/>
<rule ref="rulesets/optimizations.xml/AvoidArrayLoops"/>
<rule ref="rulesets/optimizations.xml/UnnecessaryWrapperObjectCreation"/>
<!-- rule ref="rulesets/optimizations.xml/AddEmptyString"/ -->
<rule ref="rulesets/strictexception.xml">
<exclude name="AvoidThrowingRawExceptionTypes"/>
</rule>
<rule ref="rulesets/strings.xml">
<exclude name="InsufficientStringBufferDeclaration"/>
<exclude name="AvoidDuplicateLiterals"/>
</rule>
<rule ref="rulesets/sunsecure.xml"/>
<rule ref="rulesets/unusedcode.xml"/>
<rule ref="rulesets/migrating.xml/IntegerInstantiation"/>
<!-- rule ref="rulesets/migrating.xml/ByteInstantiation"/ -->
<!-- rule ref="rulesets/migrating.xml/ShortInstantiation"/ -->
<!-- rule ref="rulesets/migrating.xml/LongInstantiation"/ -->
</ruleset>