Skip to content

Commit 32bceb2

Browse files
committed
Update checkstyle to 8.31
1 parent eb5b284 commit 32bceb2

File tree

3 files changed

+9
-38
lines changed

3 files changed

+9
-38
lines changed

config/checkstyle/checkstyle.xml

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
1-
<?xml version="1.0" ?><!--
2-
~ Copyright 2016 Patrick Favre-Bulle
3-
~
4-
~ Licensed under the Apache License, Version 2.0 (the "License");
5-
~ you may not use this file except in compliance with the License.
6-
~ You may obtain a copy of the License at
7-
~
8-
~ http://www.apache.org/licenses/LICENSE-2.0
9-
~
10-
~ Unless required by applicable law or agreed to in writing, software
11-
~ distributed under the License is distributed on an "AS IS" BASIS,
12-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
~ See the License for the specific language governing permissions and
14-
~ limitations under the License.
15-
-->
16-
17-
<!DOCTYPE module PUBLIC
1+
<?xml version="1.0" ?><!DOCTYPE module PUBLIC
182
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
193
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
204

21-
<!--This it the config for the main source code with more strict rules than e.g. testing -->
22-
235
<module name="Checker">
246
<module name="NewlineAtEndOfFile" /> <!-- force newline, important for git merge and POSIX compatibility: http://checkstyle.sourceforge.net/config_misc.html#NewlineAtEndOfFile -->
257
<module name="FileTabCharacter" /> <!-- e.g. disallow tab character outside of strings -->
@@ -30,13 +12,15 @@
3012
<module name="FileLength"><!-- max line length for single file: http://checkstyle.sourceforge.net/config_sizes.html#FileLength -->
3113
<property name="max" value="1500" />
3214
</module>
15+
<module name="LineLength"><!-- max char length per line http://checkstyle.sourceforge.net/config_sizes.html#LineLength -->
16+
<property name="max" value="300" />
17+
</module>
3318

3419
<module name="TreeWalker">
3520
<module name="SuppressionCommentFilter" /> <!-- use //CHECKSTYLE:OFF (...) //CHECKSTYLE:ON to disable checkstyle: http://checkstyle.sourceforge.net/config_filters.html#SuppressionCommentFilter -->
3621

3722
<!-- Annotations -->
3823
<module name="MissingDeprecated"> <!-- if @deprecated and javadoc is there, must be explained in javadoc: http://checkstyle.sourceforge.net/config_annotation.html#MissingDeprecated -->
39-
<property name="skipNoJavadoc" value="true" />
4024
</module>
4125
<module name="MissingOverride" /> <!-- if has @inheritDoc in javadoc must have @Override http://checkstyle.sourceforge.net/config_annotation.html#MissingOverride -->
4226
<module name="PackageAnnotation" /> <!-- must only be in package-info: http://checkstyle.sourceforge.net/config_annotation.html#PackageAnnotation -->
@@ -49,7 +33,7 @@
4933

5034
<!-- Misc -->
5135
<module name="ArrayTypeStyle" /> <!-- e.g. int[] array is ok int array[] not: http://checkstyle.sourceforge.net/config_misc.html#ArrayTypeStyle -->
52-
<module name="MutableException" /> <!-- e.g. int[] array is ok int array[] not: http://checkstyle.sourceforge.net/config_misc.html#ArrayTypeStyle -->
36+
<module name="MutableException" /> <!-- exception classes must be immutable: http://checkstyle.sourceforge.net/config_design.html#MutableException -->
5337
<module name="UpperEll" /> <!-- long values must be postfixed with 'L' not 'l': http://checkstyle.sourceforge.net/config_misc.html#UpperEll -->
5438
<module name="Indentation"> <!-- Checks correct indentation of Java code: http://checkstyle.sourceforge.net/config_misc.html#Indentation -->
5539
<property name="basicOffset" value="4" />
@@ -69,9 +53,9 @@
6953

