forked from typetools/checker-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pmd-ruleset.xml
More file actions
370 lines (348 loc) · 23.5 KB
/
Copy path.pmd-ruleset.xml
File metadata and controls
370 lines (348 loc) · 23.5 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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="myrules"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>Java PMD rules.</description>
<!-- best practices rules -->
<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/AvoidStringBufferField" />
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP" />
<rule ref="category/java/bestpractices.xml/CheckResultSet" />
<rule ref="category/java/bestpractices.xml/ConstantsInInterface" />
<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" />
<rule ref="category/java/bestpractices.xml/GuardLogStatement">
<properties>
<property name="logLevels" value="trace,debug,warn,error,log,finest,finer,fine,info,warning,severe" />
<!-- Adds "isEnabled" to the default list. -->
<property name="guardsMethods" value="isTraceEnabled,isDebugEnabled,isInfoEnabled,isWarnEnabled,isErrorEnabled,isLoggable,isEnabled" />
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/ImplicitFunctionalInterface" />
<rule ref="category/java/bestpractices.xml/JUnit4SuitesShouldUseSuiteAnnotation" />
<rule ref="category/java/bestpractices.xml/JUnitJupiterTestShouldBePackagePrivate" />
<rule ref="category/java/bestpractices.xml/JUnitUseExpected" />
<rule ref="category/java/bestpractices.xml/MethodReturnsInternalArray" />
<rule ref="category/java/bestpractices.xml/MissingOverride" />
<rule ref="category/java/bestpractices.xml/NonExhaustiveSwitch" />
<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/UnnecessaryVarargsArrayCreation" />
<rule ref="category/java/bestpractices.xml/UnnecessaryWarningSuppression" />
<rule ref="category/java/bestpractices.xml/UnusedAssignment" />
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter" />
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable" />
<rule ref="category/java/bestpractices.xml/UnusedPrivateField" />
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod" />
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty" />
<rule ref="category/java/bestpractices.xml/UseEnumCollections" />
<rule ref="category/java/bestpractices.xml/UseStandardCharsets" />
<rule ref="category/java/bestpractices.xml/UseTryWithResources" />
<rule ref="category/java/bestpractices.xml/WhileLoopWithLiteralBoolean" />
<!-- best practices rules we are not using
<rule ref="category/java/bestpractices.xml/AvoidPrintStackTrace" />
<rule ref="category/java/bestpractices.xml/AvoidReassigningParameters" />
<rule ref="category/java/bestpractices.xml/AvoidReassigningCatchVariables" />
<rule ref="category/java/bestpractices.xml/AvoidReassigningLoopVariables" />
<rule ref="category/java/bestpractices.xml/ExhaustiveSwitchHasDefault" /> Including a default is protection against future changes to the enum.
<rule ref="category/java/bestpractices.xml/LiteralsFirstInComparisons" />
<rule ref="category/java/bestpractices.xml/LooseCoupling" />
<rule ref="category/java/bestpractices.xml/PreserveStackTrace" />
<rule ref="category/java/bestpractices.xml/RelianceOnDefaultCharset" /> Java 18+ uses UTF-8 as the default character encoding.
<rule ref="category/java/bestpractices.xml/SystemPrintln" />
<rule ref="category/java/bestpractices.xml/UnitTestAssertionsShouldIncludeMessage" />
<rule ref="category/java/bestpractices.xml/UnitTestContainsTooManyAsserts" />
<rule ref="category/java/bestpractices.xml/UnitTestShouldIncludeAssert" />
<rule ref="category/java/bestpractices.xml/UnitTestShouldUseAfterAnnotation" />
<rule ref="category/java/bestpractices.xml/UnitTestShouldUseBeforeAnnotation" />
<rule ref="category/java/bestpractices.xml/UnitTestShouldUseTestAnnotation" />
<rule ref="category/java/bestpractices.xml/UseVarargs" />
-->
<!-- code style rules -->
<rule ref="category/java/codestyle.xml/AtLeastOneConstructor" />
<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" />
<rule ref="category/java/codestyle.xml/ControlStatementBraces" />
<rule ref="category/java/codestyle.xml/EmptyControlStatement">
<properties>
<property name="allowCommentedBlocks" value="true" />
</properties>
</rule>
<rule ref="category/java/codestyle.xml/EmptyMethodInAbstractClassShouldBeAbstract" />
<rule ref="category/java/codestyle.xml/ExtendsObject" />
<rule ref="category/java/codestyle.xml/FinalParameterInAbstractMethod" />
<rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop" />
<rule ref="category/java/codestyle.xml/LambdaCanBeMethodReference" />
<rule ref="category/java/codestyle.xml/LocalHomeNamingConvention" />
<rule ref="category/java/codestyle.xml/LocalInterfaceSessionNamingConvention" />
<rule ref="category/java/codestyle.xml/MDBAndSessionBeanNamingConvention" />
<rule ref="category/java/codestyle.xml/ModifierOrder" />
<rule ref="category/java/codestyle.xml/NoPackage" />
<rule ref="category/java/codestyle.xml/PackageCase" />
<rule ref="category/java/codestyle.xml/RemoteInterfaceNamingConvention" />
<rule ref="category/java/codestyle.xml/RemoteSessionInterfaceNamingConvention" />
<rule ref="category/java/codestyle.xml/UnnecessaryAnnotationValueElement" />
<rule ref="category/java/codestyle.xml/UnnecessaryBoxing" />
<rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName" />
<rule ref="category/java/codestyle.xml/UnnecessaryImport" />
<rule ref="category/java/codestyle.xml/UnnecessarySemicolon" />
<rule ref="category/java/codestyle.xml/UseDiamondOperator" />
<rule ref="category/java/codestyle.xml/UseExplicitTypes" />
<rule ref="category/java/codestyle.xml/UselessQualifiedThis" />
<rule ref="category/java/codestyle.xml/UseShortArrayInitializer" />
<rule ref="category/java/codestyle.xml/UseUnderscoresInNumericLiterals" />
<!-- code style rules that might be useful, but generate too much noise for now
<rule ref="category/java/codestyle.xml/CallSuperInConstructor" />
<rule ref="category/java/codestyle.xml/ConfusingTernary" />
<rule ref="category/java/codestyle.xml/FieldDeclarationsShouldBeAtStartOfClass" />
<rule ref="category/java/codestyle.xml/LinguisticNaming" />
<rule ref="category/java/codestyle.xml/LocalVariableCouldBeFinal" />
<rule ref="category/java/codestyle.xml/MethodArgumentCouldBeFinal" />
<rule ref="category/java/codestyle.xml/PrematureDeclaration" />
-->
<!-- code style rules that seem to be broken
<rule ref="category/java/codestyle.xml/UnnecessaryCast" /> This is issued even if there is a type qualifier in the cast.
<rule ref="category/java/codestyle.xml/UnnecessaryConstructor" /> This is issued even though doclint requires that there be no default constructor (it must be explicit).
<rule ref="category/java/codestyle.xml/IdenticalCatchBranches" />
-->
<!-- code style rules we are not using
<rule ref="category/java/codestyle.xml/ClassNamingConventions" />
<rule ref="category/java/codestyle.xml/CommentDefaultAccessModifier" />
<rule ref="category/java/codestyle.xml/FieldNamingConventions" />
<rule ref="category/java/codestyle.xml/FormalParameterNamingConventions" />
<rule ref="category/java/codestyle.xml/LocalVariableNamingConventions" />
<rule ref="category/java/codestyle.xml/LongVariable" />
<rule ref="category/java/codestyle.xml/MethodNamingConventions" />
<rule ref="category/java/codestyle.xml/OnlyOneReturn" />
<rule ref="category/java/codestyle.xml/ShortClassName" /> Complains about "Type", "Node", etc.
<rule ref="category/java/codestyle.xml/ShortMethodName" />
<rule ref="category/java/codestyle.xml/ShortVariable" />
<rule ref="category/java/codestyle.xml/TooManyStaticImports" />
<rule ref="category/java/codestyle.xml/TypeParameterNamingConventions" />
<rule ref="category/java/codestyle.xml/UnnecessaryModifier" /> Redundant `public` can be useful.
<rule ref="category/java/codestyle.xml/UnnecessaryReturn" /> `return;` can be useful.
<rule ref="category/java/codestyle.xml/UselessParentheses" /> Redundant parens can be helpful, for example to emphasize subexpressions in string concatenation.
<rule ref="category/java/codestyle.xml/VariableCanBeInlined" /> Naming a value can improve readability.
-->
<!-- design rules -->
<rule ref="category/java/design.xml/AbstractClassWithoutAnyMethod" />
<rule ref="category/java/design.xml/AvoidRethrowingException" />
<rule ref="category/java/design.xml/AvoidThrowingNewInstanceOfSameException" /> <!-- buggy: complains even if the message is changed. -->
<rule ref="category/java/design.xml/AvoidThrowingNullPointerException" />
<rule ref="category/java/design.xml/AvoidUncheckedExceptionsInSignatures" />
<rule ref="category/java/design.xml/ClassWithOnlyPrivateConstructorsShouldBeFinal" />
<rule ref="category/java/design.xml/DoNotExtendJavaLangError" />
<rule ref="category/java/design.xml/ExceptionAsFlowControl" />
<rule ref="category/java/design.xml/ExcessiveParameterList" />
<rule ref="category/java/design.xml/FinalFieldCouldBeStatic" />
<rule ref="category/java/design.xml/InvalidJavaBean" />
<rule ref="category/java/design.xml/LogicInversion" />
<rule ref="category/java/design.xml/SignatureDeclareThrowsException" />
<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/UselessOverridingMethod" />
<rule ref="category/java/design.xml/UseUtilityClass" />
<!-- design rules that seem to be broken.
<rule ref="category/java/design.xml/SingularField" />
False positive in Options.java
-->
<!-- design rules that might be useful, but generate too much noise for now
<rule ref="category/java/design.xml/CollapsibleIfStatements" />
<rule ref="category/java/design.xml/ImmutableField" />
<rule ref="category/java/design.xml/MutableStaticState" />
-->
<!-- design rules we are not using
<rule ref="category/java/design.xml/AvoidCatchingGenericException" />
<rule ref="category/java/design.xml/AvoidDeeplyNestedIfStmts" />
<rule ref="category/java/design.xml/AvoidThrowingRawExceptionTypes" />
<rule ref="category/java/design.xml/CognitiveComplexity" />
<rule ref="category/java/design.xml/CouplingBetweenObjects" />
<rule ref="category/java/design.xml/CyclomaticComplexity" />
<rule ref="category/java/design.xml/DataClass" />
<rule ref="category/java/design.xml/ExcessiveImports" />
<rule ref="category/java/design.xml/ExcessivePublicCount" />
<rule ref="category/java/design.xml/GodClass" />
<rule ref="category/java/design.xml/LawOfDemeter" />
<rule ref="category/java/design.xml/LoosePackageCoupling" />
<rule ref="category/java/design.xml/NcssCount" />
<rule ref="category/java/design.xml/NPathComplexity" />
<rule ref="category/java/design.xml/SimplifyBooleanReturns" /> Suggests too-clever boolean expressions to replace simpler code.
<rule ref="category/java/design.xml/SwitchDensity" />
<rule ref="category/java/design.xml/TooManyFields" />
<rule ref="category/java/design.xml/TooManyMethods" />
-->
<!-- documentation rules -->
<rule ref="category/java/documentation.xml/CommentContent" />
<rule ref="category/java/documentation.xml/UncommentedEmptyMethodBody" />
<!-- documentation rules that seem to be broken
<rule ref="category/java/documentation.xml/DanglingJavadoc" /> False positive for record constructors.
-->
<!-- documentation rules we are not using
<rule ref="category/java/documentation.xml/CommentRequired" /> A good rule, but too disruptive to apply without lint-diff.
<rule ref="category/java/documentation.xml/CommentSize" />
<rule ref="category/java/documentation.xml/UncommentedEmptyConstructor" />
-->
<!-- error prone rules -->
<rule ref="category/java/errorprone.xml/AssignmentInOperand">
<properties>
<property name="allowIncrementDecrement" value="true" />
<!-- permit "i++" -->
</properties>
</rule>
<rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic" />
<rule ref="category/java/errorprone.xml/AvoidAssertAsIdentifier" />
<rule ref="category/java/errorprone.xml/AvoidCallingFinalize" />
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor" />
<rule ref="category/java/errorprone.xml/AvoidEnumAsIdentifier" />
<rule ref="category/java/errorprone.xml/AvoidFieldNameMatchingTypeName" />
<rule ref="category/java/errorprone.xml/AvoidInstanceofChecksInCatchClause" />
<rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators" />
<rule ref="category/java/errorprone.xml/AvoidUsingOctalValues" />
<rule ref="category/java/errorprone.xml/BrokenNullCheck" />
<rule ref="category/java/errorprone.xml/CallSuperFirst" />
<rule ref="category/java/errorprone.xml/CallSuperLast" />
<rule ref="category/java/errorprone.xml/CheckSkipResult" />
<rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray" />
<rule ref="category/java/errorprone.xml/CloneMethodMustBePublic" />
<rule ref="category/java/errorprone.xml/CloneMethodMustImplementCloneable" />
<rule ref="category/java/errorprone.xml/CloneMethodReturnTypeMustMatchClassName" />
<rule ref="category/java/errorprone.xml/CollectionTypeMismatch" />
<rule ref="category/java/errorprone.xml/ComparisonWithNaN" />
<rule ref="category/java/errorprone.xml/ConfusingArgumentToVarargsMethod" />
<rule ref="category/java/errorprone.xml/ConstructorCallsOverridableMethod" />
<rule ref="category/java/errorprone.xml/DetachedTestCase" />
<rule ref="category/java/errorprone.xml/DoNotCallGarbageCollectionExplicitly" />
<rule ref="category/java/errorprone.xml/DoNotExtendJavaLangThrowable" />
<rule ref="category/java/errorprone.xml/DoNotHardCodeSDCard" />
<rule ref="category/java/errorprone.xml/DoNotThrowExceptionInFinally" />
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices" />
<rule ref="category/java/errorprone.xml/EmptyCatchBlock">
<properties>
<property name="allowCommentedBlocks" value="true" />
</properties>
</rule>
<rule ref="category/java/errorprone.xml/EmptyFinalizer" />
<rule ref="category/java/errorprone.xml/EqualsNull" />
<rule ref="category/java/errorprone.xml/FinalizeDoesNotCallSuperFinalize" />
<rule ref="category/java/errorprone.xml/FinalizeOnlyCallsSuperFinalize" />
<rule ref="category/java/errorprone.xml/FinalizeOverloaded" />
<rule ref="category/java/errorprone.xml/FinalizeShouldBeProtected" />
<rule ref="category/java/errorprone.xml/IdempotentOperations" />
<rule ref="category/java/errorprone.xml/ImplicitSwitchFallThrough" />
<rule ref="category/java/errorprone.xml/InstantiationToGetClass" />
<rule ref="category/java/errorprone.xml/InvalidLogMessageFormat" />
<rule ref="category/java/errorprone.xml/JumbledIncrementer" />
<rule ref="category/java/errorprone.xml/JUnitSpelling" />
<rule ref="category/java/errorprone.xml/JUnitStaticSuite" />
<rule ref="category/java/errorprone.xml/MethodWithSameNameAsEnclosingClass" />
<rule ref="category/java/errorprone.xml/MisplacedNullCheck" />
<rule ref="category/java/errorprone.xml/MissingSerialVersionUID" />
<rule ref="category/java/errorprone.xml/MissingStaticMethodInNonInstantiatableClass" />
<rule ref="category/java/errorprone.xml/MoreThanOneLogger" />
<rule ref="category/java/errorprone.xml/NonCaseLabelInSwitch" />
<rule ref="category/java/errorprone.xml/NonSerializableClass" />
<rule ref="category/java/errorprone.xml/NonStaticInitializer" />
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode" />
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashCodeOnComparable" />
<rule ref="category/java/errorprone.xml/ProperCloneImplementation" />
<rule ref="category/java/errorprone.xml/ProperLogger" />
<rule ref="category/java/errorprone.xml/ReplaceJavaUtilCalendar" />
<rule ref="category/java/errorprone.xml/ReplaceJavaUtilDate" />
<rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock" />
<rule ref="category/java/errorprone.xml/SimpleDateFormatNeedsLocale" />
<rule ref="category/java/errorprone.xml/SingleMethodSingleton" />
<rule ref="category/java/errorprone.xml/SingletonClassReturningNewInstance" />
<rule ref="category/java/errorprone.xml/StaticEJBFieldShouldBeFinal" />
<rule ref="category/java/errorprone.xml/StringBufferInstantiationWithChar" />
<rule ref="category/java/errorprone.xml/SuspiciousEqualsMethodName" />
<rule ref="category/java/errorprone.xml/SuspiciousHashcodeMethodName" />
<rule ref="category/java/errorprone.xml/SuspiciousOctalEscape" />
<rule ref="category/java/errorprone.xml/UnconditionalIfStatement" />
<rule ref="category/java/errorprone.xml/UnnecessaryBooleanAssertion" />
<rule ref="category/java/errorprone.xml/UnnecessaryCaseChange" />
<rule ref="category/java/errorprone.xml/UnnecessaryConversionTemporary" />
<rule ref="category/java/errorprone.xml/UseCorrectExceptionLogging" />
<rule ref="category/java/errorprone.xml/UseEqualsToCompareStrings" />
<rule ref="category/java/errorprone.xml/UselessPureMethodCall" />
<rule ref="category/java/errorprone.xml/UseLocaleWithCaseConversions" />
<!-- error prone rules that seem to be broken
<rule ref="category/java/errorprone.xml/UnusedNullCheckInEquals" /> False positive in OptionsDoclet.
<rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop" /> Triggers for `return` as well as for branches within the method.
<rule ref="category/java/errorprone.xml/CloseResource" /> CloseResource ought to warn only when the RHS is "new ..."
-->
<!-- error prone rules we are not using
<rule ref="category/java/errorprone.xml/AvoidAccessibilityAlteration" />
<rule ref="category/java/errorprone.xml/AvoidCatchingThrowable" />
<rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals" />
<rule ref="category/java/errorprone.xml/AvoidFieldNameMatchingMethodName" />
<rule ref="category/java/errorprone.xml/AvoidLiteralsInIfCondition" />
<rule ref="category/java/errorprone.xml/CompareObjectsWithEquals" />
<rule ref="category/java/errorprone.xml/DoNotTerminateVM" />
<rule ref="category/java/errorprone.xml/NullAssignment" />
<rule ref="category/java/errorprone.xml/ReturnEmptyCollectionRatherThanNull" />
<rule ref="category/java/errorprone.xml/TestClassWithoutTestCases" />
<rule ref="category/java/errorprone.xml/UseProperClassLoader" />
-->
<!-- multithreading rules -->
<rule ref="category/java/multithreading.xml/AvoidThreadGroup" />
<rule ref="category/java/multithreading.xml/AvoidUsingVolatile" />
<rule ref="category/java/multithreading.xml/DontCallThreadRun" />
<rule ref="category/java/multithreading.xml/DoubleCheckedLocking" />
<rule ref="category/java/multithreading.xml/NonThreadSafeSingleton" />
<rule ref="category/java/multithreading.xml/UnsynchronizedStaticFormatter" />
<rule ref="category/java/multithreading.xml/UseNotifyAllInsteadOfNotify" />
<!-- multithreading rules we are not using
<rule ref="category/java/multithreading.xml/AvoidSynchronizedAtMethodLevel" />
<rule ref="category/java/multithreading.xml/AvoidSynchronizedStatement" />
<rule ref="category/java/multithreading.xml/DoNotUseThreads" />
<rule ref="category/java/multithreading.xml/UseConcurrentHashMap" />
-->
<!-- performance rules -->
<rule ref="category/java/performance.xml/AddEmptyString" />
<rule ref="category/java/performance.xml/AvoidArrayLoops" />
<rule ref="category/java/performance.xml/AvoidCalendarDateCreation" />
<rule ref="category/java/performance.xml/AvoidFileStream" />
<rule ref="category/java/performance.xml/BigIntegerInstantiation" />
<rule ref="category/java/performance.xml/InefficientEmptyStringCheck" />
<rule ref="category/java/performance.xml/InefficientStringBuffering" />
<rule ref="category/java/performance.xml/InsufficientStringBufferDeclaration" />
<rule ref="category/java/performance.xml/OptimizableToArrayCall" />
<rule ref="category/java/performance.xml/StringInstantiation" />
<rule ref="category/java/performance.xml/StringToString" />
<rule ref="category/java/performance.xml/UseArrayListInsteadOfVector" />
<rule ref="category/java/performance.xml/UseIndexOfChar" />
<rule ref="category/java/performance.xml/UseIOStreamsWithApacheCommonsFileItem" />
<rule ref="category/java/performance.xml/UselessStringValueOf" />
<rule ref="category/java/performance.xml/UseStringBufferLength" />
<!-- performance rules we are not using
<rule ref="category/java/performance.xml/AppendCharacterWithChar" /> I'm not convinced this matters; the JIT should optimize it.
<rule ref="category/java/performance.xml/AvoidInstantiatingObjectsInLoops" /> Blanket prohibition on `new` in loops is too broad.
<rule ref="category/java/performance.xml/ConsecutiveAppendsShouldReuse" /> It's not clear this helps, and "fluent" appends are harder to read.
<rule ref="category/java/performance.xml/ConsecutiveLiteralAppends" /> Sometimes grouping is clearer, and the JIT should optimize.
<rule ref="category/java/performance.xml/RedundantFieldInitializer" /> Explicit initializers are better style.
<rule ref="category/java/performance.xml/TooFewBranchesForSwitch" />
<rule ref="category/java/performance.xml/UseStringBufferForStringAppends" />
-->
<!-- performance rules that are broken
<rule ref="category/java/performance.xml/UseArraysAsList" />
Warns when appending to an existing list; should only warn when adding to a new empty list.
-->
<!-- security rules -->
<rule ref="category/java/security.xml/HardCodedCryptoKey" />
<rule ref="category/java/security.xml/InsecureCryptoIv" />
</ruleset>