-
Notifications
You must be signed in to change notification settings - Fork 0
/
pmd.xml
80 lines (68 loc) · 2.99 KB
/
pmd.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0"?>
<ruleset name="Custom ruleset"
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"
xsi:noNamespaceSchemaLocation="http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
<description>MOTECH PMD ruleset</description>
<rule ref="rulesets/sunsecure.xml/MethodReturnsInternalArray">
<priority>2</priority>
</rule>
<rule ref="rulesets/sunsecure.xml/ArrayIsStoredDirectly">
<priority>2</priority>
</rule>
<rule ref="rulesets/codesize.xml/NcssMethodCount">
<properties>
<property name="minimum" value="50"/>
</properties>
</rule>
<rule ref="rulesets/coupling.xml/LooseCoupling"/>
<rule ref="rulesets/design.xml/ConstructorCallsOverridableMethod"/>
<rule ref="rulesets/design.xml/PreserveStackTrace"/>
<rule ref="rulesets/design.xml/SimplifyConditional"/>
<rule ref="rulesets/design.xml/UnnecessaryLocalBeforeReturn"/>
<rule ref="rulesets/logging-java.xml/AvoidPrintStackTrace"/>
<rule ref="rulesets/migrating.xml/IntegerInstantiation"/>
<rule ref="rulesets/strictexception.xml/AvoidCatchingThrowable"/>
<rule ref="rulesets/strictexception.xml/AvoidThrowingRawExceptionTypes"/>
<rule ref="rulesets/strictexception.xml/SignatureDeclareThrowsException"/>
<rule ref="rulesets/strings.xml/AvoidDuplicateLiterals"/>
<rule ref="rulesets/strings.xml/UseIndexOfChar"/>
<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/>
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/>
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
<rule ref="rulesets/javabeans.xml/MissingSerialVersionUID"/>
<rule name="DontImportInternal"
message="Avoid importing internal packages of any external libraries"
class="net.sourceforge.pmd.rules.XPathRule">
<description>
Avoid importing any internal package of any external libraries.
</description>
<properties>
<property name="xpath">
<value>
<![CDATA[
//ImportDeclaration
[not(starts-with(Name/@Image, 'org.motechproject'))]
[contains(Name/@Image, '.internal.')]
]]>
</value>
</property>
</properties>
<priority>3</priority>
</rule>
<rule name="CommentedOutCode"
message="Avoid commeneted out code."
class="CommentedOutCode">
<properties>
<property name="classificationThreshold" value="0.85"/>
<property name="skipCheckSequence" value="cmt"/>
<property name="skipJavaDocs" value="true"/>
</properties>
<description>
Don't you dare commit commented out code!
</description>
<priority>3</priority>
</rule>
</ruleset>