OSDN Git Service

Update checkstyle-rules.
authorOlyutorskii <olyutorskii@users.osdn.me>
Tue, 2 Jul 2019 12:19:21 +0000 (21:19 +0900)
committerOlyutorskii <olyutorskii@users.osdn.me>
Tue, 2 Jul 2019 12:19:21 +0000 (21:19 +0900)
config/checkstyle/checkstyle-suppressions.xml
config/checkstyle/checkstyle.xml
pom.xml

index 9b0570a..3860edf 100644 (file)
@@ -6,7 +6,7 @@
 
 <!--
     Checkstyle suppressions
-    for Checkstyle 8.20 or later
+    for Checkstyle 8.22 or later
 
     [ https://checkstyle.org/ ]
 
     <suppress files="" checks="ImportControl" />
 
     <!-- Javadoc Comments -->
-    <suppress files="" checks="JavadocParagraph" />
-    <suppress files="" checks="JavadocTagContinuationIndentation" />
     <suppress files="" checks="SummaryJavadocCheck" />
 
     <!-- Miscellaneous -->
     <suppress files="" checks="FinalParameters" />
+    <suppress files="" checks="OrderedProperties" />
     <suppress files="" checks="TrailingComment" />
 
     <!-- Modifier -->
-    <suppress files="" checks="InterfaceMemberImpliedModifier" />
+    <suppress files="" checks="RedundantModifier" />
 
     <!-- Whitespace -->
+    <suppress files="" checks="ParenPad" />
     <suppress files="" checks="SingleSpaceSeparator" />
 
 </suppressions>
index 7d19930..0b1ceb5 100644 (file)
@@ -6,7 +6,7 @@
 
 <!--
     Checkstyle modules
-    for Checkstyle 8.21 or later
+    for Checkstyle 8.22 or later
 
     [ https://checkstyle.org/ ]
 
@@ -39,6 +39,7 @@
         <property name="fileExtensions" value="xml" />
     </module>
     <module name="RegexpHeader">
+        <!-- /* ... */ -->
         <property name="header" value="^/\*$\n^ \*( .*)?$\n^ \*/$\n" />
         <property name="multiLines" value="2" />
         <property name="fileExtensions" value="java" />
@@ -55,6 +56,7 @@
     <module name="NewlineAtEndOfFile">
         <property name="fileExtensions" value="java, properties, xml, xsd, md, txt" />
     </module>
+    <module name="OrderedProperties" />
     <module name="Translation" />
     <module name="UniqueProperties" />
 
         <module name="RequireThis">
             <property name="checkMethods" value="false" />
         </module>
-        <module name="ReturnCount" />
+        <module name="ReturnCount">
+            <property name="max" value="5" />
+            <property name="maxForVoid" value="5" />
+        </module>
         <module name="SimplifyBooleanExpression" />
         <module name="SimplifyBooleanReturn" />
         <module name="StringLiteralEquality" />
         <module name="SuperClone" />
         <module name="SuperFinalize" />
         <module name="UnnecessaryParentheses" />
+        <module name="UnnecessarySemicolonInEnumeration" />
+        <module name="UnnecessarySemicolonInTryWithResources" />
         <module name="VariableDeclarationUsageDistance">
             <property name="allowedDistance" value="5"/>
         </module>
             <property name="scope" value="protected" />
         </module>
         <module name="MissingJavadocMethod" />
+        <module name="MissingJavadocPackage" />
         <module name="MissingJavadocType" />
         <module name="NonEmptyAtclauseDescription" />
         <module name="SingleLineJavadoc" />
         <module name="GenericWhitespace" />
         <module name="MethodParamPad" />
         <module name="NoLineWrap" />
-        <module name="NoWhitespaceAfter" />
-        <module name="NoWhitespaceBefore" />
-        <module name="OperatorWrap" />
-        <module name="ParenPad">
-            <property name="option" value="nospace" />
+        <module name="NoWhitespaceAfter">
             <property
                 name="tokens"
-                value="CTOR_CALL, METHOD_CALL, SUPER_CTOR_CALL"
+                value="AT, INC, DEC, UNARY_MINUS, UNARY_PLUS, DOT"
             />
         </module>
+        <module name="NoWhitespaceBefore">
+            <property name="allowLineBreaks" value="true" />
+        </module>
+        <module name="OperatorWrap" />
+        <module name="ParenPad" />
         <module name="SeparatorWrap">
             <property name="tokens" value="DOT"/>
             <property name="option" value="nl"/>
     </module>
 
 
-    </module>
+</module>
 
 <!-- EOF -->
diff --git a/pom.xml b/pom.xml
index 082daf1..45d2c62 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
-        <locale>en</locale>
-        <site.locales>${locale}</site.locales>
-        <javadoc.locale>${locale}</javadoc.locale>
-        <spotbugs.jvmArgs>-Duser.language=${locale}</spotbugs.jvmArgs>
-
-        <!-- Walk around: JDK 11 javadoc + Maven -->
-        <detectJavaApiLink>false</detectJavaApiLink>
+        <!-- DO NOT USE ${locale} with site-plugin -->
+        <site.locales>en</site.locales>
+        <javadoc.locale>en</javadoc.locale>
+        <spotbugs.jvmArgs>-Duser.language=en</spotbugs.jvmArgs>
 
         <surefire-plugin.version>3.0.0-M3</surefire-plugin.version>
         <jacoco-plugin.version>0.8.4</jacoco-plugin.version>
 
         <checkstyle-plugin.version>3.1.0</checkstyle-plugin.version>
-        <checkstyleruntime.version>8.21</checkstyleruntime.version>
-        <checkstyle.config.location>${project.basedir}/config/checkstyle/checkstyle.xml</checkstyle.config.location>
-        <checkstyle.suppressions.location>${project.basedir}/config/checkstyle/checkstyle-suppressions.xml</checkstyle.suppressions.location>
+        <checkstyleruntime.version>8.22</checkstyleruntime.version>
+        <checkstyle.config.location>config/checkstyle/checkstyle.xml</checkstyle.config.location>
+        <checkstyle.suppressions.location>config/checkstyle/checkstyle-suppressions.xml</checkstyle.suppressions.location>
         <checkstyle.enable.rss>false</checkstyle.enable.rss>
 
         <pmd-plugin.version>3.12.0</pmd-plugin.version>
 
-        <spotbugs-plugin.version>3.1.11</spotbugs-plugin.version>
+        <spotbugs-plugin.version>3.1.12</spotbugs-plugin.version>
         <spotbugs.effort>Max</spotbugs.effort>
         <spotbugs.threshold>Low</spotbugs.threshold>
         <!-- for Jenkins -->
                     <execution>
                         <phase>package</phase>
                         <goals>
-                          <goal>shade</goal>
+                            <goal>shade</goal>
                         </goals>
                         <configuration>
                             <createDependencyReducedPom>false</createDependencyReducedPom>
                         <id>attach-sources</id>
                         <phase>verify</phase>
                         <goals>
-                          <goal>jar-no-fork</goal>
+                            <goal>jar-no-fork</goal>
                         </goals>
                     </execution>
                 </executions>
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <version>3.1.0</version>
                 <configuration>
+                    <locale>${javadoc.locale}</locale>
+                    <source>${maven.compiler.source}</source>
                     <author>false</author>
                     <notimestamp>true</notimestamp>
                     <quiet>true</quiet>
                     <show>protected</show>
                     <header>${project.name} ${project.version} API</header>
                     <version>true</version>
-                    <locale>${javadoc.locale}</locale>
                     <!-- for JDK11 javadoc -->
                     <additionalJOption>-J-Duser.language=${javadoc.locale}</additionalJOption>
                 </configuration>
                 <version>${pmd-plugin.version}</version>
                 <configuration>
                     <rulesets>
-                        <ruleset>${project.basedir}/config/pmd/pmdrules.xml</ruleset>
+                        <ruleset>config/pmd/pmdrules.xml</ruleset>
                     </rulesets>
                 </configuration>
                 <reportSets>