forked from TrueFit/GildedRose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pmd-exclusions.xml
131 lines (112 loc) · 4.74 KB
/
pmd-exclusions.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?xml version="1.0"?>
<ruleset name="GildedRose Rules"
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>
Ruleset for GildedRose
</description>
<rule ref='category/java/bestpractices.xml'>
<exclude name="AbstractClassWithoutAbstractMethod"/>
<exclude name="AccessorClassGeneration"/>
<exclude name="AccessorMethodGeneration"/>
<exclude name="ArrayIsStoredDirectly"/>
<exclude name="AvoidMessageDigestField"/>
<exclude name="AvoidReassigningParameters"/>
<exclude name="AvoidStringBufferField"/>
<exclude name="ConstantsInInterface"/>
<exclude name="JUnitAssertionsShouldIncludeMessage"/>
<exclude name="JUnitTestContainsTooManyAsserts"/>
<exclude name="JUnitTestsShouldIncludeAssert"/>
<exclude name="JUnitUseExpected"/>
<exclude name="LooseCoupling"/>
<exclude name="MethodReturnsInternalArray"/>
<exclude name="ReplaceHashtableWithMap"/>
<exclude name="ReplaceVectorWithList"/>
<exclude name="SystemPrintln"/>
<exclude name="UseVarargs"/>
<exclude name="WhileLoopWithLiteralBoolean"/>
</rule>
<!-- Best Practices overrides -->>
<rule ref="category/java/bestpractices.xml/AvoidReassigningLoopVariables">
<properties>
<property name="forReassign" value="skip"/>
<property name="foreachReassign" value="firstOnly"/>
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/ForLoopVariableCount">
<properties>
<property name="maximumVariables" value="2"/>
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/GuardLogStatement">
<properties>
<property name="logLevels" value="debug"/>
<property name="guardsMethods" value="isDebugEnabled"/>
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/OneDeclarationPerLine">
<properties>
<property name="strictMode" value="true"/>
</properties>
</rule>
<!-- Code Style overrides -->
<rule ref="category/java/codestyle.xml/ClassNamingConventions">
<properties>
<property name="classPattern" value="[A-Z][a-zA-Z0-9]*"/>
<property name="abstractClassPattern" value="[A-Z][a-zA-Z0-9]*"/>
<property name="interfacePattern" value="[A-Z][a-zA-Z0-9]*"/>
<property name="enumPattern" value="[A-Z][a-zA-Z0-9]*"/>
<property name="annotationPattern" value="[A-Z][a-zA-Z0-9]*"/>
<property name="utilityClassPattern" value="[A-Z][a-zA-Z0-9]*"/>
</properties>
</rule>
<!-- Code style exclusions -->
<rule ref='category/java/codestyle.xml'>
<exclude name="AtLeastOneConstructor"/>
<exclude name="AvoidFinalLocalVariable"/>
<exclude name="CallSuperInConstructor"/>
<exclude name="CommentDefaultAccessModifier"/>
<exclude name="DefaultPackage"/>
<exclude name="LongVariable"/>
<exclude name="OnlyOneReturn"/>
<exclude name="ShortClassName"/>
<exclude name="UseUnderscoresInNumericLiterals"/>
<exclude name="TooManyStaticImports"/>
</rule>
<!-- Error Prone exclusions -->
<rule ref='category/java/errorprone.xml'>
<exclude name="AvoidFieldNameMatchingMethodName"/>
<exclude name="BeanMembersShouldSerialize"/>
<exclude name="DataflowAnomalyAnalysis"/>
<exclude name="UseLocaleWithCaseConversions"/>
</rule>
<!-- Error Prone overrides -->
<rule ref="category/java/errorprone.xml/EmptyCatchBlock">
<properties>
<property name="allowCommentedBlocks" value="true"/>
</properties>
</rule>
<!-- Design exclusions -->
<rule ref='category/java/design.xml'>
<exclude name="DataClass"/>
<exclude name="ExcessiveImports"/>
<exclude name="LawOfDemeter"/>
<exclude name="LoosePackageCoupling"/>
<exclude name="TooManyFields"/>
<exclude name="TooManyMethods"/>
</rule>
<!-- Design overrides -->
<rule ref="category/java/design.xml/SignatureDeclareThrowsException">
<properties>
<property name="IgnoreJUnitCompletely" value="true" />
</properties>
</rule>
<rule ref="category/java/design.xml/UseUtilityClass">
<properties>
<property name="ignoredAnnotations" value="org.springframework.boot.autoconfigure.SpringBootApplication" />
</properties>
</rule>
<rule ref='category/java/performance.xml'/>
<rule ref='category/java/security.xml'/>
</ruleset>