• R/O
  • SSH

JinArchiver: Commit

JinArchiverは、人狼BBSの過去ログを独自のXML形式でローカルディスクに保存するためのツールです。


Commit MetaInfo

Revision819720636f5b239d42f6211e5511e2f66e0bcc84 (tree)
Time2017-04-10 22:18:40
Author <olyutorskii@user...>

Log Message

move checkstyle configs

Change Summary

Incremental Difference

diff -r 7025efee0a6b -r 819720636f5b checkstyle-suppressions.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/checkstyle-suppressions.xml Mon Apr 10 22:18:40 2017 +0900
@@ -0,0 +1,43 @@
1+<?xml version="1.0" encoding="UTF-8" ?>
2+
3+<!DOCTYPE suppressions PUBLIC
4+ "-//Puppy Crawl//DTD Suppressions 1.1//EN"
5+ "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
6+
7+<!--
8+ Checkstyle用警告抑止設定
9+ ※ SuppressionFilter モジュール用
10+
11+ [ http://checkstyle.sourceforge.net/ ]
12+
13+ Copyright(c) 2010 olyutorskii
14+-->
15+
16+
17+<suppressions>
18+
19+ <!-- Class Design -->
20+ <suppress files="" checks="DesignForExtension" />
21+
22+ <!-- Coding -->
23+ <suppress files="" checks="ExplicitInitialization" />
24+ <suppress files="" checks="FinalLocalVariable" />
25+ <suppress files="" checks="MagicNumber" />
26+
27+ <!-- Imports -->
28+ <suppress files="" checks="ImportControl" />
29+
30+ <!-- Javadoc Comments -->
31+ <suppress files="" checks="SummaryJavadocCheck" />
32+ <!-- 句読点対応待ち -->
33+ <suppress files="" checks="SingleLineJavadoc" />
34+ <!-- ignoredTagsプロパティ対応待ち -->
35+
36+ <!-- Miscellaneous -->
37+ <suppress files="" checks="FinalParameters" />
38+ <suppress files="" checks="TrailingComment" />
39+
40+</suppressions>
41+
42+
43+<!-- EOF -->
diff -r 7025efee0a6b -r 819720636f5b checkstyle.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/checkstyle.xml Mon Apr 10 22:18:40 2017 +0900
@@ -0,0 +1,423 @@
1+<?xml version="1.0" encoding="UTF-8" ?>
2+
3+<!DOCTYPE module PUBLIC
4+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
5+ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
6+
7+<!--
8+ Checkstyle用チェック項目定義。
9+
10+ Checkstyle 6.1 以降向けに記述。
11+
12+ [ http://checkstyle.sourceforge.net/ ]
13+
14+ Copyright(c) 2010 olyutorskii
15+-->
16+
17+
18+<module name="Checker">
19+
20+ <property name="charset" value="UTF-8" />
21+ <property name="localeCountry" value="JP" />
22+ <property name="localeLanguage" value="ja" />
23+ <property name="severity" value="error" />
24+
25+
26+ <!-- Filters -->
27+ <module name="SeverityMatchFilter" />
28+ <module name="SuppressionCommentFilter" />
29+ <module name="SuppressionFilter" />
30+ <module name="SuppressWarningsFilter" />
31+ <module name="SuppressWithNearbyCommentFilter" />
32+
33+
34+ <!-- Headers -->
35+ <module name="RegexpHeader">
36+ <property name="header" value="^/\*$\n^ \*( .*)?$\n^ \*/$\n" />
37+ <property name="multiLines" value="2" />
38+ <property name="fileExtensions" value="java" />
39+ </module>
40+
41+
42+ <!-- Javadoc Comments -->
43+ <module name="JavadocPackage" />
44+
45+
46+ <!-- Miscellaneous -->
47+ <module name="NewlineAtEndOfFile">
48+ <property name="fileExtensions" value="java" />
49+ </module>
50+ <module name="Translation" />
51+ <module name="UniqueProperties" />
52+
53+
54+ <!-- Regexp -->
55+ <module name="RegexpMultiline">
56+ <property name="format" value="[\u000b\f\u001a]" />
57+ </module>
58+<!--<module name="RegexpOnFilename" /> 6.15 or later -->
59+ <module name="RegexpSingleline">
60+ <property name="format" value="\s+$" />
61+ </module>
62+ <module name="RegexpSingleline">
63+ <!-- scm conflict -->
64+ <property name="format" value="&lt;&lt;&lt;&lt;&lt;" />
65+ </module>
66+
67+
68+ <!-- Size Violations -->
69+ <module name="FileLength">
70+ <property name="max" value="2000"/>
71+ </module>
72+
73+
74+ <!-- Whitespace -->
75+ <module name="FileTabCharacter" />
76+
77+
78+ <module name="TreeWalker">
79+
80+ <property name="tabWidth" value="8"/>
81+
82+
83+ <!-- Annotations -->
84+
85+ <module name="AnnotationLocation" />
86+ <module name="AnnotationUseStyle" />
87+ <module name="MissingDeprecated" />
88+ <module name="MissingOverride" />
89+ <module name="PackageAnnotation" />
90+ <module name="SuppressWarnings" />
91+ <module name="SuppressWarningsHolder" />
92+
93+
94+ <!-- Block Checks -->
95+ <module name="AvoidNestedBlocks" />
96+ <module name="EmptyBlock" />
97+<!-- <module name="EmptyCatchBlock" /> 6.4 or later -->
98+ <module name="LeftCurly" />
99+ <module name="NeedBraces">
100+ <property name="tokens" value="LITERAL_DO" />
101+ </module>
102+ <module name="RightCurly" />
103+
104+
105+ <!-- Class Design -->
106+
107+ <module name="DesignForExtension" />
108+ <module name="FinalClass" />
109+ <module name="HideUtilityClassConstructor" />
110+ <module name="InnerTypeLast" />
111+ <module name="InterfaceIsType" />
112+ <module name="MutableException" />
113+ <module name="OneTopLevelClass" />
114+ <module name="ThrowsCount">
115+ <property name="max" value="4" />
116+ </module>
117+ <module name="VisibilityModifier" />
118+
119+
120+ <!-- Coding -->
121+
122+ <module name="ArrayTrailingComma" />
123+ <module name="AvoidInlineConditionals" />
124+ <module name="CovariantEquals" />
125+ <module name="DeclarationOrder" />
126+ <module name="DefaultComesLast" />
127+ <module name="EmptyStatement" />
128+ <module name="EqualsAvoidNull" />
129+ <module name="EqualsHashCode" />
130+ <module name="ExplicitInitialization" />
131+ <module name="FallThrough" />
132+ <module name="FinalLocalVariable" />
133+ <module name="HiddenField">
134+ <property name="ignoreConstructorParameter" value="true" />
135+ <property name="ignoreSetter" value="true" />
136+ <property name="ignoreAbstractMethods" value="true" />
137+ </module>
138+ <module name="IllegalCatch" />
139+ <module name="IllegalInstantiation" />
140+ <module name="IllegalThrows" />
141+ <module name="IllegalToken">
142+ <property name="tokens" value="LITERAL_NATIVE" />
143+ </module>
144+ <module name="IllegalTokenText">
145+ <property name="tokens" value="NUM_INT, NUM_LONG" />
146+ <property name="format" value="^0_*[0-7]" />
147+ <property name="message" value="inhibit octal number" />
148+ </module>
149+ <module name="IllegalType" />
150+ <module name="InnerAssignment" />
151+ <module name="MagicNumber" />
152+ <module name="MissingCtor" />
153+ <module name="MissingSwitchDefault" />
154+ <module name="ModifiedControlVariable" />
155+ <module name="MultipleStringLiterals" />
156+ <module name="MultipleVariableDeclarations" />
157+ <module name="SimplifyBooleanExpression" />
158+ <module name="SimplifyBooleanReturn" />
159+ <module name="StringLiteralEquality" />
160+ <module name="NestedForDepth" />
161+ <module name="NestedIfDepth" />
162+ <module name="NestedTryDepth" />
163+ <module name="NoClone" />
164+ <module name="NoFinalizer" />
165+ <module name="OneStatementPerLine" />
166+ <module name="OverloadMethodsDeclarationOrder" />
167+ <module name="PackageDeclaration" />
168+ <module name="ParameterAssignment" />
169+ <module name="RequireThis">
170+ <property name="checkMethods" value="false" />
171+ </module>
172+ <module name="ReturnCount">
173+ <property name="max" value="5" />
174+ </module>
175+ <module name="SimplifyBooleanExpression" />
176+ <module name="SimplifyBooleanReturn" />
177+ <module name="StringLiteralEquality" />
178+ <module name="SuperClone" />
179+ <module name="SuperFinalize" />
180+ <module name="UnnecessaryParentheses" />
181+ <module name="VariableDeclarationUsageDistance">
182+ <property name="allowedDistance" value="5" />
183+ </module>
184+
185+
186+ <!-- Imports -->
187+
188+ <module name="AvoidStarImport" />
189+ <module name="AvoidStaticImport" />
190+ <module name="CustomImportOrder" />
191+ <module name="IllegalImport" />
192+ <module name="ImportControl" />
193+ <module name="ImportOrder" />
194+ <module name="RedundantImport" />
195+ <module name="UnusedImports" />
196+
197+
198+ <!-- Javadoc Comments -->
199+
200+ <module name="AtclauseOrder" />
201+ <module name="JavadocMethod" />
202+ <module name="JavadocParagraph" />
203+ <module name="JavadocStyle">
204+ <property
205+ name="endOfSentenceFormat"
206+ value="([。.?!][ \t\n\r\f&lt;])|([。.?!]$)" />
207+ <property name="checkEmptyJavadoc" value="true" />
208+ <property name="checkHtml" value="true" />
209+ </module>
210+ <module name="JavadocTagContinuationIndentation" />
211+ <module name="JavadocType" />
212+ <module name="JavadocVariable">
213+ <property name="scope" value="protected" />
214+ </module>
215+ <module name="NonEmptyAtclauseDescription" />
216+ <module name="SingleLineJavadoc" />
217+ <module name="SummaryJavadocCheck" />
218+ <module name="WriteTag" />
219+
220+
221+ <!-- Metrics -->
222+
223+ <module name="BooleanExpressionComplexity" />
224+ <module name="ClassDataAbstractionCoupling" />
225+ <module name="ClassFanOutComplexity" />
226+ <module name="CyclomaticComplexity" />
227+ <module name="JavaNCSS" />
228+ <module name="NPathComplexity" />
229+
230+
231+ <!-- Miscellaneous -->
232+
233+ <module name="ArrayTypeStyle" />
234+ <module name="AvoidEscapedUnicodeCharacters">
235+ <property name="allowEscapesForControlCharacters" value="true"/>
236+ <property name="allowByTailComment" value="true"/>
237+ <property name="allowIfAllCharactersEscaped" value="true"/>
238+ <property name="allowNonPrintableEscapes" value="true"/>
239+ </module>
240+<!-- <module name="CommentsIndentation" /> 6.10 or later -->
241+ <module name="DescendantToken" />
242+ <module name="FileContentsHolder" />
243+ <module name="FinalParameters" />
244+ <module name="Indentation">
245+ <property name="caseIndent" value="0" />
246+ </module>
247+ <module name="OuterTypeFilename" />
248+ <module name="TodoComment">
249+ <property name="format" value="TODO" />
250+ </module>
251+ <module name="TrailingComment" />
252+ <module name="UncommentedMain" />
253+ <module name="UpperEll" />
254+
255+
256+ <!-- Modifiers -->
257+
258+ <module name="ModifierOrder" />
259+ <module name="RedundantModifier" />
260+
261+
262+ <!-- Naming Conventions -->
263+
264+ <module name="AbbreviationAsWordInName" />
265+ <module name="AbstractClassName">
266+ <property
267+ name="format"
268+ value="^Abstract.*$|^.*Factory$|^.*Builder$|^.*Adapter$"
269+ />
270+ </module>
271+<!-- <module name="CatchParameterName" /> 6.14 or later -->
272+ <module name="ClassTypeParameterName" />
273+ <module name="ConstantName" />
274+ <module name="InterfaceTypeParameterName" />
275+ <module name="LocalFinalVariableName">
276+ <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
277+ </module>
278+ <module name="LocalVariableName">
279+ <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
280+ </module>
281+ <module name="MemberName">
282+ <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
283+ </module>
284+ <module name="MethodName" />
285+ <module name="MethodTypeParameterName" />
286+ <module name="PackageName" />
287+ <module name="ParameterName">
288+ <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
289+ </module>
290+ <module name="StaticVariableName">
291+ <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
292+ </module>
293+ <module name="TypeName" />
294+
295+
296+ <!-- Regex -->
297+
298+ <module name="Regexp">
299+ <property name="format" value="@author" />
300+ <property name="illegalPattern" value="true" />
301+ </module>
302+ <module name="Regexp">
303+ <property name="format" value="^ \* Copyright\(c\)" />
304+ </module>
305+ <module name="Regexp">
306+ <property name="format" value="^ \* License : The MIT License" />
307+ <property name="duplicateLimit" value="1" />
308+ </module>
309+ <module name="RegexpSinglelineJava">
310+ <property name="format" value="\u0000" />
311+ </module>
312+
313+
314+ <!-- Size Violations -->
315+
316+ <module name="AnonInnerLength" />
317+ <module name="ExecutableStatementCount" />
318+ <module name="LineLength">
319+ <property name="max" value="78" />
320+ </module>
321+ <module name="MethodCount" />
322+ <module name="MethodLength" />
323+ <module name="OuterTypeNumber" />
324+ <module name="ParameterNumber" />
325+
326+
327+ <!-- Whitespace -->
328+
329+ <module name="EmptyForInitializerPad" />
330+ <module name="EmptyForIteratorPad" />
331+ <module name="EmptyLineSeparator">
332+ <property
333+ name="tokens"
334+ value="PACKAGE_DEF,
335+ IMPORT,
336+ CLASS_DEF,
337+ INTERFACE_DEF,
338+ ENUM_DEF,
339+ STATIC_INIT,
340+ INSTANCE_INIT,
341+ METHOD_DEF,
342+ CTOR_DEF,
343+ "
344+ />
345+ </module>
346+ <module name="GenericWhitespace" />
347+ <module name="MethodParamPad">
348+ <property
349+ name="tokens"
350+ value="CTOR_DEF, LITERAL_NEW, METHOD_DEF, SUPER_CTOR_CALL"
351+ />
352+ </module>
353+ <module name="NoLineWrap" />
354+ <module name="NoWhitespaceAfter">
355+ <property name="allowLineBreaks" value="false" />
356+ <property name="tokens" value="INC, DEC, DOT" />
357+ </module>
358+ <module name="NoWhitespaceBefore">
359+ <property name="allowLineBreaks" value="false" />
360+ <property name="tokens" value="COMMA, POST_INC, POST_DEC" />
361+ </module>
362+ <module name="NoWhitespaceBefore">
363+ <property name="allowLineBreaks" value="true" />
364+ <property name="tokens" value="SEMI" />
365+ </module>
366+ <module name="OperatorWrap">
367+ <property name="option" value="eol" />
368+ <property
369+ name="tokens"
370+ value="ASSIGN,
371+ BAND_ASSIGN, BOR_ASSIGN, BXOR_ASSIGN,
372+ PLUS_ASSIGN, MINUS_ASSIGN,
373+ STAR_ASSIGN, DIV_ASSIGN, MOD_ASSIGN,
374+ SL_ASSIGN, SR_ASSIGN, BSR_ASSIGN"
375+ />
376+ </module>
377+ <module name="OperatorWrap">
378+ <property name="option" value="nl" />
379+ <property
380+ name="tokens"
381+ value="QUESTION,
382+ BAND, BOR, BXOR,
383+ PLUS, MINUS, STAR, DIV, MOD,
384+ LAND, LOR,
385+ EQUAL, NOT_EQUAL"
386+ />
387+ </module>
388+ <module name="ParenPad">
389+ <property name="option" value="nospace" />
390+ <property
391+ name="tokens"
392+ value="CTOR_CALL, METHOD_CALL, SUPER_CTOR_CALL"
393+ />
394+ </module>
395+ <module name="SeparatorWrap">
396+ <property name="tokens" value="DOT" />
397+ <property name="option" value="nl" />
398+ </module>
399+ <module name="TypecastParenPad" />
400+ <module name="WhitespaceAfter" />
401+ <module name="WhitespaceAround">
402+ <property
403+ name="tokens"
404+ value="ASSIGN,
405+ LAND, LOR,
406+ BAND, BOR, BXOR, BSR,
407+ BAND_ASSIGN, BOR_ASSIGN, BXOR_ASSIGN, BSR_ASSIGN,
408+ SL, SR,
409+ SL_ASSIGN, SR_ASSIGN,
410+ MINUS, STAR, DIV, MOD,
411+ PLUS_ASSIGN, MINUS_ASSIGN,
412+ STAR_ASSIGN, DIV_ASSIGN, MOD_ASSIGN,
413+ EQUAL, NOT_EQUAL, GT, GE, LT, LE,
414+ "
415+ />
416+ </module>
417+
418+
419+ </module>
420+
421+</module>
422+
423+<!-- EOF -->
diff -r 7025efee0a6b -r 819720636f5b pmdrules.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pmdrules.xml Mon Apr 10 22:18:40 2017 +0900
@@ -0,0 +1,142 @@
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 -->
diff -r 7025efee0a6b -r 819720636f5b pom.xml
--- a/pom.xml Mon Apr 10 22:03:41 2017 +0900
+++ b/pom.xml Mon Apr 10 22:18:40 2017 +0900
@@ -97,8 +97,8 @@
9797
9898 <checkstyle-plugin.version>2.17</checkstyle-plugin.version>
9999 <checkstyleruntime.version>6.19</checkstyleruntime.version>
100- <project.mainconf>${project.basedir}/src/main/config</project.mainconf>
101- <checkstyle.config.location>${project.mainconf}/checks.xml</checkstyle.config.location>
100+ <checkstyle.config.location>${project.basedir}/checkstyle.xml</checkstyle.config.location>
101+ <checkstyle.suppressions.location>${project.basedir}/checkstyle-suppressions.xml</checkstyle.suppressions.location>
102102 <checkstyle.enable.rss>false</checkstyle.enable.rss>
103103
104104 <pmd-plugin.version>3.7</pmd-plugin.version>
@@ -535,7 +535,7 @@
535535 <version>${pmd-plugin.version}</version>
536536 <configuration>
537537 <rulesets>
538- <ruleset>${project.mainconf}/pmdrules.xml</ruleset>
538+ <ruleset>${project.basedir}/pmdrules.xml</ruleset>
539539 </rulesets>
540540 </configuration>
541541 <reportSets>
diff -r 7025efee0a6b -r 819720636f5b src/main/config/checks.xml
--- a/src/main/config/checks.xml Mon Apr 10 22:03:41 2017 +0900
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,425 +0,0 @@
1-<?xml version="1.0" encoding="UTF-8" ?>
2-
3-<!DOCTYPE module PUBLIC
4- "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
5- "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
6-
7-<!--
8- Checkstyle用チェック項目定義。
9-
10- Checkstyle 6.1 以降向けに記述。
11-
12- [ http://checkstyle.sourceforge.net/ ]
13-
14- Copyright(c) 2010 olyutorskii
15--->
16-
17-
18-<module name="Checker">
19-
20- <property name="charset" value="UTF-8" />
21- <property name="localeCountry" value="JP" />
22- <property name="localeLanguage" value="ja" />
23- <property name="severity" value="error" />
24-
25-
26- <!-- Filters -->
27- <module name="SeverityMatchFilter" />
28- <module name="SuppressionCommentFilter" />
29- <module name="SuppressionFilter">
30- <property name="file" value="src/main/config/suppressions.xml" />
31- </module>
32- <module name="SuppressWarningsFilter" />
33- <module name="SuppressWithNearbyCommentFilter" />
34-
35-
36- <!-- Headers -->
37- <module name="RegexpHeader">
38- <property name="header" value="^/\*$\n^ \*( .*)?$\n^ \*/$\n" />
39- <property name="multiLines" value="2" />
40- <property name="fileExtensions" value="java" />
41- </module>
42-
43-
44- <!-- Javadoc Comments -->
45- <module name="JavadocPackage" />
46-
47-
48- <!-- Miscellaneous -->
49- <module name="NewlineAtEndOfFile">
50- <property name="fileExtensions" value="java" />
51- </module>
52- <module name="Translation" />
53- <module name="UniqueProperties" />
54-
55-
56- <!-- Regexp -->
57- <module name="RegexpMultiline">
58- <property name="format" value="[\u000b\f\u001a]" />
59- </module>
60-<!--<module name="RegexpOnFilename" /> 6.15 or later -->
61- <module name="RegexpSingleline">
62- <property name="format" value="\s+$" />
63- </module>
64- <module name="RegexpSingleline">
65- <!-- scm conflict -->
66- <property name="format" value="&lt;&lt;&lt;&lt;&lt;" />
67- </module>
68-
69-
70- <!-- Size Violations -->
71- <module name="FileLength">
72- <property name="max" value="2000"/>
73- </module>
74-
75-
76- <!-- Whitespace -->
77- <module name="FileTabCharacter" />
78-
79-
80- <module name="TreeWalker">
81-
82- <property name="tabWidth" value="8"/>
83-
84-
85- <!-- Annotations -->
86-
87- <module name="AnnotationLocation" />
88- <module name="AnnotationUseStyle" />
89- <module name="MissingDeprecated" />
90- <module name="MissingOverride" />
91- <module name="PackageAnnotation" />
92- <module name="SuppressWarnings" />
93- <module name="SuppressWarningsHolder" />
94-
95-
96- <!-- Block Checks -->
97- <module name="AvoidNestedBlocks" />
98- <module name="EmptyBlock" />
99-<!-- <module name="EmptyCatchBlock" /> 6.4 or later -->
100- <module name="LeftCurly" />
101- <module name="NeedBraces">
102- <property name="tokens" value="LITERAL_DO" />
103- </module>
104- <module name="RightCurly" />
105-
106-
107- <!-- Class Design -->
108-
109- <module name="DesignForExtension" />
110- <module name="FinalClass" />
111- <module name="HideUtilityClassConstructor" />
112- <module name="InnerTypeLast" />
113- <module name="InterfaceIsType" />
114- <module name="MutableException" />
115- <module name="OneTopLevelClass" />
116- <module name="ThrowsCount">
117- <property name="max" value="4" />
118- </module>
119- <module name="VisibilityModifier" />
120-
121-
122- <!-- Coding -->
123-
124- <module name="ArrayTrailingComma" />
125- <module name="AvoidInlineConditionals" />
126- <module name="CovariantEquals" />
127- <module name="DeclarationOrder" />
128- <module name="DefaultComesLast" />
129- <module name="EmptyStatement" />
130- <module name="EqualsAvoidNull" />
131- <module name="EqualsHashCode" />
132- <module name="ExplicitInitialization" />
133- <module name="FallThrough" />
134- <module name="FinalLocalVariable" />
135- <module name="HiddenField">
136- <property name="ignoreConstructorParameter" value="true" />
137- <property name="ignoreSetter" value="true" />
138- <property name="ignoreAbstractMethods" value="true" />
139- </module>
140- <module name="IllegalCatch" />
141- <module name="IllegalInstantiation" />
142- <module name="IllegalThrows" />
143- <module name="IllegalToken">
144- <property name="tokens" value="LITERAL_NATIVE" />
145- </module>
146- <module name="IllegalTokenText">
147- <property name="tokens" value="NUM_INT, NUM_LONG" />
148- <property name="format" value="^0_*[0-7]" />
149- <property name="message" value="inhibit octal number" />
150- </module>
151- <module name="IllegalType" />
152- <module name="InnerAssignment" />
153- <module name="MagicNumber" />
154- <module name="MissingCtor" />
155- <module name="MissingSwitchDefault" />
156- <module name="ModifiedControlVariable" />
157- <module name="MultipleStringLiterals" />
158- <module name="MultipleVariableDeclarations" />
159- <module name="SimplifyBooleanExpression" />
160- <module name="SimplifyBooleanReturn" />
161- <module name="StringLiteralEquality" />
162- <module name="NestedForDepth" />
163- <module name="NestedIfDepth" />
164- <module name="NestedTryDepth" />
165- <module name="NoClone" />
166- <module name="NoFinalizer" />
167- <module name="OneStatementPerLine" />
168- <module name="OverloadMethodsDeclarationOrder" />
169- <module name="PackageDeclaration" />
170- <module name="ParameterAssignment" />
171- <module name="RequireThis">
172- <property name="checkMethods" value="false" />
173- </module>
174- <module name="ReturnCount">
175- <property name="max" value="5" />
176- </module>
177- <module name="SimplifyBooleanExpression" />
178- <module name="SimplifyBooleanReturn" />
179- <module name="StringLiteralEquality" />
180- <module name="SuperClone" />
181- <module name="SuperFinalize" />
182- <module name="UnnecessaryParentheses" />
183- <module name="VariableDeclarationUsageDistance">
184- <property name="allowedDistance" value="5" />
185- </module>
186-
187-
188- <!-- Imports -->
189-
190- <module name="AvoidStarImport" />
191- <module name="AvoidStaticImport" />
192- <module name="CustomImportOrder" />
193- <module name="IllegalImport" />
194- <module name="ImportControl" />
195- <module name="ImportOrder" />
196- <module name="RedundantImport" />
197- <module name="UnusedImports" />
198-
199-
200- <!-- Javadoc Comments -->
201-
202- <module name="AtclauseOrder" />
203- <module name="JavadocMethod" />
204- <module name="JavadocParagraph" />
205- <module name="JavadocStyle">
206- <property
207- name="endOfSentenceFormat"
208- value="([。.?!][ \t\n\r\f&lt;])|([。.?!]$)" />
209- <property name="checkEmptyJavadoc" value="true" />
210- <property name="checkHtml" value="true" />
211- </module>
212- <module name="JavadocTagContinuationIndentation" />
213- <module name="JavadocType" />
214- <module name="JavadocVariable">
215- <property name="scope" value="protected" />
216- </module>
217- <module name="NonEmptyAtclauseDescription" />
218- <module name="SingleLineJavadoc" />
219- <module name="SummaryJavadocCheck" />
220- <module name="WriteTag" />
221-
222-
223- <!-- Metrics -->
224-
225- <module name="BooleanExpressionComplexity" />
226- <module name="ClassDataAbstractionCoupling" />
227- <module name="ClassFanOutComplexity" />
228- <module name="CyclomaticComplexity" />
229- <module name="JavaNCSS" />
230- <module name="NPathComplexity" />
231-
232-
233- <!-- Miscellaneous -->
234-
235- <module name="ArrayTypeStyle" />
236- <module name="AvoidEscapedUnicodeCharacters">
237- <property name="allowEscapesForControlCharacters" value="true"/>
238- <property name="allowByTailComment" value="true"/>
239- <property name="allowIfAllCharactersEscaped" value="true"/>
240- <property name="allowNonPrintableEscapes" value="true"/>
241- </module>
242-<!-- <module name="CommentsIndentation" /> 6.10 or later -->
243- <module name="DescendantToken" />
244- <module name="FileContentsHolder" />
245- <module name="FinalParameters" />
246- <module name="Indentation">
247- <property name="caseIndent" value="0" />
248- </module>
249- <module name="OuterTypeFilename" />
250- <module name="TodoComment">
251- <property name="format" value="TODO" />
252- </module>
253- <module name="TrailingComment" />
254- <module name="UncommentedMain" />
255- <module name="UpperEll" />
256-
257-
258- <!-- Modifiers -->
259-
260- <module name="ModifierOrder" />
261- <module name="RedundantModifier" />
262-
263-
264- <!-- Naming Conventions -->
265-
266- <module name="AbbreviationAsWordInName" />
267- <module name="AbstractClassName">
268- <property
269- name="format"
270- value="^Abstract.*$|^.*Factory$|^.*Builder$|^.*Adapter$"
271- />
272- </module>
273-<!-- <module name="CatchParameterName" /> 6.14 or later -->
274- <module name="ClassTypeParameterName" />
275- <module name="ConstantName" />
276- <module name="InterfaceTypeParameterName" />
277- <module name="LocalFinalVariableName">
278- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
279- </module>
280- <module name="LocalVariableName">
281- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
282- </module>
283- <module name="MemberName">
284- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
285- </module>
286- <module name="MethodName" />
287- <module name="MethodTypeParameterName" />
288- <module name="PackageName" />
289- <module name="ParameterName">
290- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
291- </module>
292- <module name="StaticVariableName">
293- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
294- </module>
295- <module name="TypeName" />
296-
297-
298- <!-- Regex -->
299-
300- <module name="Regexp">
301- <property name="format" value="@author" />
302- <property name="illegalPattern" value="true" />
303- </module>
304- <module name="Regexp">
305- <property name="format" value="^ \* Copyright\(c\)" />
306- </module>
307- <module name="Regexp">
308- <property name="format" value="^ \* License : The MIT License" />
309- <property name="duplicateLimit" value="1" />
310- </module>
311- <module name="RegexpSinglelineJava">
312- <property name="format" value="\u0000" />
313- </module>
314-
315-
316- <!-- Size Violations -->
317-
318- <module name="AnonInnerLength" />
319- <module name="ExecutableStatementCount" />
320- <module name="LineLength">
321- <property name="max" value="78" />
322- </module>
323- <module name="MethodCount" />
324- <module name="MethodLength" />
325- <module name="OuterTypeNumber" />
326- <module name="ParameterNumber" />
327-
328-
329- <!-- Whitespace -->
330-
331- <module name="EmptyForInitializerPad" />
332- <module name="EmptyForIteratorPad" />
333- <module name="EmptyLineSeparator">
334- <property
335- name="tokens"
336- value="PACKAGE_DEF,
337- IMPORT,
338- CLASS_DEF,
339- INTERFACE_DEF,
340- ENUM_DEF,
341- STATIC_INIT,
342- INSTANCE_INIT,
343- METHOD_DEF,
344- CTOR_DEF,
345- "
346- />
347- </module>
348- <module name="GenericWhitespace" />
349- <module name="MethodParamPad">
350- <property
351- name="tokens"
352- value="CTOR_DEF, LITERAL_NEW, METHOD_DEF, SUPER_CTOR_CALL"
353- />
354- </module>
355- <module name="NoLineWrap" />
356- <module name="NoWhitespaceAfter">
357- <property name="allowLineBreaks" value="false" />
358- <property name="tokens" value="INC, DEC, DOT" />
359- </module>
360- <module name="NoWhitespaceBefore">
361- <property name="allowLineBreaks" value="false" />
362- <property name="tokens" value="COMMA, POST_INC, POST_DEC" />
363- </module>
364- <module name="NoWhitespaceBefore">
365- <property name="allowLineBreaks" value="true" />
366- <property name="tokens" value="SEMI" />
367- </module>
368- <module name="OperatorWrap">
369- <property name="option" value="eol" />
370- <property
371- name="tokens"
372- value="ASSIGN,
373- BAND_ASSIGN, BOR_ASSIGN, BXOR_ASSIGN,
374- PLUS_ASSIGN, MINUS_ASSIGN,
375- STAR_ASSIGN, DIV_ASSIGN, MOD_ASSIGN,
376- SL_ASSIGN, SR_ASSIGN, BSR_ASSIGN"
377- />
378- </module>
379- <module name="OperatorWrap">
380- <property name="option" value="nl" />
381- <property
382- name="tokens"
383- value="QUESTION,
384- BAND, BOR, BXOR,
385- PLUS, MINUS, STAR, DIV, MOD,
386- LAND, LOR,
387- EQUAL, NOT_EQUAL"
388- />
389- </module>
390- <module name="ParenPad">
391- <property name="option" value="nospace" />
392- <property
393- name="tokens"
394- value="CTOR_CALL, METHOD_CALL, SUPER_CTOR_CALL"
395- />
396- </module>
397- <module name="SeparatorWrap">
398- <property name="tokens" value="DOT" />
399- <property name="option" value="nl" />
400- </module>
401- <module name="TypecastParenPad" />
402- <module name="WhitespaceAfter" />
403- <module name="WhitespaceAround">
404- <property
405- name="tokens"
406- value="ASSIGN,
407- LAND, LOR,
408- BAND, BOR, BXOR, BSR,
409- BAND_ASSIGN, BOR_ASSIGN, BXOR_ASSIGN, BSR_ASSIGN,
410- SL, SR,
411- SL_ASSIGN, SR_ASSIGN,
412- MINUS, STAR, DIV, MOD,
413- PLUS_ASSIGN, MINUS_ASSIGN,
414- STAR_ASSIGN, DIV_ASSIGN, MOD_ASSIGN,
415- EQUAL, NOT_EQUAL, GT, GE, LT, LE,
416- "
417- />
418- </module>
419-
420-
421- </module>
422-
423-</module>
424-
425-<!-- EOF -->
diff -r 7025efee0a6b -r 819720636f5b src/main/config/pmdrules.xml
--- a/src/main/config/pmdrules.xml Mon Apr 10 22:03:41 2017 +0900
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
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 -->
diff -r 7025efee0a6b -r 819720636f5b src/main/config/suppressions.xml
--- a/src/main/config/suppressions.xml Mon Apr 10 22:03:41 2017 +0900
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
1-<?xml version="1.0" encoding="UTF-8" ?>
2-
3-<!DOCTYPE suppressions PUBLIC
4- "-//Puppy Crawl//DTD Suppressions 1.1//EN"
5- "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
6-
7-<!--
8- Checkstyle用警告抑止設定
9- ※ SuppressionFilter モジュール用
10-
11- [ http://checkstyle.sourceforge.net/ ]
12-
13- Copyright(c) 2010 olyutorskii
14--->
15-
16-
17-<suppressions>
18-
19- <!-- Class Design -->
20- <suppress files="" checks="DesignForExtension" />
21-
22- <!-- Coding -->
23- <suppress files="" checks="ExplicitInitialization" />
24- <suppress files="" checks="FinalLocalVariable" />
25- <suppress files="" checks="MagicNumber" />
26-
27- <!-- Imports -->
28- <suppress files="" checks="ImportControl" />
29-
30- <!-- Javadoc Comments -->
31- <suppress files="" checks="SummaryJavadocCheck" />
32- <!-- 句読点対応待ち -->
33- <suppress files="" checks="SingleLineJavadoc" />
34- <!-- ignoredTagsプロパティ対応待ち -->
35-
36- <!-- Miscellaneous -->
37- <suppress files="" checks="FinalParameters" />
38- <suppress files="" checks="TrailingComment" />
39-
40-</suppressions>
41-
42-
43-<!-- EOF -->
Show on old repository browser