-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpmd-rules.xml
76 lines (73 loc) · 2.78 KB
/
pmd-rules.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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="Custom ruleset"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
<description>
Custom rules for checking JUnit test quality.
</description>
<rule ref="rulesets/java/basic.xml">
<exclude name="AvoidBranchingStatementAsLastInLoop" />
</rule>
<rule ref="rulesets/java/unusedcode.xml"></rule>
<rule ref="rulesets/java/unnecessary.xml">
<exclude name="UnnecessaryModifier"/>
</rule>
<rule ref="rulesets/java/imports.xml">
<exclude name="TooManyStaticImports"/>
</rule>
<rule ref="rulesets/java/imports.xml/TooManyStaticImports">
<properties>
<property name="maximumStaticImports" value="10" />
</properties>
</rule>
<rule ref="rulesets/java/strings.xml">
<exclude name="AvoidDuplicateLiterals" />
</rule>
<rule ref="rulesets/java/strings.xml/AvoidDuplicateLiterals">
<properties>
<property name="maxDuplicateLiterals" value="6" />
<property name="skipAnnotations" value="true" />
</properties>
</rule>
<rule ref="rulesets/java/codesize.xml">
<exclude name="TooManyMethods" />
<exclude name="ExcessivePublicCount" />
<exclude name="CyclomaticComplexity" />
<exclude name="StdCyclomaticComplexity" />
<exclude name="ModifiedCyclomaticComplexity" />
</rule>
<rule ref="rulesets/java/codesize.xml/CyclomaticComplexity">
<properties>
<property name="reportLevel" value="15" />
</properties>
</rule>
<rule ref="rulesets/java/codesize.xml/StdCyclomaticComplexity">
<properties>
<property name="reportLevel" value="15" />
</properties>
</rule>
<rule ref="rulesets/java/codesize.xml/ModifiedCyclomaticComplexity">
<properties>
<property name="reportLevel" value="15" />
</properties>
</rule>
<rule ref="rulesets/java/braces.xml">
<exclude name="IfStmtsMustUseBraces"/>
<exclude name="IfElseStmtsMustUseBraces"/>
</rule>
<rule ref="rulesets/java/clone.xml"/>
<rule ref="rulesets/java/empty.xml">
<exclude name="EmptyCatchBlock"/>
</rule>
<rule ref="rulesets/java/junit.xml">
<exclude name="JUnitAssertionsShouldIncludeMessage"/>
<exclude name="JUnitTestContainsTooManyAsserts" />
<exclude name="JUnitTestsShouldIncludeAssert" />
</rule>
<rule ref="rulesets/java/junit.xml/JUnitTestContainsTooManyAsserts">
<properties>
<property name="maximumAsserts" value="5" />
</properties>
</rule>
</ruleset>