7054
<!-- Classes -->
7155
<module name="FinalClass" /> <!-- class with only private constructor must be final: http://checkstyle.sourceforge.net/config_design.html#FinalClass -->
72-
<module name="OneStatementPerLine" /> <!-- you cant write int i=1;int j=2; http://checkstyle.sourceforge.net/config_design.html#OneStatementPerLine -->
73-
<module name="SimplifyBooleanReturn" /> <!-- directly return boolean doe not check and return http://checkstyle.sourceforge.net/config_design.html#SimplifyBooleanReturn -->
74-
<module name="StringLiteralEquality" /> <!-- you cant write myString == "this" http://checkstyle.sourceforge.net/config_design.html#StringLiteralEquality -->
56+
<module name="OneStatementPerLine" /> <!-- you can't write int i=1;int j=2; http://checkstyle.sourceforge.net/config_design.html#OneStatementPerLine -->
57+
<module name="SimplifyBooleanReturn" /> <!-- directly return boolean does not check and return http://checkstyle.sourceforge.net/config_design.html#SimplifyBooleanReturn -->
58+
<module name="StringLiteralEquality" /> <!-- you can't write myString == "this" http://checkstyle.sourceforge.net/config_design.html#StringLiteralEquality -->
7559
<module name="OneTopLevelClass" /> <!-- only one root class per file http://checkstyle.sourceforge.net/config_design.html#OneTopLevelClass -->
7660
<module name="ThrowsCount"> <!-- max 5 throws definitions per method: http://checkstyle.sourceforge.net/config_design.html#ThrowsCount -->
7761
<property name="max" value="5" />
@@ -80,27 +64,16 @@
8064
<module name="OuterTypeFilename" /> <!-- class Foo must be in Foo.java: http://checkstyle.sourceforge.net/config_misc.html#OuterTypeFilename -->
8165

8266
<module name="HideUtilityClassConstructor" /> <!-- utility class constructor must be private: http://checkstyle.sourceforge.net/config_design.html#HideUtilityClassConstructor -->
83-
<!--<module name="VisibilityModifier"> &lt;!&ndash; most members must be private http://checkstyle.sourceforge.net/config_design.html#VisibilityModifier &ndash;&gt;-->
84-
<!--<property name="protectedAllowed" value="true" />-->
85-
<!--<property name="packageAllowed" value="true" />-->
86-
<!--<property name="allowPublicImmutableFields" value="true" />-->
87-
<!--<property name="allowPublicFinalFields" value="true" />-->
88-
<!--<property name="publicMemberPattern" value="^TAG$|^CREATOR$" />-->
89-
<!--</module>-->
9067

9168
<!-- Coding -->
9269
<module name="CovariantEquals" /> <!-- if you override equals with different type you must provide equals with same type: http://checkstyle.sourceforge.net/config_coding.html#CovariantEquals -->
9370
<module name="DefaultComesLast" /> <!-- in switch case default must be the last elem: http://checkstyle.sourceforge.net/config_coding.html#DefaultComesLast -->
9471
<module name="EmptyStatement" /> <!-- basically an empty semicolon: http://checkstyle.sourceforge.net/config_coding.html#EmptyStatement -->
9572
<module name="EqualsHashCode" /> <!-- if you implement equals, you must implement hashcode and vice versa: http://checkstyle.sourceforge.net/config_coding.html#EqualsHashCode -->
96-
<module name="NoFinalizer" /> <!-- Verifies there are no finalize() methods defined in a class: http://checkstyle.sourceforge.net/config_coding.html#NoFinalizer -->
9773
<module name="FallThrough" /> <!-- switch fallthrough with statement not allowed http://checkstyle.sourceforge.net/config_coding.html#FallThrough -->
9874
<module name="IllegalInstantiation" /> <!-- Must not use const of certain types (Activity, Fragment): http://checkstyle.sourceforge.net/config_coding.html#IllegalInstantiation -->
9975

10076
<!-- Size Limitiations -->
101-
<module name="LineLength"><!-- max char length per line http://checkstyle.sourceforge.net/config_sizes.html#LineLength -->
102-
<property name="max" value="300" />
103-
</module>
10477
<module name="MethodLength"><!-- max line length for single method http://checkstyle.sourceforge.net/config_sizes.html#MethodLength -->
10578
<property name="max" value="200" />
10679
</module>

dali/src/main/java/at/favre/lib/dali/Dali.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ public static void logD(String localTag, String msg) {
9898
}
9999
}
100100

101-
102-
103101
/* NON STATIC CLASS ************************************************************************* */
104102

105103
public static void logV(String localTag, String msg) {

gradle/checkstyle.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
apply plugin: 'checkstyle'
3636

3737
checkstyle {
38-
toolVersion = "8.18"
38+
toolVersion = "8.31"
3939
}
4040

4141
task checkstyleMain(type: Checkstyle) {

0 commit comments

Comments
 (0)