-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
pmd-ruleset.xml
44 lines (37 loc) · 1.74 KB
/
pmd-ruleset.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
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ruleset name="PMD.rul" 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">
<description>This ruleset was created from PMD.rul</description>
<rule ref="rulesets/java/basic.xml">
<exclude name="AvoidBranchingStatementAsLastInLoop"/>
</rule>
<rule ref="rulesets/java/braces.xml"/>
<rule ref="rulesets/java/strings.xml">
<!-- TODO: This warns about annotations, apparently fixed in a later version. -->
<exclude name="AvoidDuplicateLiterals"/>
</rule>
<rule ref="rulesets/java/unusedcode.xml"/>
<rule ref="rulesets/java/design.xml">
<exclude name="ConfusingTernary"/>
<exclude name="EmptyMethodInAbstractClassShouldBeAbstract"/>
<exclude name="AvoidSynchronizedAtMethodLevel"/>
<!-- This check breaks on double checked locking which is safe in Java 6/7 -->
<exclude name="NonThreadSafeSingleton"/>
<!-- This check breaks the builder pattern, I didn't find the solution-->
<exclude name="AccessorClassGeneration"/>
<!-- TODO: Fix these -->
<exclude name="AvoidReassigningParameters"/>
<exclude name="GodClass"/>
</rule>
<rule ref="rulesets/java/design.xml/AvoidDeeplyNestedIfStmts">
<properties>
<property name="problemDepth" value="5"/>
</properties>
</rule>
<rule message="Commented blocks are ok" ref="rulesets/java/empty.xml/EmptyCatchBlock">
<properties>
<property name="allowCommentedBlocks" value="true"/>
</properties>
</rule>
</ruleset>