blob: bbf690e56d450661979038abe9cad9de86c178e2 [file] [log] [blame]
Jake Wharton763621d2014-01-10 23:31:38 -08001<?xml version="1.0"?>
2<!DOCTYPE module PUBLIC
Jesse Wilson48378f72017-05-06 15:59:35 -04003 "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4 "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
Jake Wharton763621d2014-01-10 23:31:38 -08005
6<module name="Checker">
Jesse Wilson48378f72017-05-06 15:59:35 -04007 <module name="SuppressWarningsFilter"/>
Jake Wharton763621d2014-01-10 23:31:38 -08008 <module name="NewlineAtEndOfFile"/>
9 <module name="FileLength"/>
10 <module name="FileTabCharacter"/>
11
12 <!-- Trailing spaces -->
13 <module name="RegexpSingleline">
14 <property name="format" value="\s+$"/>
15 <property name="message" value="Line has trailing spaces."/>
16 </module>
17
Jesse Wilson48378f72017-05-06 15:59:35 -040018 <!-- Space after 'for' and 'if' -->
19 <module name="RegexpSingleline">
20 <property name="format" value="^\s*(for|if)\b[^ ]"/>
21 <property name="message" value="Space needed before opening parenthesis."/>
22 </module>
23
24 <!-- For each spacing -->
25 <module name="RegexpSingleline">
26 <property name="format" value="^\s*for \(.*?([^ ]:|:[^ ])"/>
27 <property name="message" value="Space needed around ':' character."/>
28 </module>
29
Jake Wharton763621d2014-01-10 23:31:38 -080030 <module name="TreeWalker">
31 <property name="cacheFile" value="${checkstyle.cache.file}"/>
32
33 <!-- Checks for Javadoc comments. -->
34 <!-- See http://checkstyle.sf.net/config_javadoc.html -->
35 <!--module name="JavadocMethod"/-->
36 <!--module name="JavadocType"/-->
37 <!--module name="JavadocVariable"/-->
38 <module name="JavadocStyle"/>
39
40
41 <!-- Checks for Naming Conventions. -->
42 <!-- See http://checkstyle.sf.net/config_naming.html -->
43 <module name="ConstantName"/>
44 <module name="LocalFinalVariableName"/>
45 <module name="LocalVariableName"/>
46 <module name="MemberName"/>
47 <module name="MethodName"/>
48 <module name="PackageName"/>
49 <module name="ParameterName"/>
50 <module name="StaticVariableName"/>
51 <module name="TypeName"/>
52
53
54 <!-- Checks for imports -->
55 <!-- See http://checkstyle.sf.net/config_import.html -->
56 <module name="AvoidStarImport"/>
57 <module name="IllegalImport"/>
58 <!-- defaults to sun.* packages -->
59 <module name="RedundantImport"/>
Jake Whartonacb2d7f2014-12-15 18:35:43 -080060 <module name="UnusedImports">
61 <property name="processJavadoc" value="true"/>
62 </module>
Jake Wharton763621d2014-01-10 23:31:38 -080063
64
65 <!-- Checks for Size Violations. -->
66 <!-- See http://checkstyle.sf.net/config_sizes.html -->
67 <module name="LineLength">
68 <property name="max" value="100"/>
69 </module>
Hannes Dorfmann191787d2016-01-19 11:57:13 +010070 <module name="MethodLength">
Thomas Broyer4cd975b2017-05-13 14:52:51 +020071 <property name="max" value="160"/>
Hannes Dorfmann191787d2016-01-19 11:57:13 +010072 </module>
Jake Wharton763621d2014-01-10 23:31:38 -080073 <module name="ParameterNumber"/>
74
75
76 <!-- Checks for whitespace -->
77 <!-- See http://checkstyle.sf.net/config_whitespace.html -->
78 <module name="GenericWhitespace"/>
jwilsona5f49c22015-07-22 09:34:23 -070079 <!--<module name="EmptyForIteratorPad"/>-->
Jake Wharton763621d2014-01-10 23:31:38 -080080 <module name="MethodParamPad"/>
81 <module name="NoWhitespaceAfter"/>
82 <module name="NoWhitespaceBefore"/>
83 <module name="OperatorWrap"/>
84 <module name="ParenPad"/>
85 <module name="TypecastParenPad"/>
86 <module name="WhitespaceAfter"/>
Jesse Wilson48378f72017-05-06 15:59:35 -040087 <module name="WhitespaceAround">
88 <property name="tokens"
89 value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN,
90 COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_CATCH,
91 LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN,
92 LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS,
93 MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST,
94 SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND"/>
95 </module>
Jake Wharton763621d2014-01-10 23:31:38 -080096
97
98 <!-- Modifier Checks -->
99 <!-- See http://checkstyle.sf.net/config_modifiers.html -->
100 <module name="ModifierOrder"/>
101 <module name="RedundantModifier"/>
102
103
104 <!-- Checks for blocks. You know, those {}'s -->
105 <!-- See http://checkstyle.sf.net/config_blocks.html -->
106 <module name="AvoidNestedBlocks"/>
107 <!--module name="EmptyBlock"/-->
108 <module name="LeftCurly"/>
Jesse Wilsond7b21892015-01-05 23:10:08 -0500109 <!--<module name="NeedBraces"/>-->
Jake Wharton763621d2014-01-10 23:31:38 -0800110 <module name="RightCurly"/>
111
112
113 <!-- Checks for common coding problems -->
114 <!-- See http://checkstyle.sf.net/config_coding.html -->
115 <!--module name="AvoidInlineConditionals"/-->
116 <module name="CovariantEquals"/>
Jake Wharton763621d2014-01-10 23:31:38 -0800117 <module name="EmptyStatement"/>
Jesse Wilson8a0fcc12014-11-17 10:23:09 -0500118 <!--<module name="EqualsAvoidNull"/>-->
Jake Wharton763621d2014-01-10 23:31:38 -0800119 <module name="EqualsHashCode"/>
120 <!--module name="HiddenField"/-->
121 <module name="IllegalInstantiation"/>
122 <module name="InnerAssignment"/>
Jesse Wilsonf9948ba2015-01-08 10:41:33 -0500123 <!--<module name="MagicNumber"/>-->
Jake Wharton763621d2014-01-10 23:31:38 -0800124 <module name="MissingSwitchDefault"/>
Christian Stein97f40442016-01-07 12:41:19 +0100125 <!--module name="RedundantThrows"/-->
Jake Wharton763621d2014-01-10 23:31:38 -0800126 <module name="SimplifyBooleanExpression"/>
127 <module name="SimplifyBooleanReturn"/>
128
129 <!-- Checks for class design -->
130 <!-- See http://checkstyle.sf.net/config_design.html -->
131 <!--module name="DesignForExtension"/-->
132 <module name="FinalClass"/>
133 <module name="HideUtilityClassConstructor"/>
134 <module name="InterfaceIsType"/>
135 <!--module name="VisibilityModifier"/-->
136
137
138 <!-- Miscellaneous other checks. -->
139 <!-- See http://checkstyle.sf.net/config_misc.html -->
140 <module name="ArrayTypeStyle"/>
141 <!--module name="FinalParameters"/-->
142 <module name="TodoComment"/>
143 <module name="UpperEll"/>
Jesse Wilson48378f72017-05-06 15:59:35 -0400144
145 <!-- Make the @SuppressWarnings annotations available to Checkstyle -->
146 <module name="SuppressWarningsHolder"/>
Jake Wharton763621d2014-01-10 23:31:38 -0800147 </module>
148</module>