| <?xml version="1.0"?> |
| <!-- |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <ruleset name="Overpass PMD Ruleset" xmlns="http://pmd.sf.net/ruleset/2.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"> |
| <description>Overpass PMD Ruleset</description> |
| |
| <exclude-pattern>.*/src/test/.*</exclude-pattern> |
| |
| <rule ref="category/java/errorprone.xml/EmptyCatchBlock" /> |
| <rule ref="category/java/errorprone.xml/EmptyIfStmt" /> |
| <rule ref="category/java/errorprone.xml/EmptyWhileStmt" /> |
| <rule ref="category/java/errorprone.xml/EmptyTryBlock" /> |
| <rule ref="category/java/errorprone.xml/EmptyFinallyBlock" /> |
| <rule ref="category/java/errorprone.xml/EmptySwitchStatements" /> |
| <rule ref="category/java/errorprone.xml/JumbledIncrementer" /> |
| <rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop" /> |
| <rule ref="category/java/errorprone.xml/UnnecessaryConversionTemporary" /> |
| <rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode" /> |
| <rule ref="category/java/multithreading.xml/DoubleCheckedLocking" |
| message="Verify that the double-checked variable is declared as volatile."> |
| <priority>3</priority> |
| </rule> |
| <rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock" /> |
| <rule ref="category/java/errorprone.xml/EmptySynchronizedBlock" /> |
| <rule ref="category/java/codestyle.xml/UnnecessaryReturn" /> |
| <rule ref="category/java/errorprone.xml/UnconditionalIfStatement" /> |
| <rule ref="category/java/errorprone.xml/EmptyStatementNotInLoop" /> |
| <rule ref="category/java/codestyle.xml/UnnecessaryModifier" /> |
| <rule ref="category/java/design.xml/CollapsibleIfStatements" /> |
| <rule ref="category/java/design.xml/UselessOverridingMethod" /> |
| <rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray" /> |
| <rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor" /> |
| <rule ref="category/java/errorprone.xml/UselessOperationOnImmutable" /> |
| <rule ref="category/java/errorprone.xml/MisplacedNullCheck" /> |
| <rule ref="category/java/errorprone.xml/UnusedNullCheckInEquals" /> |
| <rule ref="category/java/multithreading.xml/AvoidThreadGroup" /> |
| <rule ref="category/java/errorprone.xml/BrokenNullCheck" /> |
| <rule ref="category/java/performance.xml/BigIntegerInstantiation" /> |
| <rule ref="category/java/errorprone.xml/AvoidUsingOctalValues" /> |
| <rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP" /> |
| <rule ref="category/java/bestpractices.xml/CheckResultSet" /> |
| <rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators" /> |
| <rule ref="category/java/errorprone.xml/EmptyInitializer" /> |
| |
| |
| <rule ref="category/java/errorprone.xml/ProperCloneImplementation" /> |
| <rule ref="category/java/errorprone.xml/CloneMethodMustImplementCloneable" /> |
| |
| <rule ref="category/java/design.xml/NPathComplexity" /> |
| <rule ref="category/java/design.xml/ExcessiveParameterList" /> |
| <rule ref="category/java/design.xml/CyclomaticComplexity" /> |
| <rule ref="category/java/design.xml/ExcessivePublicCount" /> |
| <rule ref="category/java/design.xml/TooManyFields" /> |
| |
| <rule ref="category/java/errorprone.xml/SuspiciousOctalEscape" /> |
| <rule ref="category/java/codestyle.xml/AvoidUsingNativeCode" /> |
| <rule ref="category/java/errorprone.xml/AvoidAccessibilityAlteration" /> |
| <rule ref="category/java/errorprone.xml/DoNotCallGarbageCollectionExplicitly" /> |
| |
| <rule ref="category/java/bestpractices.xml/LooseCoupling" /> |
| |
| <rule ref="category/java/design.xml/AvoidDeeplyNestedIfStmts" /> |
| <rule ref="category/java/bestpractices.xml/AvoidReassigningParameters" > |
| <priority>3</priority> |
| </rule> |
| <rule ref="category/java/design.xml/SwitchDensity" /> |
| <rule ref="category/java/errorprone.xml/ConstructorCallsOverridableMethod" /> |
| <rule ref="category/java/bestpractices.xml/AccessorClassGeneration" /> |
| <rule ref="category/java/design.xml/FinalFieldCouldBeStatic" /> |
| <rule ref="category/java/errorprone.xml/CloseResource" /> |
| <rule ref="category/java/bestpractices.xml/DefaultLabelNotLastInSwitchStmt" /> |
| <rule ref="category/java/errorprone.xml/NonCaseLabelInSwitchStatement" /> |
| <rule ref="category/java/performance.xml/OptimizableToArrayCall" /> |
| <rule ref="category/java/errorprone.xml/BadComparison" /> |
| <rule ref="category/java/errorprone.xml/EqualsNull" /> |
| <rule ref="category/java/errorprone.xml/InstantiationToGetClass" /> |
| <rule ref="category/java/errorprone.xml/IdempotentOperations" /> |
| <rule ref="category/java/design.xml/ImmutableField" /> |
| <rule ref="category/java/codestyle.xml/AvoidProtectedFieldInFinalClass" /> |
| <rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic" /> |
| <rule ref="category/java/errorprone.xml/MissingStaticMethodInNonInstantiatableClass" /> |
| <rule ref="category/java/errorprone.xml/MissingBreakInSwitch" /> |
| <rule ref="category/java/multithreading.xml/UseNotifyAllInsteadOfNotify" /> |
| <rule ref="category/java/errorprone.xml/AvoidInstanceofChecksInCatchClause" /> |
| <rule ref="category/java/bestpractices.xml/AbstractClassWithoutAbstractMethod" /> |
| <rule ref="category/java/design.xml/SimplifyConditional" /> |
| <rule ref="category/java/multithreading.xml/NonThreadSafeSingleton" /> |
| <rule ref="category/java/bestpractices.xml/PreserveStackTrace" /> |
| <rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty" /> |
| <rule ref="category/java/design.xml/ClassWithOnlyPrivateConstructorsShouldBeFinal" /> |
| <rule ref="category/java/design.xml/SingularField" /> |
| <rule ref="category/java/design.xml/AbstractClassWithoutAnyMethod" /> |
| |
| <rule ref="category/java/errorprone.xml/EmptyFinalizer" /> |
| <rule ref="category/java/errorprone.xml/FinalizeOnlyCallsSuperFinalize" /> |
| <rule ref="category/java/errorprone.xml/FinalizeOverloaded" /> |
| <rule ref="category/java/errorprone.xml/FinalizeDoesNotCallSuperFinalize" /> |
| <rule ref="category/java/errorprone.xml/FinalizeShouldBeProtected" /> |
| <rule ref="category/java/errorprone.xml/AvoidCallingFinalize" /> |
| |
| <rule ref="category/java/codestyle.xml/TooManyStaticImports" /> |
| |
| <rule ref="category/java/errorprone.xml/MissingSerialVersionUID" /> |
| |
| <rule ref="category/java/errorprone.xml/MoreThanOneLogger" /> |
| <rule ref="category/java/bestpractices.xml/SystemPrintln" /> |
| <rule ref="category/java/bestpractices.xml/AvoidPrintStackTrace" /> |
| |
| <rule ref="category/java/codestyle.xml/LongVariable"> |
| <properties> |
| <property name="minimum" value="30" /> |
| </properties> |
| </rule> |
| <rule ref="category/java/codestyle.xml/ShortMethodName" /> |
| <rule ref="category/java/codestyle.xml/MethodNamingConventions" /> |
| <rule ref="category/java/codestyle.xml/ClassNamingConventions" /> |
| <rule ref="category/java/codestyle.xml/AvoidDollarSigns" /> |
| <rule ref="category/java/errorprone.xml/MethodWithSameNameAsEnclosingClass" /> |
| <rule ref="category/java/errorprone.xml/SuspiciousHashcodeMethodName" /> |
| <rule ref="category/java/errorprone.xml/SuspiciousEqualsMethodName" /> |
| <rule ref="category/java/errorprone.xml/AvoidFieldNameMatchingTypeName" /> |
| <!--<rule ref="rulesets/java/naming.xml/AvoidFieldNameMatchingMethodName" />--> |
| <rule ref="category/java/codestyle.xml/NoPackage" /> |
| <rule ref="category/java/codestyle.xml/PackageCase" /> |
| <rule ref="category/java/codestyle.xml/BooleanGetMethodName" /> |
| |
| <rule ref="category/java/codestyle.xml/LocalVariableCouldBeFinal" /> |
| <rule ref="category/java/codestyle.xml/MethodArgumentCouldBeFinal" /> |
| <rule ref="category/java/performance.xml/UseArrayListInsteadOfVector" /> |
| <rule ref="category/java/performance.xml/UseStringBufferForStringAppends" /> |
| <rule ref="category/java/performance.xml/UseArraysAsList" /> |
| <rule ref="category/java/performance.xml/AvoidArrayLoops" /> |
| <rule ref="category/java/performance.xml/AddEmptyString" /> |
| |
| <rule ref="category/java/errorprone.xml/AvoidCatchingThrowable" /> |
| <rule ref="category/java/design.xml/SignatureDeclareThrowsException" /> |
| <rule ref="category/java/design.xml/ExceptionAsFlowControl" /> |
| <rule ref="category/java/errorprone.xml/AvoidCatchingNPE" /> |
| <rule ref="category/java/design.xml/AvoidThrowingRawExceptionTypes" /> |
| <rule ref="category/java/design.xml/AvoidThrowingNullPointerException" /> |
| <rule ref="category/java/design.xml/AvoidRethrowingException" /> |
| <rule ref="category/java/design.xml/DoNotExtendJavaLangError" /> |
| <rule ref="category/java/errorprone.xml/DoNotThrowExceptionInFinally" /> |
| <rule ref="category/java/design.xml/AvoidThrowingNewInstanceOfSameException" /> |
| |
| <rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals" > |
| <properties> |
| <property name="skipAnnotations" value="true" /> |
| </properties> |
| </rule> |
| <rule ref="category/java/performance.xml/StringInstantiation" /> |
| <rule ref="category/java/performance.xml/StringToString" /> |
| <rule ref="category/java/performance.xml/InefficientStringBuffering" /> |
| <rule ref="category/java/errorprone.xml/UnnecessaryCaseChange" /> |
| <rule ref="category/java/performance.xml/UseStringBufferLength" /> |
| <rule ref="category/java/performance.xml/AppendCharacterWithChar" /> |
| <rule ref="category/java/performance.xml/ConsecutiveLiteralAppends" /> |
| <rule ref="category/java/performance.xml/UseIndexOfChar" /> |
| <rule ref="category/java/performance.xml/UselessStringValueOf" /> |
| <rule ref="category/java/errorprone.xml/StringBufferInstantiationWithChar" /> |
| <rule ref="category/java/errorprone.xml/UseEqualsToCompareStrings" /> |
| |
| <rule ref="category/java/bestpractices.xml/UnusedPrivateField" /> |
| <rule ref="category/java/bestpractices.xml/UnusedLocalVariable" /> |
| <rule ref="category/java/bestpractices.xml/UnusedPrivateMethod" /> |
| <rule ref="category/java/bestpractices.xml/UnusedFormalParameter" /> |
| |
| </ruleset> |