• R/O
  • HTTP
  • SSH
  • HTTPS

Jovsonz: コミット

Jovsonz is a JSON library for Java


コミットメタ情報

リビジョン88829358dc86447e823fdbf58d796beb05e2388c (tree)
日時2019-05-03 17:26:17
作者Olyutorskii <olyutorskii@user...>
コミッターOlyutorskii

ログメッセージ

update checkstyle plugin.

変更サマリ

  • modified: README.txt (diff)
  • modified: pom.xml (diff)
  • delete: src/main/config/checks.xml => config/checkstyle/checkstyle.xml
  • delete: src/main/config/suppressions.xml => config/checkstyle/checkstyle-suppressions.xml

差分

--- a/README.txt
+++ b/README.txt
@@ -48,13 +48,13 @@ JovsonzはJindolfプロジェクトから派生したオープンソースプロ
4848 ./src/test/java/
4949 JUnit 4.* 用のユニットテストコード。
5050
51-./src/main/config/
51+./config/
5252 各種ビルド・構成管理に必要なファイル群。
5353
54-./src/main/config/checks.xml
54+./config/checkstyle/checkstyle.xml
5555 Checkstyle用configファイル。
5656
57-./src/main/config/pmdrules.xml
57+./config/pmd/pmdrules.xml
5858 PMD用ルール定義ファイル。
5959
6060
--- a/src/main/config/suppressions.xml
+++ b/config/checkstyle/checkstyle-suppressions.xml
@@ -1,14 +1,14 @@
11 <?xml version="1.0" encoding="UTF-8" ?>
22
33 <!DOCTYPE suppressions PUBLIC
4- "-//Puppy Crawl//DTD Suppressions 1.1//EN"
5- "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
4+ "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
5+ "https://checkstyle.org/dtds/suppressions_1_2.dtd">
66
77 <!--
8- Checkstyle用警告抑止設定
9- ※ SuppressionFilter モジュール用
8+ Checkstyle suppressions
9+ for Checkstyle 8.18 or later
1010
11- [ http://checkstyle.sourceforge.net/ ]
11+ [ https://checkstyle.org/ ]
1212
1313 Copyright(c) 2010 olyutorskii
1414 -->
@@ -16,6 +16,9 @@
1616
1717 <suppressions>
1818
19+ <!-- Annotations -->
20+ <suppress files="" checks="AnnotationOnSameLine" />
21+
1922 <!-- Class Design -->
2023 <suppress files="" checks="DesignForExtension" />
2124
@@ -23,20 +26,25 @@
2326 <suppress files="" checks="ExplicitInitialization" />
2427 <suppress files="" checks="FinalLocalVariable" />
2528 <suppress files="" checks="MagicNumber" />
29+ <suppress files="" checks="OneStatementPerLine" />
2630
2731 <!-- Imports -->
2832 <suppress files="" checks="ImportControl" />
2933
3034 <!-- Javadoc Comments -->
35+ <suppress files="" checks="JavadocTagContinuationIndentation" />
3136 <suppress files="" checks="SummaryJavadocCheck" />
32- <!-- 句読点対応待ち -->
33- <suppress files="" checks="SingleLineJavadoc" />
34- <!-- ignoredTagsプロパティ対応待ち -->
3537
3638 <!-- Miscellaneous -->
3739 <suppress files="" checks="FinalParameters" />
3840 <suppress files="" checks="TrailingComment" />
3941
42+ <!-- Modifiers -->
43+ <suppress files="" checks="InterfaceMemberImpliedModifier" />
44+
45+ <!-- Whitespace -->
46+ <suppress files="" checks="SingleSpaceSeparator" />
47+
4048 </suppressions>
4149
4250
--- a/src/main/config/checks.xml
+++ b/config/checkstyle/checkstyle.xml
@@ -1,15 +1,14 @@
11 <?xml version="1.0" encoding="UTF-8" ?>
22
33 <!DOCTYPE module PUBLIC
4- "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
5- "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
4+ "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
5+ "https://checkstyle.org/dtds/configuration_1_3.dtd">
66
77 <!--
8- Checkstyle用チェック項目定義。
8+ Checkstyle modules
9+ for Checkstyle 8.18 or later
910
10- Checkstyle 6.1 以降向けに記述。
11-
12- [ http://checkstyle.sourceforge.net/ ]
11+ [ https://checkstyle.org/ ]
1312
1413 Copyright(c) 2010 olyutorskii
1514 -->
@@ -19,21 +18,24 @@
1918
2019 <property name="charset" value="UTF-8" />
2120 <property name="localeCountry" value="JP" />
22- <property name="localeLanguage" value="ja" />
21+ <property name="localeLanguage" value="en" />
22+ <!--property name="localeLanguage" value="ja" /-->
23+ <property name="fileExtensions" value="java, xml, properties" />
2324 <property name="severity" value="error" />
2425
2526
2627 <!-- Filters -->
2728 <module name="SeverityMatchFilter" />
28- <module name="SuppressionCommentFilter" />
29- <module name="SuppressionFilter">
30- <property name="file" value="src/main/config/suppressions.xml" />
31- </module>
29+ <!--module name="SuppressionFilter" /-->
3230 <module name="SuppressWarningsFilter" />
33- <module name="SuppressWithNearbyCommentFilter" />
31+ <module name="SuppressWithPlainTextCommentFilter" />
3432
3533
3634 <!-- Headers -->
35+ <module name="Header">
36+ <property name="header" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;" />
37+ <property name="fileExtensions" value="xml" />
38+ </module>
3739 <module name="RegexpHeader">
3840 <property name="header" value="^/\*$\n^ \*( .*)?$\n^ \*/$\n" />
3941 <property name="multiLines" value="2" />
@@ -57,7 +59,7 @@
5759 <module name="RegexpMultiline">
5860 <property name="format" value="[\u000b\f\u001a]" />
5961 </module>
60-<!--<module name="RegexpOnFilename" /> 6.15 or later -->
62+ <module name="RegexpOnFilename" />
6163 <module name="RegexpSingleline">
6264 <property name="format" value="\s+$" />
6365 </module>
@@ -77,14 +79,31 @@
7779 <module name="FileTabCharacter" />
7880
7981
82+ <module name="BeforeExecutionExclusionFileFilter">
83+ <property name="fileNamePattern" value="module\-info\.java$" />
84+ </module>
85+
86+
8087 <module name="TreeWalker">
8188
82- <property name="tabWidth" value="8"/>
89+ <property name="tabWidth" value="8" />
90+ <property name="fileExtensions" value="java" />
91+
92+ <module name="SuppressWarningsHolder" />
93+
94+
95+ <!-- Filters -->
96+
97+ <module name="SuppressionCommentFilter" />
98+ <module name="SuppressWithNearbyCommentFilter" />
99+ <!--module name="SuppressionXpathFilter" /-->
100+ <!--module name="SuppressionXpathSingleFilter" /-->
83101
84102
85103 <!-- Annotations -->
86104
87105 <module name="AnnotationLocation" />
106+ <module name="AnnotationOnSameLine" />
88107 <module name="AnnotationUseStyle" />
89108 <module name="MissingDeprecated" />
90109 <module name="MissingOverride" />
@@ -94,12 +113,13 @@
94113
95114
96115 <!-- Block Checks -->
116+
97117 <module name="AvoidNestedBlocks" />
98118 <module name="EmptyBlock" />
99-<!-- <module name="EmptyCatchBlock" /> 6.4 or later -->
119+ <module name="EmptyCatchBlock" />
100120 <module name="LeftCurly" />
101121 <module name="NeedBraces">
102- <property name="tokens" value="LITERAL_DO" />
122+ <property name="allowSingleLineStatement" value="true" />
103123 </module>
104124 <module name="RightCurly" />
105125
@@ -135,6 +155,7 @@
135155 <module name="HiddenField">
136156 <property name="ignoreConstructorParameter" value="true" />
137157 <property name="ignoreSetter" value="true" />
158+ <property name="setterCanReturnItsClass" value="true" />
138159 <property name="ignoreAbstractMethods" value="true" />
139160 </module>
140161 <module name="IllegalCatch" />
@@ -156,9 +177,6 @@
156177 <module name="ModifiedControlVariable" />
157178 <module name="MultipleStringLiterals" />
158179 <module name="MultipleVariableDeclarations" />
159- <module name="SimplifyBooleanExpression" />
160- <module name="SimplifyBooleanReturn" />
161- <module name="StringLiteralEquality" />
162180 <module name="NestedForDepth" />
163181 <module name="NestedIfDepth" />
164182 <module name="NestedTryDepth" />
@@ -191,7 +209,7 @@
191209 <module name="AvoidStaticImport" />
192210 <module name="CustomImportOrder" />
193211 <module name="IllegalImport" />
194- <module name="ImportControl" />
212+ <!--module name="ImportControl" /-->
195213 <module name="ImportOrder" />
196214 <module name="RedundantImport" />
197215 <module name="UnusedImports" />
@@ -234,14 +252,13 @@
234252
235253 <module name="ArrayTypeStyle" />
236254 <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"/>
255+ <property name="allowEscapesForControlCharacters" value="true" />
256+ <property name="allowByTailComment" value="true" />
257+ <property name="allowIfAllCharactersEscaped" value="true" />
258+ <property name="allowNonPrintableEscapes" value="true" />
241259 </module>
242-<!-- <module name="CommentsIndentation" /> 6.10 or later -->
260+ <module name="CommentsIndentation" />
243261 <module name="DescendantToken" />
244- <module name="FileContentsHolder" />
245262 <module name="FinalParameters" />
246263 <module name="Indentation">
247264 <property name="caseIndent" value="0" />
@@ -257,6 +274,8 @@
257274
258275 <!-- Modifiers -->
259276
277+ <module name="ClassMemberImpliedModifier" />
278+ <module name="InterfaceMemberImpliedModifier" />
260279 <module name="ModifierOrder" />
261280 <module name="RedundantModifier" />
262281
@@ -270,10 +289,11 @@
270289 value="^Abstract.*$|^.*Factory$|^.*Builder$|^.*Adapter$"
271290 />
272291 </module>
273-<!-- <module name="CatchParameterName" /> 6.14 or later -->
292+ <module name="CatchParameterName" />
274293 <module name="ClassTypeParameterName" />
275294 <module name="ConstantName" />
276295 <module name="InterfaceTypeParameterName" />
296+ <module name="LambdaParameterName" />
277297 <module name="LocalFinalVariableName">
278298 <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
279299 </module>
@@ -398,8 +418,11 @@
398418 <property name="tokens" value="DOT" />
399419 <property name="option" value="nl" />
400420 </module>
421+ <module name="SingleSpaceSeparator" />
401422 <module name="TypecastParenPad" />
402- <module name="WhitespaceAfter" />
423+ <module name="WhitespaceAfter" >
424+ <property name="tokens" value="COMMA, SEMI," />
425+ </module>
403426 <module name="WhitespaceAround">
404427 <property
405428 name="tokens"
@@ -420,6 +443,7 @@
420443
421444 </module>
422445
446+
423447 </module>
424448
425449 <!-- EOF -->
--- a/pom.xml
+++ b/pom.xml
@@ -99,7 +99,10 @@
9999 <surefire-plugin.version>3.0.0-M3</surefire-plugin.version>
100100 <jacoco-plugin.version>0.8.3</jacoco-plugin.version>
101101
102- <checkstyle.config.location>${project.mainconf}/checks.xml</checkstyle.config.location>
102+ <checkstyle-plugin.version>3.0.0</checkstyle-plugin.version>
103+ <checkstyleruntime.version>8.18</checkstyleruntime.version>
104+ <checkstyle.config.location>${project.basedir}/config/checkstyle/checkstyle.xml</checkstyle.config.location>
105+ <checkstyle.suppressions.location>${project.basedir}/config/checkstyle/checkstyle-suppressions.xml</checkstyle.suppressions.location>
103106 <checkstyle.enable.rss>false</checkstyle.enable.rss>
104107
105108 <pmd-plugin.version>3.12.0</pmd-plugin.version>
@@ -131,7 +134,26 @@
131134
132135 <build>
133136
134- <pluginManagement/>
137+ <pluginManagement>
138+
139+ <plugins>
140+
141+ <plugin>
142+ <groupId>org.apache.maven.plugins</groupId>
143+ <artifactId>maven-checkstyle-plugin</artifactId>
144+ <version>${checkstyle-plugin.version}</version>
145+ <dependencies>
146+ <dependency>
147+ <groupId>com.puppycrawl.tools</groupId>
148+ <artifactId>checkstyle</artifactId>
149+ <version>${checkstyleruntime.version}</version>
150+ </dependency>
151+ </dependencies>
152+ </plugin>
153+
154+ </plugins>
155+
156+ </pluginManagement>
135157
136158 <plugins>
137159
@@ -342,8 +364,7 @@
342364 <plugin>
343365 <groupId>org.apache.maven.plugins</groupId>
344366 <artifactId>maven-checkstyle-plugin</artifactId>
345- <version>2.15</version>
346- <!-- config from property value -->
367+ <version>${checkstyle-plugin.version}</version>
347368 </plugin>
348369
349370 <plugin>
@@ -502,11 +523,7 @@
502523 <plugin>
503524 <groupId>org.apache.maven.plugins</groupId>
504525 <artifactId>maven-checkstyle-plugin</artifactId>
505- <version>2.15</version>
506- <configuration>
507- <skip>false</skip>
508- <!-- config from property value -->
509- </configuration>
526+ <version>${checkstyle-plugin.version}</version>
510527 <reportSets>
511528 <reportSet>
512529 <reports>
旧リポジトリブラウザで表示