-
Notifications
You must be signed in to change notification settings - Fork 4
/
pmd.xml
89 lines (89 loc) · 3.83 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
81
82
83
84
85
86
87
88
89
<?xml version="1.0"?>
<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">
<rule ref="rulesets/internal/all-java.xml">
<exclude name="AvoidCatchingGenericException" />
<exclude name="AvoidLiteralsInIfCondition" />
<exclude name="AvoidSynchronizedAtMethodLevel" />
<exclude name="AvoidUsingVolatile" />
<exclude name="AtLeastOneConstructor" />
<exclude name="BeanMembersShouldSerialize" />
<exclude name="CommentRequired" />
<exclude name="CommentSize" />
<exclude name="GuardLogStatement" />
<exclude name="UnnecessaryImport" />
<exclude name="ImmutableField" />
<exclude name="JUnitAssertionsShouldIncludeMessage" />
<exclude name="LawOfDemeter" />
<exclude name="LocalVariableCouldBeFinal" />
<exclude name="ProperLogger" />
<exclude name="LongVariable" />
<exclude name="LoosePackageCoupling" />
<exclude name="MethodArgumentCouldBeFinal" />
<exclude name="OnlyOneReturn" />
<exclude name="ShortClassName" />
<exclude name="ShortVariable" />
<exclude name="SignatureDeclareThrowsException" />
<exclude name="SingularField" />
<exclude name="TestClassWithoutTestCases" />
<exclude name="UnusedPrivateField" />
<exclude name="UnusedPrivateMethod" />
<exclude name="UseConcurrentHashMap" />
<exclude name="UseUtilityClass" />
<exclude name="DoNotTerminateVM" />
<exclude name="DoNotUseThreads" />
</rule>
<rule ref="rulesets/internal/all-java.xml/ImmutableField">
<!-- Project Lombok -->
<properties>
<property name="violationSuppressXPath" value="../../..[Annotation//Name[@Image='Setter']]"/>
</properties>
</rule>
<rule ref="rulesets/internal/all-java.xml/LocalVariableCouldBeFinal">
<properties>
<property name="violationSuppressXPath" value="../../ForStatement"/>
</properties>
</rule>
<rule ref="rulesets/internal/all-java.xml/ProperLogger">
<properties>
<property name="violationSuppressXPath" value="../..[Annotation//Name[@Image='Inject']]"/>
</properties>
</rule>
<rule ref="rulesets/internal/all-java.xml/SignatureDeclareThrowsException">
<!-- JUnit tests -->
<properties>
<property name="violationSuppressXPath" value="../../..[Annotation//Name[@Image='Test']]"/>
</properties>
</rule>
<rule ref="rulesets/internal/all-java.xml/SingularField">
<!-- Project Lombok -->
<properties>
<property name="violationSuppressXPath" value="..[Annotation//Name[@Image='Getter']]" />
</properties>
</rule>
<rule ref="rulesets/internal/all-java.xml/TestClassWithoutTestCases">
<!-- Support for extending test classes -->
<properties>
<property name="violationSuppressXPath" value="//Annotation//Name[@Image='Test']"/>
</properties>
</rule>
<rule ref="rulesets/internal/all-java.xml/UnusedPrivateField">
<!-- Project Lombok -->
<properties>
<property name="violationSuppressXPath" value="../../..[Annotation//Name[(@Image='Getter') or (@Image='Setter') or (@Image='Drone')]]" />
</properties>
</rule>
<rule ref="rulesets/internal/all-java.xml/UnusedPrivateMethod">
<!-- CDI observer -->
<properties>
<property name="violationSuppressXPath" value="//MethodDeclaration//MarkerAnnotation/Name[@Image='Observes']" />
</properties>
</rule>
<rule ref="rulesets/internal/all-java.xml/UseUtilityClass">
<!-- Project Lombok -->
<properties>
<property name="violationSuppressXPath" value="((../..[Annotation//Name[(@Image='NoArgsConstructor') or (@Image='RequiredArgsConstructor') or (@Image='AllArgsConstructor')]]) and //PrimaryPrefix//Name[@Image='AccessLevel.PRIVATE']) or //PrimaryPrefix//Name[@Image='AccessLevel.PUBLIC'] or //Annotation//Name[(@Image='Getter') or (@Image='Setter')]" />
</properties>
</rule>
</ruleset>