Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <ruleset name="FINN Rules"
- 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 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
- <description>FINN ruleset - tweaked for PMD 5.0.2 and for running on tests, too.</description>
- <rule ref="rulesets/java/unnecessary.xml/UnusedNullCheckInEquals">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strings.xml/StringInstantiation">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/ConstructorCallsOverridableMethod">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strictexception.xml/AvoidRethrowingException">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/migrating.xml/ReplaceEnumerationWithIterator">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/optimizations.xml/AvoidArrayLoops">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/unusedcode.xml/UnusedFormalParameter">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/empty.xml/EmptySwitchStatements">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/basic.xml/ClassCastExceptionWithToArray">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strictexception.xml/AvoidThrowingNullPointerException">
- <priority>2</priority>
- </rule>
- <rule ref="rulesets/java/unusedcode.xml/UnusedPrivateField">
- <priority>4</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/CompareObjectsWithEquals">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strings.xml/UseIndexOfChar">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/basic.xml/BigIntegerInstantiation">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/FinalFieldCouldBeStatic">
- <priority>4</priority>
- </rule>
- <rule ref="rulesets/java/braces.xml/IfStmtsMustUseBraces">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/naming.xml/SuspiciousEqualsMethodName">
- <priority>2</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/InstantiationToGetClass">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/naming.xml/SuspiciousHashcodeMethodName">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/coupling.xml/LooseCoupling">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/unusedcode.xml/UnusedLocalVariable">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strings.xml/UnnecessaryCaseChange">
- <priority>4</priority>
- </rule>
- <rule ref="rulesets/java/empty.xml/EmptySynchronizedBlock">
- <priority>2</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/SingularField">
- <priority>4</priority>
- </rule>
- <rule ref="rulesets/java/unusedcode.xml/UnusedPrivateMethod">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/CloseResource">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strictexception.xml/AvoidCatchingThrowable">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/empty.xml/EmptyWhileStmt">
- <priority>2</priority>
- </rule>
- <rule ref="rulesets/java/basic.xml/CollapsibleIfStatements">
- <priority>4</priority>
- </rule>
- <rule ref="rulesets/java/unnecessary.xml/UselessOperationOnImmutable">
- <priority>2</priority>
- </rule>
- <rule ref="rulesets/java/unnecessary.xml/UselessOverridingMethod">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/unusedcode.xml/UnusedModifier">
- <priority>5</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/PreserveStackTrace">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/optimizations.xml/UseArraysAsList">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strictexception.xml/AvoidThrowingRawExceptionTypes">
- <priority>2</priority>
- </rule>
- <rule ref="rulesets/java/empty.xml/EmptyIfStmt">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/EqualsNull">
- <priority>1</priority>
- </rule>
- <rule ref="rulesets/java/basic.xml/BrokenNullCheck">
- <priority>1</priority>
- </rule>
- <rule ref="rulesets/java/logging-jakarta-commons.xml/UseCorrectExceptionLogging">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strings.xml/InefficientStringBuffering">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/sunsecure.xml/ArrayIsStoredDirectly">
- <priority>2</priority>
- </rule>
- <rule ref="rulesets/java/finalizers.xml/FinalizeOverloaded">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/naming.xml/ClassNamingConventions">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/controversial.xml/DontImportSun">
- <priority>4</priority>
- </rule>
- <rule ref="rulesets/java/imports.xml/DontImportJavaLang">
- <priority>4</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/MissingStaticMethodInNonInstantiatableClass">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strings.xml/StringBufferInstantiationWithChar">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/optimizations.xml/UseArrayListInsteadOfVector">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/braces.xml/WhileLoopsMustUseBraces">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strings.xml/StringToString">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/SimplifyConditional">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/migrating.xml/ReplaceVectorWithList">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/codesize.xml/NcssMethodCount">
- <priority>3</priority>
- <properties>
- <property name="minimum" value="50" />
- </properties>
- </rule>
- <rule ref="rulesets/java/logging-java.xml/AvoidPrintStackTrace">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/naming.xml/MethodWithSameNameAsEnclosingClass">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/naming.xml/SuspiciousConstantFieldName">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/codesize.xml/NcssTypeCount">
- <priority>3</priority>
- <properties>
- <property name="minimum" value="800" />
- </properties>
- </rule>
- <rule ref="rulesets/java/design.xml/AvoidInstanceofChecksInCatchClause">
- <priority>4</priority>
- </rule>
- <rule ref="rulesets/java/empty.xml/EmptyFinallyBlock">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/migrating.xml/IntegerInstantiation">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/naming.xml/AvoidDollarSigns">
- <priority>4</priority>
- </rule>
- <rule ref="rulesets/java/migrating.xml/AvoidAssertAsIdentifier">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/UnnecessaryLocalBeforeReturn">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/finalizers.xml/AvoidCallingFinalize">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/basic.xml/BooleanInstantiation">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/basic.xml/UnconditionalIfStatement">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/clone.xml/CloneThrowsCloneNotSupportedException">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/migrating.xml/ReplaceHashtableWithMap">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/basic.xml/AvoidDecimalLiteralsInBigDecimalConstructor">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/braces.xml/ForLoopsMustUseBraces">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/empty.xml/EmptyTryBlock">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strictexception.xml/SignatureDeclareThrowsException">
- <priority>3</priority>
- <properties>
- <property name="violationSuppressXPath" value="//MethodDeclaration[../Annotation/MarkerAnnotation/Name[@Image='Test' or @Image='Before' or @Image='After' or @Image='BeforeClass' or @Image='AfterClass']]"/>
- </properties>
- </rule>
- <rule ref="rulesets/java/finalizers.xml/EmptyFinalizer">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/IdempotentOperations">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strictexception.xml/ExceptionAsFlowControl">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/empty.xml/EmptyStaticInitializer">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/finalizers.xml/FinalizeDoesNotCallSuperFinalize">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strings.xml/UseStringBufferLength">
- <priority>4</priority>
- </rule>
- <rule ref="rulesets/java/migrating.xml/AvoidEnumAsIdentifier">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/braces.xml/IfElseStmtsMustUseBraces">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/logging-java.xml/SystemPrintln">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/strings.xml/UselessStringValueOf">
- <priority>4</priority>
- </rule>
- <rule ref="rulesets/java/strings.xml/AvoidDuplicateLiterals">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/NonThreadSafeSingleton">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/design.xml/UseUtilityClass">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/imports.xml/DuplicateImports">
- <priority>3</priority>
- </rule>
- <rule ref="rulesets/java/codesize.xml/ExcessiveMethodLength">
- <priority>3</priority>
- <properties>
- <property name="minimum" value="100" />
- </properties>
- </rule>
- <rule ref="rulesets/java/basic.xml/DoubleCheckedLocking">
- <priority>3</priority>
- </rule>
- </ruleset>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement