|
1 | | -<?xml version="1.0"?> |
2 | | -<!DOCTYPE module PUBLIC |
3 | | - "-//Puppy Crawl//DTD Check Configuration 1.2//EN" |
4 | | - "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> |
5 | | - |
| 1 | +<?xml version='1.0' encoding='UTF-8'?> |
| 2 | +<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> |
6 | 3 | <!-- |
7 | 4 |
|
8 | 5 | Custom Checkstyle configuration that checks coding conventions, |
|
30 | 27 | Finally, it is worth reading the documentation. |
31 | 28 |
|
32 | 29 | --> |
33 | | - |
34 | 30 | <module name="Checker"> |
35 | 31 | <!-- |
36 | 32 | If you set the basedir property below, then all reported file |
|
46 | 42 |
|
47 | 43 | <!-- Checks whether files end with a new line. --> |
48 | 44 | <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> |
49 | | - <!----><module name="NewlineAtEndOfFile"/> |
| 45 | + <!----> |
| 46 | + <module name="NewlineAtEndOfFile" /> |
50 | 47 |
|
51 | 48 | <!-- Checks that property files contain the same keys. --> |
52 | 49 | <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> |
53 | | - <module name="Translation"/> |
| 50 | + <module name="Translation" /> |
54 | 51 |
|
55 | 52 | <!-- Checks for Size Violations. --> |
56 | 53 | <!-- See http://checkstyle.sf.net/config_sizes.html --> |
57 | | - <module name="FileLength"/> |
| 54 | + <module name="FileLength" /> |
58 | 55 |
|
| 56 | + <!--<module name="LineLength"> |
| 57 | + <property name="max" value="200" /> |
| 58 | + </module>--> |
59 | 59 | <!-- Checks for tab indentation --> |
60 | | - <module name="RegexpSingleline"> |
61 | | - <property name="format" value="^\s* +\s*[^*]" /> |
62 | | - <property name="message" value="Indentation must use tab characters" /> |
63 | | - </module> |
64 | | - |
65 | 60 | <!-- Miscellaneous other checks. --> |
66 | 61 | <!-- See http://checkstyle.sf.net/config_misc.html --> |
67 | | - <module name="RegexpSingleline"> |
68 | | - <property name="format" value="\s+$"/> |
69 | | - <property name="minimum" value="0"/> |
70 | | - <property name="maximum" value="0"/> |
71 | | - <property name="message" value="Line has trailing spaces."/> |
72 | | - </module> |
73 | | - |
74 | 62 | <module name="TreeWalker"> |
75 | 63 |
|
76 | 64 | <!-- Checks for Javadoc comments. --> |
|
92 | 80 |
|
93 | 81 | <!-- Checks for Naming Conventions. --> |
94 | 82 | <!-- See http://checkstyle.sf.net/config_naming.html --> |
95 | | - <module name="ConstantName"/> |
96 | | - <module name="LocalFinalVariableName"/> |
97 | | - <module name="LocalVariableName"/> |
98 | | - <module name="MemberName"/> |
99 | | - <module name="MethodName"/> |
100 | | - <module name="PackageName"/> |
101 | | - <module name="ParameterName"/> |
102 | | - <module name="StaticVariableName"/> |
103 | | - <module name="TypeName"/> |
| 83 | + <!--<module name="ConstantName" />--> |
| 84 | + <module name="LocalFinalVariableName" /> |
| 85 | + <module name="LocalVariableName" /> |
| 86 | + <module name="MemberName" /> |
| 87 | + <module name="MethodName" /> |
| 88 | + <module name="PackageName" /> |
| 89 | + <module name="ParameterName" /> |
| 90 | + <module name="StaticVariableName" /> |
| 91 | + <module name="TypeName" /> |
104 | 92 |
|
105 | 93 |
|
106 | 94 | <!-- Checks for Headers --> |
|
123 | 111 |
|
124 | 112 | <!-- Checks for imports --> |
125 | 113 | <!-- See http://checkstyle.sf.net/config_import.html --> |
126 | | - <module name="AvoidStarImport"/> |
127 | | - <module name="IllegalImport"/> <!-- defaults to sun.* packages --> |
128 | | - <module name="RedundantImport"/> |
129 | | - <module name="UnusedImports"/> |
| 114 | + <module name="AvoidStarImport" /> |
| 115 | + <module name="IllegalImport" /> <!-- defaults to sun.* packages --> |
| 116 | + <module name="RedundantImport" /> |
| 117 | + <module name="UnusedImports" /> |
130 | 118 |
|
131 | 119 |
|
132 | 120 | <!-- Checks for Size Violations. --> |
133 | 121 | <!-- See http://checkstyle.sf.net/config_sizes.html --> |
134 | 122 | <!--<module name="LineLength"/>--> |
135 | 123 | <module name="MethodLength"/> |
136 | | - <module name="ParameterNumber"> |
| 124 | + <!--<module name="ParameterNumber"> |
137 | 125 | <property name="tokens" value="METHOD_DEF"/> |
138 | | - </module> |
| 126 | + </module>--> |
139 | 127 |
|
140 | 128 |
|
141 | 129 | <!-- Checks for whitespace --> |
142 | 130 | <!-- See http://checkstyle.sf.net/config_whitespace.html --> |
143 | 131 | <module name="EmptyForIteratorPad"/> |
144 | 132 | <module name="GenericWhitespace"/> |
145 | 133 | <module name="MethodParamPad"/> |
146 | | - <module name="NoWhitespaceAfter"/> |
147 | | - <module name="NoWhitespaceBefore"/> |
148 | | - <module name="OperatorWrap"/> |
149 | 134 | <!--<module name="ParenPad"/>--> |
150 | 135 | <module name="TypecastParenPad"/> |
151 | | - <module name="WhitespaceAfter"> |
152 | | - <property name="tokens" value="COMMA, SEMI"/> |
153 | | - </module> |
154 | 136 | <module name="WhitespaceAround"> |
155 | 137 | <property name="tokens" value="ASSIGN, BAND_ASSIGN, BOR_ASSIGN, BSR_ASSIGN, BXOR_ASSIGN, COLON, DIV_ASSIGN, EQUAL, GE, GT, LE, LITERAL_RETURN, LT, MINUS_ASSIGN, MOD_ASSIGN, NOT_EQUAL, PLUS_ASSIGN, QUESTION, SL_ASSIGN, SR_ASSIGN, STAR_ASSIGN"/> |
156 | 138 | </module> |
|
159 | 141 | <!-- Modifier Checks --> |
160 | 142 | <!-- See http://checkstyle.sf.net/config_modifiers.html --> |
161 | 143 | <module name="ModifierOrder"/> |
162 | | - <module name="RedundantModifier"/> |
163 | | - |
164 | | - |
165 | 144 | <!-- Checks for blocks. You know, those {}'s --> |
166 | 145 | <!-- See http://checkstyle.sf.net/config_blocks.html --> |
167 | 146 | <module name="AvoidNestedBlocks"/> |
168 | 147 | <!--<module name="EmptyBlock"/>--> |
169 | 148 | <module name="LeftCurly"> |
170 | | - <property name="option" value="nlow"/> |
| 149 | + <property name="option" value="eol"/> |
171 | 150 | </module> |
172 | | - <module name="NeedBraces"/> |
173 | 151 | <!--<module name="RightCurly"> |
174 | 152 | <property name="option" value="alone"/> |
175 | 153 | </module>--> |
|
180 | 158 | <!--<module name="AvoidInlineConditionals"/>--> |
181 | 159 | <module name="EmptyStatement"/> |
182 | 160 | <module name="EqualsHashCode"/> |
183 | | - <module name="HiddenField"> |
| 161 | + <!--<module name="HiddenField"> |
184 | 162 | <property name="ignoreConstructorParameter" value="true"/> |
185 | 163 | <property name="ignoreSetter" value="true"/> |
186 | | - </module> |
| 164 | + </module>>--> |
187 | 165 | <module name="IllegalInstantiation"/> |
188 | 166 | <module name="InnerAssignment"/> |
189 | 167 | <!--<module name="MagicNumber"/>--> |
|
194 | 172 | <!-- Checks for class design --> |
195 | 173 | <!-- See http://checkstyle.sf.net/config_design.html --> |
196 | 174 | <!--<module name="DesignForExtension"/>--> |
197 | | - <module name="FinalClass"/> |
198 | | - <module name="HideUtilityClassConstructor"/> |
| 175 | + <!--<module name="HideUtilityClassConstructor"/>--> |
199 | 176 | <module name="InterfaceIsType"/> |
200 | | - <module name="VisibilityModifier"/> |
201 | | - |
202 | | - |
203 | 177 | <!-- Miscellaneous other checks. --> |
204 | 178 | <!-- See http://checkstyle.sf.net/config_misc.html --> |
205 | 179 | <module name="ArrayTypeStyle"/> |
206 | | - <module name="FinalParameters"/> |
207 | 180 | <module name="TodoComment"> |
208 | 181 | <property name="format" value="FIXME"/> |
209 | 182 | </module> |
|
215 | 188 | <property name="format" value="XXX"/> |
216 | 189 | <property name="severity" value="warning"/> |
217 | 190 | </module> |
218 | | - <module name="UpperEll"/> |
| 191 | + <!-- <module name="UpperEll"/> --> |
| 192 | + |
219 | 193 |
|
220 | 194 | </module> |
221 | 195 |
|
|
0 commit comments