1+ <?xml version =" 1.0" ?>
2+ <!DOCTYPE module PUBLIC
3+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4+ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
5+
6+ <!--
7+ Checkstyle configuration that checks the Google coding conventions from:
8+
9+ - Google Java Style
10+ https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html
11+
12+ Checkstyle is very configurable. Be sure to read the documentation at
13+ http://checkstyle.sf.net (or in your downloaded distribution).
14+ Most Checks are configurable, be sure to consult the documentation.
15+ To completely disable a check, just comment it out or delete it from the file.
16+ Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
17+
18+ -->
19+
20+ <module name =" Checker" >
21+ <property name =" charset" value =" UTF-8" />
22+
23+ <property name =" severity" value =" warning" />
24+
25+ <!-- Add Support @SuppressWarnings("checkstyle:<module_name>") annotation-->
26+ <module name =" SuppressWarningsFilter" />
27+
28+ <!-- Add support CHECKSTYLE:OFF / CHECKSTYLE:ON for suppressing warnings -->
29+ <module name =" SuppressionCommentFilter" />
30+
31+ <module name =" TreeWalker" >
32+
33+ <!-- Add Support @SuppressWarnings("checkstyle:<module_name>") annotation-->
34+ <module name =" SuppressWarningsHolder" />
35+
36+ <!-- Add support CHECKSTYLE:OFF / CHECKSTYLE:ON for suppressing warnings -->
37+ <module name =" FileContentsHolder" />
38+
39+ <module name =" OuterTypeFilename" />
40+ <module name =" IllegalTokenText" >
41+ <property name =" tokens" value =" STRING_LITERAL, CHAR_LITERAL" />
42+ <property name =" format" value =" \\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)" />
43+ <property name =" message" value =" Avoid using corresponding octal or Unicode escape." />
44+ </module >
45+ <module name =" AvoidStarImport" />
46+ <module name =" EmptyBlock" >
47+ <property name =" option" value =" TEXT" />
48+ <property name =" tokens" value =" LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH" />
49+ </module >
50+ <module name =" NeedBraces" />
51+ <module name =" LeftCurly" />
52+ <module name =" RightCurly" />
53+ <module name =" MultipleVariableDeclarations" />
54+ <module name =" ArrayTypeStyle" />
55+ <module name =" MissingSwitchDefault" />
56+ <module name =" FallThrough" />
57+ <module name =" UpperEll" />
58+ <module name =" PackageName" />
59+ <module name =" TypeName" >
60+ <message key =" name.invalidPattern"
61+ value =" Type name ''{0}'' must match pattern ''{1}''." />
62+ </module >
63+ <module name =" MemberName" >
64+ <property name =" format" value =" ^[a-z][a-zA-Z0-9]*$" />
65+ <message key =" name.invalidPattern"
66+ value =" Member name ''{0}'' must match pattern ''{1}''." />
67+ </module >
68+ <module name =" ParameterName" >
69+ <property name =" format" value =" ^[a-z][a-zA-Z0-9]*$" />
70+ <message key =" name.invalidPattern"
71+ value =" Parameter name ''{0}'' must match pattern ''{1}''." />
72+ </module >
73+ <module name =" LocalVariableName" >
74+ <property name =" tokens" value =" VARIABLE_DEF" />
75+ <property name =" format" value =" ^[a-z][a-zA-Z0-9]*$" />
76+ <property name =" allowOneCharVarInForLoop" value =" true" />
77+ <message key =" name.invalidPattern"
78+ value =" Local variable name ''{0}'' must match pattern ''{1}''." />
79+ </module >
80+ <module name =" ClassTypeParameterName" />
81+ <module name =" MethodTypeParameterName" >
82+ <property name =" format" value =" (^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)" />
83+ <message key =" name.invalidPattern"
84+ value =" Method type name ''{0}'' must match pattern ''{1}''." />
85+ </module >
86+ <module name =" NoFinalizer" />
87+ <module name =" GenericWhitespace" >
88+ <message key =" ws.followed"
89+ value =" GenericWhitespace ''{0}'' is followed by whitespace." />
90+ <message key =" ws.preceded"
91+ value =" GenericWhitespace ''{0}'' is preceded with whitespace." />
92+ <message key =" ws.illegalFollow"
93+ value =" GenericWhitespace ''{0}'' should be followed by whitespace." />
94+ <message key =" ws.notPreceded"
95+ value =" GenericWhitespace ''{0}'' is not preceded with whitespace." />
96+ </module >
97+ <module name =" MethodParamPad" />
98+ <module name =" OperatorWrap" >
99+ <property name =" option" value =" NL" />
100+ <property name =" tokens"
101+ value =" BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR " />
102+ </module >
103+ <module name =" MethodName" >
104+ <property name =" format" value =" ^[a-z][a-z0-9][a-zA-Z0-9_]*$" />
105+ <message key =" name.invalidPattern"
106+ value =" Method name ''{0}'' must match pattern ''{1}''." />
107+ </module >
108+ <module name =" IllegalInstantiation" />
109+ <module name =" ModifiedControlVariable" />
110+ <module name =" SimplifyBooleanExpression" />
111+ <module name =" SimplifyBooleanReturn" />
112+ <module name =" MethodLength" />
113+ <module name =" EmptyLineSeparator" >
114+ <property name =" tokens" value =" PACKAGE_DEF, IMPORT, ENUM_DEF, INTERFACE_DEF, CTOR_DEF, STATIC_INIT, INSTANCE_INIT" />
115+ </module >
116+ <module name =" NoWhitespaceAfter" />
117+ <module name =" NoWhitespaceBefore" />
118+ <module name =" WhitespaceAfter" />
119+ <module name =" WhitespaceAround" />
120+ </module >
121+
122+ <module name =" Translation" />
123+ <module name =" RegexpSingleline" >
124+ <property name =" format" value =" System\.out\.print" />
125+ <property name =" message" value =" System.out.print* is not allowed. Use logging instead." />
126+ </module >
127+ <module name =" RegexpSingleline" >
128+ <property name =" format" value =" System\.exit" />
129+ <property name =" message" value =" System.exit is not allowed." />
130+ </module >
131+ <module name =" RegexpSingleline" >
132+ <property name =" format" value =" printStacktrace" />
133+ <property name =" message" value =" printStacktrace is not allowed. Use logging instead or handle error correctly." />
134+ </module >
135+ </module >
0 commit comments