"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
- Checkstyle用チェック項目定義。
-
- Checkstyle 6.1 以降向けに記述。
+ Checkstyle modules
+ for Checkstyle 6.19(7.4) or later
[ http://checkstyle.sourceforge.net/ ]
<property name="charset" value="UTF-8" />
<property name="localeCountry" value="JP" />
- <property name="localeLanguage" value="ja" />
+ <property name="localeLanguage" value="en" />
+ <!--property name="localeLanguage" value="ja" /-->
+ <property name="fileExtensions" value="java, xml, properties" />
<property name="severity" value="error" />
<!-- Filters -->
<module name="SeverityMatchFilter" />
<module name="SuppressionCommentFilter" />
- <module name="SuppressionFilter">
- <property name="file" value="src/main/config/suppressions.xml" />
- </module>
+ <module name="SuppressionFilter" />
<module name="SuppressWarningsFilter" />
<module name="SuppressWithNearbyCommentFilter" />
<!-- Headers -->
+ <module name="Header">
+ <property name="header" value="<?xml version="1.0" encoding="UTF-8" ?>" />
+ <property name="fileExtensions" value="xml" />
+ </module>
<module name="RegexpHeader">
<property name="header" value="^/\*$\n^ \*( .*)?$\n^ \*/$\n" />
<property name="multiLines" value="2" />
<module name="RegexpMultiline">
<property name="format" value="[\u000b\f\u001a]" />
</module>
-<!--<module name="RegexpOnFilename" /> 6.15 or later -->
+ <module name="RegexpOnFilename" />
<module name="RegexpSingleline">
<property name="format" value="\s+$" />
</module>
<!-- Size Violations -->
- <module name="FileLength">
- <property name="max" value="2000"/>
- </module>
+ <module name="FileLength" />
<!-- Whitespace -->
<module name="TreeWalker">
<property name="tabWidth" value="8"/>
+ <property name="fileExtensions" value="java"/>
<!-- Annotations -->
<!-- Block Checks -->
+
<module name="AvoidNestedBlocks" />
<module name="EmptyBlock" />
-<!-- <module name="EmptyCatchBlock" /> 6.4 or later -->
+ <module name="EmptyCatchBlock" />
<module name="LeftCurly" />
<module name="NeedBraces">
- <property name="tokens" value="LITERAL_DO" />
+ <property name="allowSingleLineStatement" value="true" />
</module>
<module name="RightCurly" />
<module name="InterfaceIsType" />
<module name="MutableException" />
<module name="OneTopLevelClass" />
- <module name="ThrowsCount">
- <property name="max" value="4" />
- </module>
+ <module name="ThrowsCount" />
<module name="VisibilityModifier" />
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true" />
<property name="ignoreSetter" value="true" />
+ <property name="setterCanReturnItsClass" value="true" />
<property name="ignoreAbstractMethods" value="true" />
</module>
<module name="IllegalCatch" />
<module name="IllegalToken">
<property name="tokens" value="LITERAL_NATIVE" />
</module>
- <module name="IllegalTokenText">
- <property name="tokens" value="NUM_INT, NUM_LONG" />
- <property name="format" value="^0_*[0-7]" />
- <property name="message" value="inhibit octal number" />
- </module>
+ <module name="IllegalTokenText" />
<module name="IllegalType" />
<module name="InnerAssignment" />
<module name="MagicNumber" />
<module name="ModifiedControlVariable" />
<module name="MultipleStringLiterals" />
<module name="MultipleVariableDeclarations" />
- <module name="SimplifyBooleanExpression" />
- <module name="SimplifyBooleanReturn" />
- <module name="StringLiteralEquality" />
<module name="NestedForDepth" />
<module name="NestedIfDepth" />
<module name="NestedTryDepth" />
<module name="PackageDeclaration" />
<module name="ParameterAssignment" />
<module name="RequireThis">
- <property name="checkMethods" value="false" />
- </module>
- <module name="ReturnCount">
- <property name="max" value="5" />
+ <!--property name="checkMethods" value="false" /-->
</module>
+ <module name="ReturnCount" />
<module name="SimplifyBooleanExpression" />
<module name="SimplifyBooleanReturn" />
<module name="StringLiteralEquality" />
<module name="SuperClone" />
<module name="SuperFinalize" />
<module name="UnnecessaryParentheses" />
- <module name="VariableDeclarationUsageDistance">
- <property name="allowedDistance" value="5" />
- </module>
+ <module name="VariableDeclarationUsageDistance" />
<!-- Imports -->
<property name="allowIfAllCharactersEscaped" value="true"/>
<property name="allowNonPrintableEscapes" value="true"/>
</module>
-<!-- <module name="CommentsIndentation" /> 6.10 or later -->
+ <module name="CommentsIndentation" />
<module name="DescendantToken" />
<module name="FileContentsHolder" />
<module name="FinalParameters" />
<!-- Naming Conventions -->
<module name="AbbreviationAsWordInName" />
- <module name="AbstractClassName">
- <property
- name="format"
- value="^Abstract.*$|^.*Factory$|^.*Builder$|^.*Adapter$"
- />
- </module>
-<!-- <module name="CatchParameterName" /> 6.14 or later -->
+ <module name="AbstractClassName" />
+ <module name="CatchParameterName" />
<module name="ClassTypeParameterName" />
<module name="ConstantName" />
<module name="InterfaceTypeParameterName" />
- <module name="LocalFinalVariableName">
- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
- </module>
- <module name="LocalVariableName">
- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
- </module>
- <module name="MemberName">
- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
- </module>
+ <module name="LocalFinalVariableName" />
+ <module name="LocalVariableName" />
+ <module name="MemberName" />
<module name="MethodName" />
<module name="MethodTypeParameterName" />
<module name="PackageName" />
- <module name="ParameterName">
- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
- </module>
- <module name="StaticVariableName">
- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
- </module>
+ <module name="ParameterName" />
+ <module name="StaticVariableName" />
<module name="TypeName" />
/>
</module>
<module name="GenericWhitespace" />
- <module name="MethodParamPad">
- <property
- name="tokens"
- value="CTOR_DEF, LITERAL_NEW, METHOD_DEF, SUPER_CTOR_CALL"
- />
- </module>
+ <module name="MethodParamPad" />
<module name="NoLineWrap" />
- <module name="NoWhitespaceAfter">
- <property name="allowLineBreaks" value="false" />
- <property name="tokens" value="INC, DEC, DOT" />
- </module>
- <module name="NoWhitespaceBefore">
- <property name="allowLineBreaks" value="false" />
- <property name="tokens" value="COMMA, POST_INC, POST_DEC" />
- </module>
- <module name="NoWhitespaceBefore">
- <property name="allowLineBreaks" value="true" />
- <property name="tokens" value="SEMI" />
- </module>
- <module name="OperatorWrap">
- <property name="option" value="eol" />
- <property
- name="tokens"
- value="ASSIGN,
- BAND_ASSIGN, BOR_ASSIGN, BXOR_ASSIGN,
- PLUS_ASSIGN, MINUS_ASSIGN,
- STAR_ASSIGN, DIV_ASSIGN, MOD_ASSIGN,
- SL_ASSIGN, SR_ASSIGN, BSR_ASSIGN"
- />
- </module>
- <module name="OperatorWrap">
- <property name="option" value="nl" />
- <property
- name="tokens"
- value="QUESTION,
- BAND, BOR, BXOR,
- PLUS, MINUS, STAR, DIV, MOD,
- LAND, LOR,
- EQUAL, NOT_EQUAL"
- />
- </module>
- <module name="ParenPad">
- <property name="option" value="nospace" />
- <property
- name="tokens"
- value="CTOR_CALL, METHOD_CALL, SUPER_CTOR_CALL"
- />
- </module>
- <module name="SeparatorWrap">
- <property name="tokens" value="DOT" />
- <property name="option" value="nl" />
- </module>
+ <module name="NoWhitespaceAfter" />
+ <module name="NoWhitespaceBefore" />
+ <module name="OperatorWrap" />
+ <module name="ParenPad" />
+ <module name="SeparatorWrap" />
+ <module name="SingleSpaceSeparator" />
<module name="TypecastParenPad" />
- <module name="WhitespaceAfter" />
+ <module name="WhitespaceAfter" >
+ <property name="tokens" value="COMMA, SEMI,"/>
+ </module>
<module name="WhitespaceAround">
<property
name="tokens"
</module>
+
</module>
<!-- EOF -->
<?xml version="1.0" encoding="UTF-8" ?>
<!--
- PMD用ルールセット定義
-
- PMD [ https://pmd.github.io/ ] 5.3 以降用に記述されています。
+ Custom rule set
+ for PMD [ https://pmd.github.io/ ] 5.5.2 or later
Copyright(c) 2016 olyutorskii
-->
>
<description>
- custom rulesets for project
+ custom rulesets
</description>
-<!--
<rule ref="rulesets/java/android.xml" />
--->
<rule ref="rulesets/java/basic.xml" />
<rule ref="rulesets/java/clone.xml" />
- <rule ref="rulesets/java/codesize.xml">
- <exclude name="TooManyMethods" />
- </rule>
- <rule ref="rulesets/java/codesize.xml/TooManyMethods">
- <properties>
- <property name="maxmethods" value="25"/>
- </properties>
- </rule>
+ <rule ref="rulesets/java/codesize.xml" />
- <rule ref="rulesets/java/comments.xml">
- <exclude name="CommentRequired" />
- <exclude name="CommentSize" />
- </rule>
+ <rule ref="rulesets/java/comments.xml" />
<rule ref="rulesets/java/comments.xml/CommentRequired" >
<properties>
<property name="fieldCommentRequirement" value="Ignored"/>
</rule>
<rule ref="rulesets/java/controversial.xml">
- <exclude name="NullAssignment" />
<exclude name="OnlyOneReturn" />
- <exclude name="DefaultPackage" />
<exclude name="DataflowAnomalyAnalysis" />
- <exclude name="AvoidUsingShortType" />
<exclude name="AvoidLiteralsInIfCondition" />
- <exclude name="UseConcurrentHashMap" />
</rule>
<rule ref="rulesets/java/coupling.xml">
</rule>
<rule ref="rulesets/java/design.xml">
- <exclude name="SimplifyBooleanReturns" />
- <exclude name="ConfusingTernary" />
<exclude name="UnnecessaryLocalBeforeReturn" />
- <exclude name="FieldDeclarationsShouldBeAtStartOfClass" />
</rule>
<rule ref="rulesets/java/empty.xml" />
<rule ref="rulesets/java/imports.xml" />
-<!--
<rule ref="rulesets/java/j2ee.xml" />
- <rule ref="rulesets/java/javabeans.xml" />
--->
-
- <rule ref="rulesets/java/junit.xml" />
-<!--
<rule ref="rulesets/java/logging-jakarta-commons.xml" />
--->
+
+ <rule ref="rulesets/java/javabeans.xml">
+ <exclude name="BeanMembersShouldSerialize" />
+ </rule>
<rule ref="rulesets/java/logging-java.xml" />
+ <rule ref="rulesets/java/junit.xml" />
+
<rule ref="rulesets/java/migrating.xml" />
-<!--
- <rule ref="rulesets/java/migrating_to_XX.xml" />
--->
<rule ref="rulesets/java/naming.xml">
<exclude name="ShortVariable" />
- <exclude name="LongVariable" />
- <exclude name="AvoidFieldNameMatchingMethodName" />
- </rule>
- <rule ref="rulesets/java/naming.xml/LongVariable">
- <properties>
- <property name="minimum" value="25"/>
- </properties>
</rule>
<rule ref="rulesets/java/optimizations.xml">
<exclude name="RedundantFieldInitializer" />
</rule>
- <rule ref="rulesets/java/strictexception.xml">
- <exclude name="AvoidThrowingNullPointerException" />
- </rule>
+ <rule ref="rulesets/java/strictexception.xml" />
<rule ref="rulesets/java/strings.xml" />
<rule ref="rulesets/java/unnecessary.xml">
<exclude name="UnnecessaryReturn" />
- <exclude name="UselessParentheses" />
</rule>
<rule ref="rulesets/java/unusedcode.xml" />