|
| 1 | +<?xml version="1.0"?> |
| 2 | + |
| 3 | +<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 | + name="Proxer" |
| 5 | + xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" |
| 6 | + xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd"> |
| 7 | + |
| 8 | + <description> |
| 9 | + The Proxer ruleset. |
| 10 | + </description> |
| 11 | + |
| 12 | + <!-- Basic --> |
| 13 | + |
| 14 | + <rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop"/> |
| 15 | + <rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/> |
| 16 | + <rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators"/> |
| 17 | + <rule ref="category/java/errorprone.xml/AvoidUsingOctalValues"/> |
| 18 | + <rule ref="category/java/errorprone.xml/BrokenNullCheck"/> |
| 19 | + <rule ref="category/java/errorprone.xml/CheckSkipResult"/> |
| 20 | + <rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray"/> |
| 21 | + <rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/> |
| 22 | + <rule ref="category/java/errorprone.xml/JumbledIncrementer"/> |
| 23 | + <rule ref="category/java/errorprone.xml/MisplacedNullCheck"/> |
| 24 | + <rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode"/> |
| 25 | + <rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock"/> |
| 26 | + <rule ref="category/java/errorprone.xml/UnconditionalIfStatement"/> |
| 27 | + <rule ref="category/java/multithreading.xml/AvoidThreadGroup"/> |
| 28 | + <rule ref="category/java/multithreading.xml/DontCallThreadRun"/> |
| 29 | + <rule ref="category/java/multithreading.xml/DoubleCheckedLocking"/> |
| 30 | + <rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/> |
| 31 | + <rule ref="category/java/bestpractices.xml/CheckResultSet"/> |
| 32 | + <rule ref="category/java/codestyle.xml/ExtendsObject"/> |
| 33 | + <rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop"/> |
| 34 | + <rule ref="category/java/performance.xml/BigIntegerInstantiation"/> |
| 35 | + <rule ref="category/java/performance.xml/BooleanInstantiation"/> |
| 36 | + <rule ref="category/java/design.xml/CollapsibleIfStatements"/> |
| 37 | + <rule ref="category/java/design.xml/SimplifiedTernary"/> |
| 38 | + |
| 39 | + <!-- Braces --> |
| 40 | + |
| 41 | + <rule ref="category/java/codestyle.xml/ForLoopsMustUseBraces"/> |
| 42 | + <rule ref="category/java/codestyle.xml/IfElseStmtsMustUseBraces"/> |
| 43 | + <rule ref="category/java/codestyle.xml/IfStmtsMustUseBraces"/> |
| 44 | + <rule ref="category/java/codestyle.xml/WhileLoopsMustUseBraces"/> |
| 45 | + |
| 46 | + <!-- Clone --> |
| 47 | + |
| 48 | + <rule ref="category/java/errorprone.xml/CloneMethodMustBePublic"/> |
| 49 | + <rule ref="category/java/errorprone.xml/CloneMethodMustImplementCloneable"/> |
| 50 | + <rule ref="category/java/errorprone.xml/CloneMethodReturnTypeMustMatchClassName"/> |
| 51 | + <rule ref="category/java/errorprone.xml/CloneThrowsCloneNotSupportedException"/> |
| 52 | + <rule ref="category/java/errorprone.xml/ProperCloneImplementation"/> |
| 53 | + |
| 54 | + <!-- Comments --> |
| 55 | + |
| 56 | + <rule ref="category/java/documentation.xml/CommentContent"/> |
| 57 | + |
| 58 | + <!-- Design --> |
| 59 | + |
| 60 | + <rule ref="category/java/design.xml/AbstractClassWithoutAnyMethod"/> |
| 61 | + <rule ref="category/java/design.xml/AvoidDeeplyNestedIfStmts"/> |
| 62 | + <rule ref="category/java/design.xml/ClassWithOnlyPrivateConstructorsShouldBeFinal"/> |
| 63 | + <rule ref="category/java/design.xml/DataClass"/> |
| 64 | + <rule ref="category/java/design.xml/FinalFieldCouldBeStatic"/> |
| 65 | + <rule ref="category/java/design.xml/GodClass"/> |
| 66 | + <rule ref="category/java/design.xml/ImmutableField"/> |
| 67 | + <rule ref="category/java/design.xml/LogicInversion"/> |
| 68 | + <rule ref="category/java/design.xml/SimplifyBooleanExpressions"/> |
| 69 | + <rule ref="category/java/design.xml/SimplifyBooleanReturns"/> |
| 70 | + <rule ref="category/java/design.xml/SimplifyConditional"/> |
| 71 | + <rule ref="category/java/design.xml/SingularField"/> |
| 72 | + <rule ref="category/java/design.xml/SwitchDensity"/> |
| 73 | + <rule ref="category/java/design.xml/UseUtilityClass"/> |
| 74 | + <rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic"/> |
| 75 | + <rule ref="category/java/errorprone.xml/AvoidInstanceofChecksInCatchClause"/> |
| 76 | + <rule ref="category/java/errorprone.xml/BadComparison"/> |
| 77 | + <rule ref="category/java/errorprone.xml/CloseResource"/> |
| 78 | + <rule ref="category/java/errorprone.xml/CompareObjectsWithEquals"/> |
| 79 | + <rule ref="category/java/errorprone.xml/ConstructorCallsOverridableMethod"/> |
| 80 | + <rule ref="category/java/errorprone.xml/EqualsNull"/> |
| 81 | + <rule ref="category/java/errorprone.xml/IdempotentOperations"/> |
| 82 | + <rule ref="category/java/errorprone.xml/InstantiationToGetClass"/> |
| 83 | + <rule ref="category/java/errorprone.xml/MissingBreakInSwitch"/> |
| 84 | + <rule ref="category/java/errorprone.xml/MissingStaticMethodInNonInstantiatableClass"/> |
| 85 | + <rule ref="category/java/errorprone.xml/NonCaseLabelInSwitchStatement"/> |
| 86 | + <rule ref="category/java/errorprone.xml/NonStaticInitializer"/> |
| 87 | + <rule ref="category/java/errorprone.xml/ReturnEmptyArrayRatherThanNull"/> |
| 88 | + <rule ref="category/java/errorprone.xml/SimpleDateFormatNeedsLocale"/> |
| 89 | + <rule ref="category/java/errorprone.xml/SingleMethodSingleton"/> |
| 90 | + <rule ref="category/java/errorprone.xml/SingletonClassReturningNewInstance"/> |
| 91 | + <rule ref="category/java/errorprone.xml/UseLocaleWithCaseConversions"/> |
| 92 | + <rule ref="category/java/codestyle.xml/AvoidProtectedFieldInFinalClass"/> |
| 93 | + <rule ref="category/java/codestyle.xml/AvoidProtectedMethodInFinalClassNotExtending"/> |
| 94 | + <rule ref="category/java/codestyle.xml/EmptyMethodInAbstractClassShouldBeAbstract"/> |
| 95 | + <rule ref="category/java/codestyle.xml/FieldDeclarationsShouldBeAtStartOfClass"/> |
| 96 | + <rule ref="category/java/codestyle.xml/UnnecessaryLocalBeforeReturn"/> |
| 97 | + <rule ref="category/java/multithreading.xml/AvoidSynchronizedAtMethodLevel"/> |
| 98 | + <rule ref="category/java/multithreading.xml/NonThreadSafeSingleton"/> |
| 99 | + <rule ref="category/java/multithreading.xml/UnsynchronizedStaticDateFormatter"/> |
| 100 | + <rule ref="category/java/multithreading.xml/UseNotifyAllInsteadOfNotify"/> |
| 101 | + <rule ref="category/java/bestpractices.xml/AbstractClassWithoutAbstractMethod"/> |
| 102 | + <rule ref="category/java/bestpractices.xml/AvoidReassigningParameters"/> |
| 103 | + <rule ref="category/java/bestpractices.xml/ConstantsInInterface"/> |
| 104 | + <rule ref="category/java/bestpractices.xml/DefaultLabelNotLastInSwitchStmt"/> |
| 105 | + <rule ref="category/java/bestpractices.xml/PositionLiteralsFirstInCaseInsensitiveComparisons"/> |
| 106 | + <rule ref="category/java/bestpractices.xml/PositionLiteralsFirstInComparisons"/> |
| 107 | + <rule ref="category/java/bestpractices.xml/PreserveStackTrace"/> |
| 108 | + <rule ref="category/java/bestpractices.xml/SwitchStmtsShouldHaveDefault"/> |
| 109 | + <rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty"/> |
| 110 | + <rule ref="category/java/bestpractices.xml/UseVarargs"/> |
| 111 | + <rule ref="category/java/performance.xml/OptimizableToArrayCall"/> |
| 112 | + <rule ref="category/java/performance.xml/TooFewBranchesForASwitchStatement"/> |
| 113 | + <rule ref="category/java/documentation.xml/UncommentedEmptyConstructor"/> |
| 114 | + <rule ref="category/java/documentation.xml/UncommentedEmptyMethodBody"/> |
| 115 | + |
| 116 | + <!-- Empty --> |
| 117 | + |
| 118 | + <rule ref="category/java/errorprone.xml/EmptyCatchBlock"/> |
| 119 | + <rule ref="category/java/errorprone.xml/EmptyFinallyBlock"/> |
| 120 | + <rule ref="category/java/errorprone.xml/EmptyIfStmt"/> |
| 121 | + <rule ref="category/java/errorprone.xml/EmptyInitializer"/> |
| 122 | + <rule ref="category/java/errorprone.xml/EmptyStatementBlock"/> |
| 123 | + <rule ref="category/java/errorprone.xml/EmptyStatementNotInLoop"/> |
| 124 | + <rule ref="category/java/errorprone.xml/EmptyInitializer" name="EmptyStaticInitializer"/> |
| 125 | + <rule ref="category/java/errorprone.xml/EmptySwitchStatements"/> |
| 126 | + <rule ref="category/java/errorprone.xml/EmptySynchronizedBlock"/> |
| 127 | + <rule ref="category/java/errorprone.xml/EmptyTryBlock"/> |
| 128 | + <rule ref="category/java/errorprone.xml/EmptyWhileStmt"/> |
| 129 | + |
| 130 | + <!-- Finalizers --> |
| 131 | + |
| 132 | + <rule ref="category/java/errorprone.xml/AvoidCallingFinalize"/> |
| 133 | + <rule ref="category/java/errorprone.xml/EmptyFinalizer"/> |
| 134 | + <rule ref="category/java/errorprone.xml/FinalizeDoesNotCallSuperFinalize"/> |
| 135 | + <rule ref="category/java/errorprone.xml/FinalizeOnlyCallsSuperFinalize"/> |
| 136 | + <rule ref="category/java/errorprone.xml/FinalizeOverloaded"/> |
| 137 | + <rule ref="category/java/errorprone.xml/FinalizeShouldBeProtected"/> |
| 138 | + |
| 139 | + <!-- Imports --> |
| 140 | + |
| 141 | + <rule ref="category/java/bestpractices.xml/UnusedImports"/> |
| 142 | + <rule ref="category/java/errorprone.xml/ImportFromSamePackage"/> |
| 143 | + <rule ref="category/java/codestyle.xml/DontImportJavaLang"/> |
| 144 | + <rule ref="category/java/codestyle.xml/DuplicateImports"/> |
| 145 | + <rule ref="category/java/codestyle.xml/TooManyStaticImports"/> |
| 146 | + <rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName"/> |
| 147 | + |
| 148 | + <!-- Naming --> |
| 149 | + |
| 150 | + <rule ref="category/java/errorprone.xml/MethodWithSameNameAsEnclosingClass"/> |
| 151 | + <rule ref="category/java/errorprone.xml/SuspiciousEqualsMethodName"/> |
| 152 | + <rule ref="category/java/errorprone.xml/SuspiciousHashcodeMethodName"/> |
| 153 | + <rule ref="category/java/codestyle.xml/AvoidDollarSigns"/> |
| 154 | + <rule ref="category/java/codestyle.xml/BooleanGetMethodName"/> |
| 155 | + <rule ref="category/java/codestyle.xml/ClassNamingConventions"/> |
| 156 | + <rule ref="category/java/codestyle.xml/GenericsNaming"/> |
| 157 | + <rule ref="category/java/codestyle.xml/MethodNamingConventions"/> |
| 158 | + <rule ref="category/java/codestyle.xml/MIsLeadingVariableName"/> |
| 159 | + <rule ref="category/java/codestyle.xml/NoPackage"/> |
| 160 | + <rule ref="category/java/codestyle.xml/PackageCase"/> |
| 161 | + <rule ref="category/java/codestyle.xml/SuspiciousConstantFieldName"/> |
| 162 | + <rule ref="category/java/codestyle.xml/VariableNamingConventions"/> |
| 163 | + |
| 164 | + <!-- Optimizations --> |
| 165 | + |
| 166 | + <rule ref="category/java/codestyle.xml/LocalVariableCouldBeFinal"/> |
| 167 | + <rule ref="category/java/codestyle.xml/MethodArgumentCouldBeFinal"/> |
| 168 | + <rule ref="category/java/codestyle.xml/PrematureDeclaration"/> |
| 169 | + <rule ref="category/java/performance.xml/AddEmptyString"/> |
| 170 | + <rule ref="category/java/performance.xml/AvoidArrayLoops"/> |
| 171 | + <rule ref="category/java/performance.xml/RedundantFieldInitializer"/> |
| 172 | + <rule ref="category/java/performance.xml/SimplifyStartsWith"/> |
| 173 | + <rule ref="category/java/performance.xml/UnnecessaryWrapperObjectCreation"/> |
| 174 | + <rule ref="category/java/performance.xml/UseArrayListInsteadOfVector"/> |
| 175 | + <rule ref="category/java/performance.xml/UseArraysAsList"/> |
| 176 | + <rule ref="category/java/performance.xml/UseStringBufferForStringAppends"/> |
| 177 | + |
| 178 | + <!-- Strict Exception --> |
| 179 | + |
| 180 | + <rule ref="category/java/errorprone.xml/AvoidCatchingNPE"/> |
| 181 | + <rule ref="category/java/errorprone.xml/AvoidCatchingThrowable"/> |
| 182 | + <rule ref="category/java/errorprone.xml/AvoidLosingExceptionInformation"/> |
| 183 | + <rule ref="category/java/errorprone.xml/DoNotThrowExceptionInFinally"/> |
| 184 | + <rule ref="category/java/design.xml/AvoidCatchingGenericException"/> |
| 185 | + <rule ref="category/java/design.xml/AvoidRethrowingException"/> |
| 186 | + <rule ref="category/java/design.xml/AvoidThrowingNewInstanceOfSameException"/> |
| 187 | + <rule ref="category/java/design.xml/AvoidThrowingRawExceptionTypes"/> |
| 188 | + <rule ref="category/java/design.xml/DoNotExtendJavaLangError"/> |
| 189 | + <rule ref="category/java/design.xml/ExceptionAsFlowControl"/> |
| 190 | + <rule ref="category/java/design.xml/SignatureDeclareThrowsException"/> |
| 191 | + |
| 192 | + <!-- Strings --> |
| 193 | + |
| 194 | + <rule ref="category/java/errorprone.xml/StringBufferInstantiationWithChar"/> |
| 195 | + <rule ref="category/java/errorprone.xml/UnnecessaryCaseChange"/> |
| 196 | + <rule ref="category/java/errorprone.xml/UseEqualsToCompareStrings"/> |
| 197 | + <rule ref="category/java/bestpractices.xml/AvoidStringBufferField"/> |
| 198 | + <rule ref="category/java/performance.xml/AppendCharacterWithChar"/> |
| 199 | + <rule ref="category/java/performance.xml/ConsecutiveAppendsShouldReuse"/> |
| 200 | + <rule ref="category/java/performance.xml/ConsecutiveLiteralAppends"/> |
| 201 | + <rule ref="category/java/performance.xml/InefficientEmptyStringCheck"/> |
| 202 | + <rule ref="category/java/performance.xml/InefficientStringBuffering"/> |
| 203 | + <rule ref="category/java/performance.xml/InsufficientStringBufferDeclaration"/> |
| 204 | + <rule ref="category/java/performance.xml/StringInstantiation"/> |
| 205 | + <rule ref="category/java/performance.xml/StringToString"/> |
| 206 | + <rule ref="category/java/performance.xml/UseIndexOfChar"/> |
| 207 | + <rule ref="category/java/performance.xml/UselessStringValueOf"/> |
| 208 | + <rule ref="category/java/performance.xml/UseStringBufferLength"/> |
| 209 | + |
| 210 | + <!-- Type Resolution --> |
| 211 | + |
| 212 | + <rule ref="category/java/bestpractices.xml/LooseCoupling"/> |
| 213 | + <rule ref="category/java/errorprone.xml/CloneMethodMustImplementCloneable"/> |
| 214 | + <rule ref="category/java/bestpractices.xml/UnusedImports"/> |
| 215 | + <rule ref="category/java/design.xml/SignatureDeclareThrowsException"/> |
| 216 | + |
| 217 | + <!-- Unnecessary --> |
| 218 | + |
| 219 | + <rule ref="category/java/errorprone.xml/UnnecessaryConversionTemporary"/> |
| 220 | + <rule ref="category/java/errorprone.xml/UnusedNullCheckInEquals"/> |
| 221 | + <rule ref="category/java/errorprone.xml/UselessOperationOnImmutable"/> |
| 222 | + <rule ref="category/java/codestyle.xml/UnnecessaryModifier"/> |
| 223 | + <rule ref="category/java/codestyle.xml/UnnecessaryReturn"/> |
| 224 | + <rule ref="category/java/codestyle.xml/UselessParentheses"/> |
| 225 | + <rule ref="category/java/codestyle.xml/UselessQualifiedThis"/> |
| 226 | + <rule ref="category/java/design.xml/UselessOverridingMethod"/> |
| 227 | + |
| 228 | + <!-- Unused Code --> |
| 229 | + |
| 230 | + <rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/> |
| 231 | + <rule ref="category/java/bestpractices.xml/UnusedLocalVariable"/> |
| 232 | + <rule ref="category/java/bestpractices.xml/UnusedPrivateField"/> |
| 233 | + <rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"/> |
| 234 | + |
| 235 | +</ruleset> |
0 commit comments