OSDN Git Service

update assembly plugins.
[jovsonz/Jovsonz.git] / src / main / config / pmdrules.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2
3 <!--
4     PMD用ルールセット定義
5
6     PMD [ https://pmd.github.io/ ] 5.3 以降用に記述されています。
7
8     Copyright(c) 2016 olyutorskii
9 -->
10
11 <ruleset
12   xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
13   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14   xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0
15   http://pmd.sourceforge.net/ruleset_2_0_0.xsd"
16   name="Custom ruleset"
17 >
18
19     <description>
20         custom rulesets for project
21     </description>
22
23 <!--
24     <rule ref="rulesets/java/android.xml" />
25 -->
26
27     <rule ref="rulesets/java/basic.xml" />
28
29     <rule ref="rulesets/java/braces.xml">
30         <exclude name="IfElseStmtsMustUseBraces" />
31         <exclude name="IfStmtsMustUseBraces" />
32     </rule>
33
34     <rule ref="rulesets/java/clone.xml" />
35
36     <rule ref="rulesets/java/codesize.xml">
37         <exclude name="TooManyMethods" />
38     </rule>
39     <rule ref="rulesets/java/codesize.xml/TooManyMethods">
40         <properties>
41             <property name="maxmethods" value="25"/>
42         </properties>
43     </rule>
44
45     <rule ref="rulesets/java/comments.xml">
46         <exclude name="CommentRequired" />
47         <exclude name="CommentSize" />
48     </rule>
49     <rule ref="rulesets/java/comments.xml/CommentRequired" >
50         <properties>
51             <property name="fieldCommentRequirement" value="Ignored"/>
52         </properties>
53     </rule>
54     <rule ref="rulesets/java/comments.xml/CommentSize" >
55         <properties>
56             <property name="maxLines" value="25"/>
57         </properties>
58     </rule>
59
60     <rule ref="rulesets/java/controversial.xml">
61         <exclude name="NullAssignment" />
62         <exclude name="OnlyOneReturn" />
63         <exclude name="DefaultPackage" />
64         <exclude name="DataflowAnomalyAnalysis" />
65         <exclude name="AvoidUsingShortType" />
66         <exclude name="AvoidLiteralsInIfCondition" />
67         <exclude name="UseConcurrentHashMap" />
68     </rule>
69
70     <rule ref="rulesets/java/coupling.xml">
71         <exclude name="LoosePackageCoupling" />
72         <exclude name="LawOfDemeter" />
73     </rule>
74
75     <rule ref="rulesets/java/design.xml">
76         <exclude name="SimplifyBooleanReturns" />
77         <exclude name="ConfusingTernary" />
78         <exclude name="UnnecessaryLocalBeforeReturn" />
79         <exclude name="FieldDeclarationsShouldBeAtStartOfClass" />
80     </rule>
81
82     <rule ref="rulesets/java/empty.xml" />
83
84     <rule ref="rulesets/java/finalizers.xml" />
85
86     <rule ref="rulesets/java/imports.xml" />
87
88 <!--
89     <rule ref="rulesets/java/j2ee.xml" />
90     <rule ref="rulesets/java/javabeans.xml" />
91 -->
92
93     <rule ref="rulesets/java/junit.xml" />
94
95 <!--
96     <rule ref="rulesets/java/logging-jakarta-commons.xml" />
97 -->
98
99     <rule ref="rulesets/java/logging-java.xml" />
100
101     <rule ref="rulesets/java/migrating.xml" />
102 <!--
103     <rule ref="rulesets/java/migrating_to_XX.xml" />
104 -->
105
106     <rule ref="rulesets/java/naming.xml">
107         <exclude name="ShortVariable" />
108         <exclude name="LongVariable" />
109         <exclude name="AvoidFieldNameMatchingMethodName" />
110     </rule>
111     <rule ref="rulesets/java/naming.xml/LongVariable">
112         <properties>
113             <property name="minimum" value="25"/>
114         </properties>
115     </rule>
116
117     <rule ref="rulesets/java/optimizations.xml">
118         <exclude name="LocalVariableCouldBeFinal" />
119         <exclude name="MethodArgumentCouldBeFinal" />
120         <exclude name="RedundantFieldInitializer" />
121     </rule>
122
123     <rule ref="rulesets/java/strictexception.xml">
124         <exclude name="AvoidThrowingNullPointerException" />
125     </rule>
126
127     <rule ref="rulesets/java/strings.xml" />
128
129     <rule ref="rulesets/java/sunsecure.xml" />
130
131     <rule ref="rulesets/java/typeresolution.xml" />
132
133     <rule ref="rulesets/java/unnecessary.xml">
134         <exclude name="UnnecessaryReturn" />
135         <exclude name="UselessParentheses" />
136     </rule>
137
138     <rule ref="rulesets/java/unusedcode.xml" />
139
140 </ruleset>
141
142 <!-- EOF -->