1
+ <!DOCTYPE module PUBLIC
2
+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
3
+ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
4
+
5
+ <!--
6
+ Checkstyle configuration based on the Google coding conventions from:
7
+ - Google Java Style
8
+ https://google.github.io/styleguide/javaguide.html
9
+ -->
10
+
11
+ <module name =" Checker" >
12
+
13
+ <module name =" NewlineAtEndOfFile" />
14
+ <module name =" FileLength" >
15
+ <property name =" max" value =" 2500" />
16
+ </module >
17
+ <module name =" FileTabCharacter" />
18
+
19
+ <!-- Trailing spaces -->
20
+ <module name =" RegexpSingleline" >
21
+ <property name =" format" value =" \s+$" />
22
+ <property name =" message" value =" Line has trailing spaces." />
23
+ </module >
24
+
25
+ <!-- Space after 'for' and 'if' -->
26
+ <module name =" RegexpSingleline" >
27
+ <property name =" format" value =" ^\s*(for|if)\b[^ ]" />
28
+ <property name =" message" value =" Space needed before opening parenthesis." />
29
+ </module >
30
+
31
+ <!-- For each spacing -->
32
+ <module name =" RegexpSingleline" >
33
+ <property name =" format" value =" ^\s*for \(.*?([^ ]:|:[^ ])" />
34
+ <property name =" message" value =" Space needed around ':' character." />
35
+ </module >
36
+
37
+ <module name =" TreeWalker" >
38
+
39
+ <!-- Checks for Javadoc comments. -->
40
+ <!-- See http://checkstyle.sf.net/config_javadoc.html -->
41
+ <module name =" JavadocStyle" />
42
+
43
+
44
+ <!-- Checks for Naming Conventions. -->
45
+ <!-- See http://checkstyle.sf.net/config_naming.html -->
46
+ <!-- <module name="ConstantName"/>-->
47
+ <module name =" LocalFinalVariableName" />
48
+ <module name =" LocalVariableName" />
49
+ <module name =" MemberName" />
50
+ <module name =" MethodName" />
51
+ <module name =" ParameterName" />
52
+ <module name =" StaticVariableName" />
53
+ <module name =" TypeName" />
54
+ <module name =" PackageName" >
55
+ <property name =" format" value =" ^[a-z]+(\.[a-z][a-z0-9_]*)*$" />
56
+ <message key =" name.invalidPattern"
57
+ value =" Package name ''{0}'' must match pattern ''{1}''." />
58
+ </module >
59
+
60
+ <!-- Checks for imports -->
61
+ <!-- See http://checkstyle.sf.net/config_import.html -->
62
+ <module name =" AvoidStarImport" />
63
+ <module name =" IllegalImport" />
64
+ <!-- defaults to sun.* packages -->
65
+ <module name =" RedundantImport" />
66
+ <module name =" UnusedImports" >
67
+ <property name =" processJavadoc" value =" true" />
68
+ </module >
69
+
70
+
71
+ <!-- Checks for Size Violations. -->
72
+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
73
+ <module name =" MethodLength" >
74
+ <property name =" max" value =" 200" />
75
+ </module >
76
+
77
+
78
+ <!-- Checks for whitespace -->
79
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
80
+ <module name =" GenericWhitespace" />
81
+ <module name =" MethodParamPad" />
82
+ <module name =" OperatorWrap" />
83
+ <module name =" ParenPad" />
84
+ <module name =" TypecastParenPad" />
85
+ <module name =" WhitespaceAfter" />
86
+ <module name =" WhitespaceAround" >
87
+ <property name =" tokens"
88
+ value =" ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN,
89
+ COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_CATCH,
90
+ LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN,
91
+ LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS,
92
+ MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST,
93
+ SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND" />
94
+ </module >
95
+
96
+
97
+ <!-- Modifier Checks -->
98
+ <!-- See http://checkstyle.sf.net/config_modifiers.html -->
99
+ <module name =" ModifierOrder" />
100
+ <module name =" RedundantModifier" />
101
+
102
+
103
+ <!-- Checks for blocks. You know, those { }'s -->
104
+ <!-- See http://checkstyle.sf.net/config_blocks.html -->
105
+ <module name =" AvoidNestedBlocks" />
106
+ <module name =" LeftCurly" />
107
+ <module name =" RightCurly" />
108
+
109
+
110
+ <!-- Checks for common coding problems -->
111
+ <!-- See http://checkstyle.sf.net/config_coding.html -->
112
+ <module name =" CovariantEquals" />
113
+ <module name =" EmptyStatement" />
114
+ <module name =" EqualsHashCode" />
115
+ <module name =" IllegalInstantiation" />
116
+ <module name =" SimplifyBooleanExpression" />
117
+ <module name =" SimplifyBooleanReturn" />
118
+
119
+ <!-- Checks for class design -->
120
+ <!-- See http://checkstyle.sf.net/config_design.html -->
121
+ <module name =" HideUtilityClassConstructor" />
122
+
123
+ <!-- Miscellaneous other checks. -->
124
+ <!-- See http://checkstyle.sf.net/config_misc.html -->
125
+ <module name =" ArrayTypeStyle" />
126
+ <module name =" UpperEll" />
127
+ </module >
128
+ </module >
0 commit comments