This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
pmd-rules.xml
executable file
·60 lines (49 loc) · 1.87 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PMD rules" 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>Mandatory PMD rules description.</description>
<!--region File exclusions-->
<exclude-pattern>.*\.R\$.*</exclude-pattern>
<!--endregion-->
<!--region Best practices -->
<rule ref="category/java/bestpractices.xml" />
<!--endregion-->
<!--region Code style -->
<rule ref="category/java/codestyle.xml">
<exclude name="AbstractNaming" />
</rule>
<!-- Allow class names to have a minimum of 3 characters (default: 5) -->
<rule ref="category/java/codestyle.xml/ShortClassName">
<properties>
<property name="minimum" value="3" />
</properties>
</rule>
<!-- Allow method names to have a minimum of 2 characters (default: 3) -->
<rule ref="category/java/codestyle.xml/ShortMethodName">
<properties>
<property name="minimum" value="2" />
</properties>
</rule>
<!--endregion-->
<!--region Design -->
<rule ref="category/java/design.xml">
<exclude name="StdCyclomaticComplexity" />
</rule>
<!-- Suppress CyclomaticComplexity check for equals and hashCode -->
<rule ref="category/java/design.xml/CyclomaticComplexity">
<properties>
<property name="violationSuppressXPath" value="//MethodDeclarator[@Image='equals' or @Image='hashCode']" />
</properties>
</rule>
<!--region Documentation -->
<rule ref="category/java/documentation.xml">
<exclude name="CommentRequired" />
<exclude name="CommentSize" />
</rule>
<!--endregion-->
<!--region Performance -->
<rule ref="category/java/performance.xml">
<exclude name="TooFewBranchesForASwitchStatement" />
</rule>
<!--endregion-->
</ruleset>