-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpmd.xml
More file actions
224 lines (216 loc) · 11.6 KB
/
pmd.xml
File metadata and controls
224 lines (216 loc) · 11.6 KB
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<ruleset xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="Maven PMD Plugin Ruleset"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
<description>
The Basic ruleset contains a collection of good practices which should be followed.
</description>
<!-- Rules which enforce generally accepted best practices.-->
<!-- https://pmd.github.io/pmd-6.38.0/pmd_rules_java_bestpractices.html -->
<rule ref="category/java/bestpractices.xml/AbstractClassWithoutAbstractMethod" />
<rule ref="category/java/bestpractices.xml/AccessorClassGeneration" />
<rule ref="category/java/bestpractices.xml/AccessorMethodGeneration" />
<rule ref="category/java/bestpractices.xml/ArrayIsStoredDirectly" />
<rule ref="category/java/bestpractices.xml/AvoidMessageDigestField" />
<rule ref="category/java/bestpractices.xml/AvoidPrintStackTrace" />
<rule ref="category/java/bestpractices.xml/AvoidReassigningCatchVariables" />
<rule ref="category/java/bestpractices.xml/AvoidReassigningLoopVariables">
<properties>
<property name="foreachReassign" value="allow" />
<property name="forReassign" value="allow" />
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/AvoidReassigningParameters" />
<rule ref="category/java/bestpractices.xml/AvoidStringBufferField" />
<rule ref="category/java/bestpractices.xml/CheckResultSet" />
<rule ref="category/java/bestpractices.xml/ConstantsInInterface">
<properties>
<property name="ignoreIfHasMethods" value="true" />
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/DefaultLabelNotLastInSwitch" />
<rule ref="category/java/bestpractices.xml/DoubleBraceInitialization" />
<rule ref="category/java/bestpractices.xml/ForLoopCanBeForeach" />
<rule ref="category/java/bestpractices.xml/ForLoopVariableCount">
<properties>
<property name="maximumVariables" value="1" />
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/GuardLogStatement">
<properties>
<property name="logLevels" value="trace,debug" />
<property name="guardsMethods" value="isTraceEnabled,isDebugEnabled" />
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/LiteralsFirstInComparisons" />
<rule ref="category/java/bestpractices.xml/MissingOverride" />
<rule ref="category/java/bestpractices.xml/OneDeclarationPerLine" />
<rule ref="category/java/bestpractices.xml/PrimitiveWrapperInstantiation" />
<rule ref="category/java/bestpractices.xml/ReplaceEnumerationWithIterator" />
<rule ref="category/java/bestpractices.xml/ReplaceHashtableWithMap" />
<rule ref="category/java/bestpractices.xml/ReplaceVectorWithList" />
<rule ref="category/java/bestpractices.xml/SimplifiableTestAssertion" />
<rule ref="category/java/bestpractices.xml/NonExhaustiveSwitch" />
<rule ref="category/java/bestpractices.xml/SystemPrintln" />
<rule ref="category/java/bestpractices.xml/UnnecessaryVarargsArrayCreation" />
<rule ref="category/java/bestpractices.xml/UnusedAssignment">
<properties>
<property name="checkUnusedPrefixIncrement" value="false" />
<property name="reportUnusedVariables" value="false" />
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter">
<properties>
<property name="checkAll" value="false" />
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable" />
<rule ref="category/java/bestpractices.xml/UnusedPrivateField"/>
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty" />
<rule ref="category/java/bestpractices.xml/UseStandardCharsets" />
<rule ref="category/java/bestpractices.xml/UseTryWithResources">
<properties>
<property name="closeMethods" value="close,closeQuietly" />
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/UseVarargs" />
<rule ref="category/java/bestpractices.xml/UseEnumCollections" />
<rule ref="category/java/bestpractices.xml/WhileLoopWithLiteralBoolean" />
<!-- Rules which enforce a specific coding style-->
<!-- https://pmd.github.io/pmd-6.38.0/pmd_rules_java_codestyle.html -->
<rule ref="category/java/codestyle.xml/AvoidDollarSigns" />
<rule ref="category/java/codestyle.xml/AvoidProtectedFieldInFinalClass" />
<rule ref="category/java/codestyle.xml/AvoidProtectedMethodInFinalClassNotExtending" />
<rule ref="category/java/codestyle.xml/AvoidUsingNativeCode" />
<rule ref="category/java/codestyle.xml/BooleanGetMethodName">
<properties>
<property name="checkParameterizedMethods" value="false" />
</properties>
</rule>
<rule ref="category/java/codestyle.xml/ClassNamingConventions" />
<rule ref="category/java/codestyle.xml/ConfusingTernary">
<properties>
<property name="ignoreElseIf" value="true" />
</properties>
</rule>
<rule ref="category/java/codestyle.xml/ControlStatementBraces" />
<rule ref="category/java/codestyle.xml/EmptyMethodInAbstractClassShouldBeAbstract" />
<rule ref="category/java/codestyle.xml/EmptyControlStatement">
<properties>
<property name="allowCommentedBlocks" value="true" />
</properties>
</rule>
<rule ref="category/java/codestyle.xml/ExtendsObject" />
<rule ref="category/java/codestyle.xml/FieldDeclarationsShouldBeAtStartOfClass">
<properties>
<property name="ignoreEnumDeclarations" value="true" />
<property name="ignoreAnonymousClassDeclarations" value="true" />
<property name="ignoreInterfaceDeclarations" value="false" />
</properties>
</rule>
<rule ref="category/java/codestyle.xml/FieldNamingConventions" />
<rule ref="category/java/codestyle.xml/FormalParameterNamingConventions" />
<rule ref="category/java/codestyle.xml/GenericsNaming" />
<rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop" />
<rule ref="category/java/codestyle.xml/IdenticalCatchBranches" />
<rule ref="category/java/codestyle.xml/UnnecessaryBoxing" />
<rule ref="category/java/codestyle.xml/UnnecessaryCast" />
<rule ref="category/java/codestyle.xml/UnnecessaryConstructor" />
<rule ref="category/java/codestyle.xml/UnnecessaryLocalBeforeReturn" />
<rule ref="category/java/codestyle.xml/UnnecessaryModifier" />
<rule ref="category/java/codestyle.xml/UnnecessaryReturn" />
<rule ref="category/java/codestyle.xml/UselessQualifiedThis" />
<rule ref="category/java/codestyle.xml/UseShortArrayInitializer" />
<rule ref="category/java/codestyle.xml/UseUnderscoresInNumericLiterals">
<properties>
<property name="acceptableDecimalLength" value="4" />
</properties>
</rule>
<rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName">
<properties>
<property name="reportStaticMethods" value="true" />
<property name="reportStaticFields" value="true" />
</properties>
</rule>
<!-- Rules that help you discover design issues.-->
<!-- https://pmd.github.io/pmd-6.38.0/pmd_rules_java_design.html -->
<rule ref="category/java/design.xml/AbstractClassWithoutAnyMethod" />
<!-- <rule ref="category/java/design.xml/AvoidCatchingGenericException" />-->
<rule ref="category/java/design.xml/AvoidDeeplyNestedIfStmts" />
<rule ref="category/java/design.xml/AvoidRethrowingException" />
<rule ref="category/java/design.xml/AvoidThrowingNewInstanceOfSameException" />
<rule ref="category/java/design.xml/AvoidThrowingNullPointerException" />
<rule ref="category/java/design.xml/AvoidThrowingRawExceptionTypes" />
<rule ref="category/java/design.xml/AvoidUncheckedExceptionsInSignatures" />
<rule ref="category/java/design.xml/ClassWithOnlyPrivateConstructorsShouldBeFinal" />
<rule ref="category/java/design.xml/CognitiveComplexity" />
<rule ref="category/java/design.xml/CollapsibleIfStatements" />
<rule ref="category/java/design.xml/CyclomaticComplexity">
<properties>
<property name="classReportLevel" value="100" />
<property name="methodReportLevel" value="10" />
</properties>
</rule>
<rule ref="category/java/design.xml/DoNotExtendJavaLangError" />
<rule ref="category/java/design.xml/ExceptionAsFlowControl" />
<rule ref="category/java/design.xml/FinalFieldCouldBeStatic" />
<rule ref="category/java/design.xml/GodClass" />
<rule ref="category/java/design.xml/LogicInversion" />
<rule ref="category/java/design.xml/MutableStaticState" />
<rule ref="category/java/design.xml/NcssCount">
<properties>
<property name="methodReportLevel" value="20" />
<property name="classReportLevel" value="250" />
</properties>
</rule>
<rule ref="category/java/design.xml/NPathComplexity">
<properties>
<property name="reportLevel" value="10" />
</properties>
</rule>
<rule ref="category/java/design.xml/SimplifiedTernary" />
<rule ref="category/java/design.xml/SimplifyBooleanExpressions" />
<rule ref="category/java/design.xml/SimplifyConditional" />
<rule ref="category/java/design.xml/SingularField"> ?
<properties>
<property name="ignoredAnnotations" value="lombok.Setter,lombok.Getter,lombok.Builder,
lombok.Data,lombok.RequiredArgsConstructor,lombok.AllArgsConstructor,lombok.Value,
lombok.NoArgsConstructor,lombok.experimental.Delegate,lombok.EqualsAndHashCode" />
</properties>
</rule>
<rule ref="category/java/design.xml/SwitchDensity" />
<rule ref="category/java/design.xml/TooManyFields">
<properties>
<property name="maxfields" value="15" />
</properties>
</rule>
<rule ref="category/java/design.xml/TooManyMethods">
<properties>
<property name="maxmethods" value="15" />
</properties>
</rule>
<rule ref="category/java/design.xml/UselessOverridingMethod" />
<rule ref="category/java/design.xml/UseObjectForClearerAPI" />
<rule ref="category/java/design.xml/UseUtilityClass" />
<!-- Rules that help you discover documentation issues.-->
<!-- https://pmd.sourceforge.io/pmd-6.38.0/pmd_rules_java_documentation.html -->
<rule ref="category/java/documentation.xml/UncommentedEmptyConstructor" />
<rule ref="category/java/documentation.xml/UncommentedEmptyMethodBody" />
<!-- Rules that help you discover documentation issues.-->
<!-- https://pmd.sourceforge.io/pmd-6.38.0/pmd_rules_java_errorprone.html -->
<rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals">
<properties>
<property name="skipAnnotations" value="true" />
</properties>
</rule>
<rule ref="category/java/errorprone.xml/NullAssignment" />
<rule ref="category/java/errorprone.xml/AvoidLiteralsInIfCondition" />
<rule ref="category/java/errorprone.xml/ConfusingArgumentToVarargsMethod" />
<rule ref="category/java/errorprone.xml/EmptyCatchBlock">
<properties>
<property name="allowCommentedBlocks" value="true" />
</properties>
</rule>
<rule ref="category/java/multithreading.xml/AvoidSynchronizedStatement" />
<rule ref="category/java/multithreading.xml/AvoidSynchronizedAtMethodLevel" />
<rule ref="category/java/multithreading.xml/AvoidThreadGroup" />
</ruleset>