Advertisement
Guest User

pmd-ruleset.xml

a guest
Oct 23rd, 2014
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 9.92 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <ruleset name="FINN Rules"
  3.             xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
  4.              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5.              xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
  6.   <description>FINN ruleset - tweaked for PMD 5.0.2 and for running on tests, too.</description>
  7.   <rule ref="rulesets/java/unnecessary.xml/UnusedNullCheckInEquals">
  8.     <priority>3</priority>
  9.   </rule>
  10.   <rule ref="rulesets/java/strings.xml/StringInstantiation">
  11.     <priority>3</priority>
  12.   </rule>
  13.   <rule ref="rulesets/java/design.xml/ConstructorCallsOverridableMethod">
  14.     <priority>3</priority>
  15.   </rule>
  16.   <rule ref="rulesets/java/strictexception.xml/AvoidRethrowingException">
  17.     <priority>3</priority>
  18.   </rule>
  19.   <rule ref="rulesets/java/migrating.xml/ReplaceEnumerationWithIterator">
  20.     <priority>3</priority>
  21.   </rule>
  22.   <rule ref="rulesets/java/optimizations.xml/AvoidArrayLoops">
  23.     <priority>3</priority>
  24.   </rule>
  25.   <rule ref="rulesets/java/unusedcode.xml/UnusedFormalParameter">
  26.     <priority>3</priority>
  27.   </rule>
  28.   <rule ref="rulesets/java/empty.xml/EmptySwitchStatements">
  29.     <priority>3</priority>
  30.   </rule>
  31.   <rule ref="rulesets/java/basic.xml/ClassCastExceptionWithToArray">
  32.     <priority>3</priority>
  33.   </rule>
  34.   <rule ref="rulesets/java/strictexception.xml/AvoidThrowingNullPointerException">
  35.     <priority>2</priority>
  36.   </rule>
  37.   <rule ref="rulesets/java/unusedcode.xml/UnusedPrivateField">
  38.     <priority>4</priority>
  39.   </rule>
  40.   <rule ref="rulesets/java/design.xml/CompareObjectsWithEquals">
  41.     <priority>3</priority>
  42.   </rule>
  43.   <rule ref="rulesets/java/strings.xml/UseIndexOfChar">
  44.     <priority>3</priority>
  45.   </rule>
  46.   <rule ref="rulesets/java/basic.xml/BigIntegerInstantiation">
  47.     <priority>3</priority>
  48.   </rule>
  49.   <rule ref="rulesets/java/design.xml/FinalFieldCouldBeStatic">
  50.     <priority>4</priority>
  51.   </rule>
  52.   <rule ref="rulesets/java/braces.xml/IfStmtsMustUseBraces">
  53.     <priority>3</priority>
  54.   </rule>
  55.   <rule ref="rulesets/java/naming.xml/SuspiciousEqualsMethodName">
  56.     <priority>2</priority>
  57.   </rule>
  58.   <rule ref="rulesets/java/design.xml/InstantiationToGetClass">
  59.     <priority>3</priority>
  60.   </rule>
  61.   <rule ref="rulesets/java/naming.xml/SuspiciousHashcodeMethodName">
  62.     <priority>3</priority>
  63.   </rule>
  64.   <rule ref="rulesets/java/coupling.xml/LooseCoupling">
  65.     <priority>3</priority>
  66.   </rule>
  67.   <rule ref="rulesets/java/unusedcode.xml/UnusedLocalVariable">
  68.     <priority>3</priority>
  69.   </rule>
  70.   <rule ref="rulesets/java/strings.xml/UnnecessaryCaseChange">
  71.     <priority>4</priority>
  72.   </rule>
  73.   <rule ref="rulesets/java/empty.xml/EmptySynchronizedBlock">
  74.     <priority>2</priority>
  75.   </rule>
  76.   <rule ref="rulesets/java/design.xml/SingularField">
  77.     <priority>4</priority>
  78.   </rule>
  79.   <rule ref="rulesets/java/unusedcode.xml/UnusedPrivateMethod">
  80.     <priority>3</priority>
  81.   </rule>
  82.   <rule ref="rulesets/java/design.xml/CloseResource">
  83.     <priority>3</priority>
  84.   </rule>
  85.   <rule ref="rulesets/java/strictexception.xml/AvoidCatchingThrowable">
  86.     <priority>3</priority>
  87.   </rule>
  88.   <rule ref="rulesets/java/empty.xml/EmptyWhileStmt">
  89.     <priority>2</priority>
  90.   </rule>
  91.   <rule ref="rulesets/java/basic.xml/CollapsibleIfStatements">
  92.     <priority>4</priority>
  93.   </rule>
  94.   <rule ref="rulesets/java/unnecessary.xml/UselessOperationOnImmutable">
  95.     <priority>2</priority>
  96.   </rule>
  97.   <rule ref="rulesets/java/unnecessary.xml/UselessOverridingMethod">
  98.     <priority>3</priority>
  99.   </rule>
  100.   <rule ref="rulesets/java/unusedcode.xml/UnusedModifier">
  101.     <priority>5</priority>
  102.   </rule>
  103.   <rule ref="rulesets/java/design.xml/PreserveStackTrace">
  104.     <priority>3</priority>
  105.   </rule>
  106.   <rule ref="rulesets/java/optimizations.xml/UseArraysAsList">
  107.     <priority>3</priority>
  108.   </rule>
  109.   <rule ref="rulesets/java/strictexception.xml/AvoidThrowingRawExceptionTypes">
  110.     <priority>2</priority>
  111.   </rule>
  112.   <rule ref="rulesets/java/empty.xml/EmptyIfStmt">
  113.     <priority>3</priority>
  114.   </rule>
  115.   <rule ref="rulesets/java/design.xml/EqualsNull">
  116.     <priority>1</priority>
  117.   </rule>
  118.   <rule ref="rulesets/java/basic.xml/BrokenNullCheck">
  119.     <priority>1</priority>
  120.   </rule>
  121.   <rule ref="rulesets/java/logging-jakarta-commons.xml/UseCorrectExceptionLogging">
  122.     <priority>3</priority>
  123.   </rule>
  124.   <rule ref="rulesets/java/strings.xml/InefficientStringBuffering">
  125.     <priority>3</priority>
  126.   </rule>
  127.   <rule ref="rulesets/java/sunsecure.xml/ArrayIsStoredDirectly">
  128.     <priority>2</priority>
  129.   </rule>
  130.   <rule ref="rulesets/java/finalizers.xml/FinalizeOverloaded">
  131.     <priority>3</priority>
  132.   </rule>
  133.   <rule ref="rulesets/java/naming.xml/ClassNamingConventions">
  134.     <priority>3</priority>
  135.   </rule>
  136.   <rule ref="rulesets/java/controversial.xml/DontImportSun">
  137.     <priority>4</priority>
  138.   </rule>
  139.   <rule ref="rulesets/java/imports.xml/DontImportJavaLang">
  140.     <priority>4</priority>
  141.   </rule>
  142.   <rule ref="rulesets/java/design.xml/MissingStaticMethodInNonInstantiatableClass">
  143.     <priority>3</priority>
  144.   </rule>
  145.   <rule ref="rulesets/java/strings.xml/StringBufferInstantiationWithChar">
  146.     <priority>3</priority>
  147.   </rule>
  148.   <rule ref="rulesets/java/optimizations.xml/UseArrayListInsteadOfVector">
  149.     <priority>3</priority>
  150.   </rule>
  151.   <rule ref="rulesets/java/braces.xml/WhileLoopsMustUseBraces">
  152.     <priority>3</priority>
  153.   </rule>
  154.   <rule ref="rulesets/java/strings.xml/StringToString">
  155.     <priority>3</priority>
  156.   </rule>
  157.   <rule ref="rulesets/java/design.xml/SimplifyConditional">
  158.     <priority>3</priority>
  159.   </rule>
  160.   <rule ref="rulesets/java/migrating.xml/ReplaceVectorWithList">
  161.     <priority>3</priority>
  162.   </rule>
  163.   <rule ref="rulesets/java/codesize.xml/NcssMethodCount">
  164.     <priority>3</priority>
  165.     <properties>
  166.       <property name="minimum" value="50" />
  167.     </properties>
  168.   </rule>
  169.   <rule ref="rulesets/java/logging-java.xml/AvoidPrintStackTrace">
  170.     <priority>3</priority>
  171.   </rule>
  172.   <rule ref="rulesets/java/naming.xml/MethodWithSameNameAsEnclosingClass">
  173.     <priority>3</priority>
  174.   </rule>
  175.   <rule ref="rulesets/java/naming.xml/SuspiciousConstantFieldName">
  176.     <priority>3</priority>
  177.   </rule>
  178.   <rule ref="rulesets/java/codesize.xml/NcssTypeCount">
  179.     <priority>3</priority>
  180.     <properties>
  181.       <property name="minimum" value="800" />
  182.     </properties>
  183.   </rule>
  184.   <rule ref="rulesets/java/design.xml/AvoidInstanceofChecksInCatchClause">
  185.     <priority>4</priority>
  186.   </rule>
  187.   <rule ref="rulesets/java/empty.xml/EmptyFinallyBlock">
  188.     <priority>3</priority>
  189.   </rule>
  190.   <rule ref="rulesets/java/migrating.xml/IntegerInstantiation">
  191.     <priority>3</priority>
  192.   </rule>
  193.   <rule ref="rulesets/java/naming.xml/AvoidDollarSigns">
  194.     <priority>4</priority>
  195.   </rule>
  196.   <rule ref="rulesets/java/migrating.xml/AvoidAssertAsIdentifier">
  197.     <priority>3</priority>
  198.   </rule>
  199.   <rule ref="rulesets/java/design.xml/UnnecessaryLocalBeforeReturn">
  200.     <priority>3</priority>
  201.   </rule>
  202.   <rule ref="rulesets/java/finalizers.xml/AvoidCallingFinalize">
  203.     <priority>3</priority>
  204.   </rule>
  205.   <rule ref="rulesets/java/basic.xml/BooleanInstantiation">
  206.     <priority>3</priority>
  207.   </rule>
  208.   <rule ref="rulesets/java/basic.xml/UnconditionalIfStatement">
  209.     <priority>3</priority>
  210.   </rule>
  211.   <rule ref="rulesets/java/clone.xml/CloneThrowsCloneNotSupportedException">
  212.     <priority>3</priority>
  213.   </rule>
  214.   <rule ref="rulesets/java/migrating.xml/ReplaceHashtableWithMap">
  215.     <priority>3</priority>
  216.   </rule>
  217.   <rule ref="rulesets/java/basic.xml/AvoidDecimalLiteralsInBigDecimalConstructor">
  218.     <priority>3</priority>
  219.   </rule>
  220.   <rule ref="rulesets/java/braces.xml/ForLoopsMustUseBraces">
  221.     <priority>3</priority>
  222.   </rule>
  223.   <rule ref="rulesets/java/empty.xml/EmptyTryBlock">
  224.     <priority>3</priority>
  225.   </rule>
  226.   <rule ref="rulesets/java/strictexception.xml/SignatureDeclareThrowsException">
  227.     <priority>3</priority>
  228.     <properties>
  229.       <property name="violationSuppressXPath" value="//MethodDeclaration[../Annotation/MarkerAnnotation/Name[@Image='Test' or @Image='Before' or @Image='After' or @Image='BeforeClass' or @Image='AfterClass']]"/>
  230.     </properties>
  231.   </rule>
  232.   <rule ref="rulesets/java/finalizers.xml/EmptyFinalizer">
  233.     <priority>3</priority>
  234.   </rule>
  235.   <rule ref="rulesets/java/design.xml/IdempotentOperations">
  236.     <priority>3</priority>
  237.   </rule>
  238.   <rule ref="rulesets/java/strictexception.xml/ExceptionAsFlowControl">
  239.     <priority>3</priority>
  240.   </rule>
  241.   <rule ref="rulesets/java/empty.xml/EmptyStaticInitializer">
  242.     <priority>3</priority>
  243.   </rule>
  244.   <rule ref="rulesets/java/finalizers.xml/FinalizeDoesNotCallSuperFinalize">
  245.     <priority>3</priority>
  246.   </rule>
  247.   <rule ref="rulesets/java/strings.xml/UseStringBufferLength">
  248.     <priority>4</priority>
  249.   </rule>
  250.   <rule ref="rulesets/java/migrating.xml/AvoidEnumAsIdentifier">
  251.     <priority>3</priority>
  252.   </rule>
  253.   <rule ref="rulesets/java/braces.xml/IfElseStmtsMustUseBraces">
  254.     <priority>3</priority>
  255.   </rule>
  256.   <rule ref="rulesets/java/logging-java.xml/SystemPrintln">
  257.     <priority>3</priority>
  258.   </rule>
  259.   <rule ref="rulesets/java/strings.xml/UselessStringValueOf">
  260.     <priority>4</priority>
  261.   </rule>
  262.   <rule ref="rulesets/java/strings.xml/AvoidDuplicateLiterals">
  263.     <priority>3</priority>
  264.   </rule>
  265.   <rule ref="rulesets/java/design.xml/NonThreadSafeSingleton">
  266.     <priority>3</priority>
  267.   </rule>
  268.   <rule ref="rulesets/java/design.xml/UseUtilityClass">
  269.     <priority>3</priority>
  270.   </rule>
  271.   <rule ref="rulesets/java/imports.xml/DuplicateImports">
  272.     <priority>3</priority>
  273.   </rule>
  274.   <rule ref="rulesets/java/codesize.xml/ExcessiveMethodLength">
  275.     <priority>3</priority>
  276.     <properties>
  277.       <property name="minimum" value="100" />
  278.     </properties>
  279.   </rule>
  280.   <rule ref="rulesets/java/basic.xml/DoubleCheckedLocking">
  281.     <priority>3</priority>
  282.   </rule>
  283. </ruleset>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement