Pārlūkot izejas kodu

Add a copy of the PMD config.

Will move the PMD tasks/config to meta at some point.
pull/13/head
Chris Smith 9 gadus atpakaļ
vecāks
revīzija
04fba36d5a
1 mainītis faili ar 142 papildinājumiem un 0 dzēšanām
  1. 142
    0
      etc/pmd/full.xml

+ 142
- 0
etc/pmd/full.xml Parādīt failu

@@ -0,0 +1,142 @@
1
+<?xml version="1.0"?>
2
+<ruleset name="DMDirc PMD checks"
3
+         xmlns="http://pmd.sf.net/ruleset/1.0.0"
4
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5
+         xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
6
+         xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
7
+        <description>DMDirc minimal PMD checks.</description>
8
+
9
+<rule ref="rulesets/java/empty.xml/EmptyIfStmt"><priority>1</priority></rule>
10
+<rule ref="rulesets/java/empty.xml/EmptyWhileStmt"><priority>1</priority></rule>
11
+<rule ref="rulesets/java/empty.xml/EmptyTryBlock"><priority>1</priority></rule>
12
+<rule ref="rulesets/java/empty.xml/EmptyFinallyBlock"><priority>1</priority></rule>
13
+<rule ref="rulesets/java/empty.xml/EmptySwitchStatements"><priority>1</priority></rule>
14
+<rule ref="rulesets/java/basic.xml/JumbledIncrementer"><priority>1</priority></rule>
15
+<rule ref="rulesets/java/basic.xml/ForLoopShouldBeWhileLoop"><priority>1</priority></rule>
16
+<rule ref="rulesets/java/unnecessary.xml/UnnecessaryConversionTemporary"><priority>1</priority></rule>
17
+<rule ref="rulesets/java/basic.xml/OverrideBothEqualsAndHashcode"><priority>1</priority></rule>
18
+<rule ref="rulesets/java/basic.xml/DoubleCheckedLocking"><priority>1</priority></rule>
19
+<rule ref="rulesets/java/basic.xml/ReturnFromFinallyBlock"><priority>1</priority></rule>
20
+<rule ref="rulesets/java/empty.xml/EmptySynchronizedBlock"><priority>1</priority></rule>
21
+<rule ref="rulesets/java/empty.xml/EmptyStaticInitializer"><priority>1</priority></rule>
22
+<rule ref="rulesets/java/basic.xml/UnconditionalIfStatement"><priority>1</priority></rule>
23
+<rule ref="rulesets/java/empty.xml/EmptyStatementNotInLoop"><priority>1</priority></rule>
24
+<rule ref="rulesets/java/basic.xml/BooleanInstantiation"><priority>1</priority></rule>
25
+<rule ref="rulesets/java/unnecessary.xml/UnnecessaryFinalModifier"><priority>1</priority></rule>
26
+<rule ref="rulesets/java/basic.xml/CollapsibleIfStatements"><priority>1</priority></rule>
27
+<rule ref="rulesets/java/unnecessary.xml/UselessOverridingMethod"><priority>1</priority></rule>
28
+<rule ref="rulesets/java/basic.xml/ClassCastExceptionWithToArray"><priority>1</priority></rule>
29
+<rule ref="rulesets/java/basic.xml/AvoidDecimalLiteralsInBigDecimalConstructor"><priority>1</priority></rule>
30
+<rule ref="rulesets/java/unnecessary.xml/UselessOperationOnImmutable"><priority>1</priority></rule>
31
+<rule ref="rulesets/java/basic.xml/MisplacedNullCheck"><priority>1</priority></rule>
32
+<rule ref="rulesets/java/unnecessary.xml/UnusedNullCheckInEquals"><priority>1</priority></rule>
33
+<rule ref="rulesets/java/basic.xml/BrokenNullCheck"><priority>1</priority></rule>
34
+<rule ref="rulesets/java/basic.xml/BigIntegerInstantiation"><priority>1</priority></rule>
35
+<rule ref="rulesets/java/basic.xml/AvoidMultipleUnaryOperators"><priority>1</priority></rule>
36
+<rule ref="rulesets/java/empty.xml/EmptyInitializer"><priority>1</priority></rule>
37
+
38
+<rule ref="rulesets/java/braces.xml/IfStmtsMustUseBraces"><priority>1</priority></rule>
39
+<rule ref="rulesets/java/braces.xml/WhileLoopsMustUseBraces"><priority>1</priority></rule>
40
+<rule ref="rulesets/java/braces.xml/IfElseStmtsMustUseBraces"><priority>1</priority></rule>
41
+<rule ref="rulesets/java/braces.xml/ForLoopsMustUseBraces"><priority>1</priority></rule>
42
+
43
+<rule ref="rulesets/java/unusedcode.xml/UnusedModifier"><priority>1</priority></rule>
44
+<rule ref="rulesets/java/controversial.xml/DontImportSun"><priority>1</priority></rule>
45
+
46
+<rule ref="rulesets/java/design.xml/SimplifyBooleanReturns"><priority>1</priority></rule>
47
+<rule ref="rulesets/java/design.xml/SimplifyBooleanExpressions"><priority>1</priority></rule>
48
+<rule ref="rulesets/java/design.xml/AvoidReassigningParameters"><priority>1</priority></rule>
49
+<rule ref="rulesets/java/design.xml/FinalFieldCouldBeStatic"><priority>1</priority></rule>
50
+<rule ref="rulesets/java/design.xml/NonStaticInitializer"><priority>1</priority></rule>
51
+<rule ref="rulesets/java/design.xml/OptimizableToArrayCall"><priority>1</priority></rule>
52
+<rule ref="rulesets/java/design.xml/BadComparison"><priority>1</priority></rule>
53
+<rule ref="rulesets/java/design.xml/EqualsNull"><priority>1</priority></rule>
54
+<rule ref="rulesets/java/design.xml/InstantiationToGetClass"><priority>1</priority></rule>
55
+<rule ref="rulesets/java/design.xml/IdempotentOperations"><priority>1</priority></rule>
56
+<rule ref="rulesets/java/design.xml/AssignmentToNonFinalStatic"><priority>1</priority></rule>
57
+<rule ref="rulesets/java/design.xml/MissingStaticMethodInNonInstantiatableClass"><priority>1</priority></rule>
58
+<rule ref="rulesets/java/design.xml/UseNotifyAllInsteadOfNotify"><priority>1</priority></rule>
59
+<rule ref="rulesets/java/design.xml/AvoidInstanceofChecksInCatchClause"><priority>1</priority></rule>
60
+<rule ref="rulesets/java/design.xml/SimplifyConditional"><priority>1</priority></rule>
61
+<rule ref="rulesets/java/design.xml/UnnecessaryLocalBeforeReturn"><priority>1</priority></rule>
62
+<rule ref="rulesets/java/design.xml/NonThreadSafeSingleton"><priority>1</priority></rule>
63
+<rule ref="rulesets/java/design.xml/AvoidConstantsInterface"><priority>1</priority></rule>
64
+<rule ref="rulesets/java/design.xml/UnsynchronizedStaticDateFormatter"><priority>1</priority></rule>
65
+<rule ref="rulesets/java/design.xml/PreserveStackTrace"><priority>1</priority></rule>
66
+<rule ref="rulesets/java/design.xml/UseCollectionIsEmpty"><priority>1</priority></rule>
67
+
68
+<rule ref="rulesets/java/finalizers.xml/EmptyFinalizer"><priority>1</priority></rule>
69
+<rule ref="rulesets/java/finalizers.xml/FinalizeOnlyCallsSuperFinalize"><priority>1</priority></rule>
70
+<rule ref="rulesets/java/finalizers.xml/FinalizeOverloaded"><priority>1</priority></rule>
71
+<rule ref="rulesets/java/finalizers.xml/FinalizeDoesNotCallSuperFinalize"><priority>1</priority></rule>
72
+<rule ref="rulesets/java/finalizers.xml/FinalizeShouldBeProtected"><priority>1</priority></rule>
73
+<rule ref="rulesets/java/finalizers.xml/AvoidCallingFinalize"><priority>1</priority></rule>
74
+
75
+<rule ref="rulesets/java/imports.xml/DuplicateImports"><priority>1</priority></rule>
76
+<rule ref="rulesets/java/imports.xml/DontImportJavaLang"><priority>1</priority></rule>
77
+<rule ref="rulesets/java/imports.xml/UnusedImports"><priority>1</priority></rule>
78
+<rule ref="rulesets/java/imports.xml/ImportFromSamePackage"><priority>1</priority></rule>
79
+
80
+<rule ref="rulesets/java/logging-java.xml/MoreThanOneLogger"><priority>1</priority></rule>
81
+<rule ref="rulesets/java/logging-java.xml/LoggerIsNotStaticFinal"><priority>1</priority></rule>
82
+
83
+<rule ref="rulesets/java/migrating.xml/ReplaceVectorWithList"><priority>1</priority></rule>
84
+<rule ref="rulesets/java/migrating.xml/ReplaceHashtableWithMap"><priority>1</priority></rule>
85
+<rule ref="rulesets/java/migrating.xml/ReplaceEnumerationWithIterator"><priority>1</priority></rule>
86
+<rule ref="rulesets/java/migrating.xml/AvoidEnumAsIdentifier"><priority>1</priority></rule>
87
+<rule ref="rulesets/java/migrating.xml/AvoidAssertAsIdentifier"><priority>1</priority></rule>
88
+<rule ref="rulesets/java/migrating.xml/IntegerInstantiation"><priority>1</priority></rule>
89
+<rule ref="rulesets/java/migrating.xml/ByteInstantiation"><priority>1</priority></rule>
90
+<rule ref="rulesets/java/migrating.xml/ShortInstantiation"><priority>1</priority></rule>
91
+<rule ref="rulesets/java/migrating.xml/LongInstantiation"><priority>1</priority></rule>
92
+
93
+<rule ref="rulesets/java/naming.xml/VariableNamingConventions"><priority>1</priority></rule>
94
+<rule ref="rulesets/java/naming.xml/MethodNamingConventions"><priority>1</priority></rule>
95
+<rule ref="rulesets/java/naming.xml/ClassNamingConventions"><priority>1</priority></rule>
96
+<rule ref="rulesets/java/naming.xml/AvoidDollarSigns"><priority>1</priority></rule>
97
+<rule ref="rulesets/java/naming.xml/MethodWithSameNameAsEnclosingClass"><priority>1</priority></rule>
98
+<rule ref="rulesets/java/naming.xml/SuspiciousHashcodeMethodName"><priority>1</priority></rule>
99
+<rule ref="rulesets/java/naming.xml/SuspiciousConstantFieldName"><priority>1</priority></rule>
100
+<rule ref="rulesets/java/naming.xml/SuspiciousEqualsMethodName"><priority>1</priority></rule>
101
+<rule ref="rulesets/java/naming.xml/NoPackage"><priority>1</priority></rule>
102
+<rule ref="rulesets/java/naming.xml/PackageCase"><priority>1</priority></rule>
103
+
104
+<rule ref="rulesets/java/optimizations.xml/LocalVariableCouldBeFinal"><priority>1</priority><properties><property name="violationSuppressXPath" value="//ForInit|//ForStatement/LocalVariableDeclaration"/></properties></rule>
105
+<rule ref="rulesets/java/optimizations.xml/MethodArgumentCouldBeFinal"><priority>1</priority></rule>
106
+<rule ref="rulesets/java/optimizations.xml/UseArrayListInsteadOfVector"><priority>1</priority></rule>
107
+<rule ref="rulesets/java/optimizations.xml/SimplifyStartsWith"><priority>1</priority></rule>
108
+<rule ref="rulesets/java/optimizations.xml/UseArraysAsList"><priority>1</priority></rule>
109
+<rule ref="rulesets/java/optimizations.xml/AvoidArrayLoops"><priority>1</priority></rule>
110
+<rule ref="rulesets/java/optimizations.xml/UnnecessaryWrapperObjectCreation"><priority>1</priority></rule>
111
+<rule ref="rulesets/java/optimizations.xml/AddEmptyString"><priority>1</priority></rule>
112
+
113
+<rule ref="rulesets/java/strictexception.xml/AvoidCatchingThrowable"><priority>1</priority></rule>
114
+<rule ref="rulesets/java/strictexception.xml/SignatureDeclareThrowsException"><priority>1</priority></rule>
115
+<rule ref="rulesets/java/strictexception.xml/ExceptionAsFlowControl"><priority>1</priority></rule>
116
+<rule ref="rulesets/java/strictexception.xml/AvoidCatchingNPE"><priority>1</priority></rule>
117
+<rule ref="rulesets/java/strictexception.xml/AvoidThrowingRawExceptionTypes"><priority>1</priority></rule>
118
+<rule ref="rulesets/java/strictexception.xml/DoNotExtendJavaLangError"><priority>1</priority></rule>
119
+<rule ref="rulesets/java/strictexception.xml/DoNotThrowExceptionInFinally"><priority>1</priority></rule>
120
+<rule ref="rulesets/java/strictexception.xml/AvoidThrowingNewInstanceOfSameException"><priority>1</priority></rule>
121
+
122
+<rule ref="rulesets/java/strings.xml/StringInstantiation"><priority>1</priority></rule>
123
+<rule ref="rulesets/java/strings.xml/StringToString"><priority>1</priority></rule>
124
+<rule ref="rulesets/java/strings.xml/InefficientStringBuffering"><priority>1</priority></rule>
125
+<rule ref="rulesets/java/strings.xml/UnnecessaryCaseChange"><priority>1</priority></rule>
126
+<rule ref="rulesets/java/strings.xml/UseStringBufferLength"><priority>1</priority></rule>
127
+<rule ref="rulesets/java/strings.xml/AppendCharacterWithChar"><priority>1</priority></rule>
128
+<rule ref="rulesets/java/strings.xml/UseIndexOfChar"><priority>1</priority></rule>
129
+<rule ref="rulesets/java/strings.xml/InefficientEmptyStringCheck"><priority>1</priority></rule>
130
+<rule ref="rulesets/java/strings.xml/UselessStringValueOf"><priority>1</priority></rule>
131
+<rule ref="rulesets/java/strings.xml/StringBufferInstantiationWithChar"><priority>1</priority></rule>
132
+<rule ref="rulesets/java/strings.xml/UseEqualsToCompareStrings"><priority>1</priority></rule>
133
+
134
+<rule ref="rulesets/java/typeresolution.xml/UnusedImports"><priority>1</priority><properties><property name="violationSuppressXPath" value="//ImportDeclaration[@ImportOnDemand='true']"/></properties></rule>
135
+<rule ref="rulesets/java/typeresolution.xml/SignatureDeclareThrowsException"><priority>1</priority></rule>
136
+
137
+<rule ref="rulesets/java/unusedcode.xml/UnusedPrivateField"><priority>1</priority></rule>
138
+<rule ref="rulesets/java/unusedcode.xml/UnusedLocalVariable"><priority>1</priority></rule>
139
+<rule ref="rulesets/java/unusedcode.xml/UnusedPrivateMethod"><priority>1</priority></rule>
140
+<rule ref="rulesets/java/unusedcode.xml/UnusedFormalParameter"><priority>1</priority></rule>
141
+
142
+</ruleset>

Notiek ielāde…
Atcelt
Saglabāt