-
Notifications
You must be signed in to change notification settings - Fork 62
/
gwt-checkstyle.xml
219 lines (218 loc) · 11.1 KB
/
gwt-checkstyle.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<?xml version="1.0" encoding="UTF-8"?>
<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
Checkstyle-Configuration: GWT Checks
Description:
-->
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<property name="severity" value="warning"/>
<module name="RegexpSingleline">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="bad // comment"/>
<property name="severity" value="error"/>
<property name="format" value=" [/][/][A-z]"/>
<property name="message" value="// comments must be followed by a space and be on their own line"/>
</module>
<module name="RegexpHeader">
<property name="severity" value="error"/>
<property name="header" value="/\*\n \* Copyright 20(0[6789]|1[0]) Google Inc\.\n \*[ ]*\n \* Licensed under the Apache License, Version 2\.0 \(the "License"\); you may not\n \* use this file except in compliance with the License\. You may obtain a copy of\n \* the License at\n \*[ ]*\n \* http://www\.apache\.org/licenses/LICENSE-2\.0\n \*[ ]*\n \* Unless required by applicable law or agreed to in writing, software\n \* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\n \* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. See the\n \* License for the specific language governing permissions and limitations under\n \* the License\.\n \*/"/>
</module>
<module name="FileTabCharacter">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="no tabs"/>
<property name="severity" value="error"/>
</module>
<module name="TreeWalker">
<module name="FileContentsHolder"/>
<module name="InterfaceIsType">
<property name="severity" value="error"/>
</module>
<module name="RedundantImport">
<property name="severity" value="error"/>
</module>
<module name="UnusedImports">
<property name="severity" value="error"/>
</module>
<module name="JavadocType">
<property name="severity" value="error"/>
<property name="scope" value="protected"/>
</module>
<module name="PackageName">
<property name="severity" value="error"/>
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]{1,})*$"/>
</module>
<module name="ParameterName">
<property name="severity" value="error"/>
</module>
<module name="LocalFinalVariableName">
<property name="severity" value="error"/>
</module>
<module name="LocalVariableName">
<property name="severity" value="error"/>
<property name="tokens" value="PARAMETER_DEF,VARIABLE_DEF"/>
</module>
<module name="LeftCurly"/>
<module name="RightCurly"/>
<module name="CovariantEquals">
<property name="severity" value="error"/>
</module>
<module name="HiddenField">
<property name="severity" value="error"/>
<property name="tokens" value="VARIABLE_DEF"/>
<property name="ignoreConstructorParameter" value="true"/>
<property name="ignoreSetter" value="true"/>
</module>
<module name="IllegalInstantiation">
<property name="severity" value="error"/>
<property name="classes" value="java.lang.Boolean"/>
</module>
<module name="UpperEll">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="checking for 4l rather than 4L"/>
<property name="severity" value="error"/>
</module>
<module name="JavadocStyle">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Well formed java docs"/>
<property name="severity" value="info"/>
<property name="checkHtml" value="false"/>
<property name="tokens" value="CLASS_DEF,CTOR_DEF,INTERFACE_DEF,METHOD_DEF,VARIABLE_DEF"/>
</module>
<module name="NeedBraces">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="make sure if has braces"/>
</module>
<module name="JavadocMethod">
<metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="info"/>
<property name="severity" value="info"/>
<property name="scope" value="protected"/>
<property name="allowUndeclaredRTE" value="true"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowMissingJavadoc" value="true"/>
<property name="allowMissingPropertyJavadoc" value="true"/>
<property name="logLoadErrors" value="true"/>
<property name="tokens" value="METHOD_DEF"/>
</module>
<module name="ImportOrder">
<property name="severity" value="error"/>
<property name="groups" value="com.google, com, junit, net,org, java,javax"/>
<property name="ordered" value="false"/>
<property name="separated" value="true"/>
</module>
<module name="DefaultComesLast">
<property name="severity" value="error"/>
</module>
<module name="MultipleStringLiterals">
<property name="severity" value="info"/>
<property name="ignoreStringsRegexp" value=".{0,3}"/>
</module>
<module name="FallThrough">
<property name="severity" value="error"/>
</module>
<module name="IllegalInstantiation">
<property name="severity" value="error"/>
<property name="classes" value="Boolean"/>
</module>
<module name="Regexp">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="check that a space is left after a colon with an assembled error message"/>
<property name="severity" value="info"/>
<property name="format" value="[^:^"]:" .*+"/>
<property name="message" value="check that a space is left after a colon on an assembled error message"/>
<property name="illegalPattern" value="true"/>
</module>
<module name="Regexp">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="more than one blank line"/>
<property name="severity" value="info"/>
<property name="format" value="[\r]?[\n][ \t]*[\r]?[\n][ \t]*[\r]?[\n][ \t]*"/>
<property name="message" value="more than one blank line"/>
<property name="illegalPattern" value="true"/>
</module>
<module name="WhitespaceAround">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Must have spaces"/>
<property name="severity" value="error"/>
<property name="tokens" value="COLON,NOT_EQUAL,QUESTION,DIV,DIV_ASSIGN,BXOR,BXOR_ASSIGN,MINUS,LCURLY,STAR,STAR_ASSIGN,TYPE_EXTENSION_AND,BAND,LAND,BAND_ASSIGN,MOD,MOD_ASSIGN,PLUS,PLUS_ASSIGN,LT,SL,SL_ASSIGN,LE,ASSIGN,MINUS_ASSIGN,EQUAL,GT,GE,SR,SR_ASSIGN,BSR,BSR_ASSIGN,BOR,BOR_ASSIGN,LOR,LITERAL_ASSERT,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,SLIST,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE"/>
</module>
<module name="Regexp">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="newline before }"/>
<property name="severity" value="error"/>
<property name="format" value="[\r]?[\n][ \t]*[\r]?[\n][ \t]+[}][ ]*[\n]"/>
<property name="message" value="newline before }"/>
<property name="illegalPattern" value="true"/>
</module>
<module name="ModifierOrder">
<property name="severity" value="error"/>
</module>
<module name="AvoidStarImport">
<property name="severity" value="error"/>
</module>
<!--
<module name="com.google.gwt.checkstyle.Order">
<property name="severity" value="error"/>
</module>
<module name="com.google.gwt.checkstyle.Field">
<property name="severity" value="error"/>
</module>
-->
<module name="DoubleCheckedLocking">
<property name="severity" value="error"/>
</module>
<module name="EmptyStatement">
<property name="severity" value="error"/>
</module>
<module name="MethodName">
<property name="severity" value="error"/>
</module>
<module name="MemberName">
<property name="severity" value="error"/>
<property name="format" value="[a-z]|[a-z][a-z_0-9][A-Za-z0-9_]*|[a-z](?<!f)[A-Z0-9]*"/>
</module>
<module name="TodoComment">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Author tags"/>
<property name="severity" value="error"/>
<property name="format" value="@author"/>
</module>
<module name="Regexp">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="No one line javadoc comments"/>
<property name="severity" value="error"/>
<property name="format" value="[/][*][*][^\n]*[*][/]"/>
<property name="message" value="No one line javadoc comments"/>
<property name="illegalPattern" value="true"/>
</module>
<module name="NoWhitespaceAfter">
<property name="severity" value="error"/>
<property name="allowLineBreaks" value="false"/>
<property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
</module>
<module name="WhitespaceAfter">
<property name="tokens" value="TYPECAST"/>
</module>
<module name="TypecastParenPad">
<property name="severity" value="error"/>
<property name="tokens" value="RPAREN,TYPECAST"/>
</module>
<module name="ParenPad"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceBefore">
<property name="severity" value="error"/>
<property name="tokens" value="SEMI,DOT,POST_DEC,POST_INC"/>
</module>
<module name="RedundantModifier"/>
<module name="EqualsHashCode"/>
</module>
<!--
<module name="PackageHtml">
<property name="severity" value="ignore"/>
</module>
-->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE_OFF"/>
<property name="onCommentFormat" value="CHECKSTYLE_ON"/>
</module>
<module name="SuppressionCommentFilter">
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Avoid name checking"/>
<property name="offCommentFormat" value="CHECKSTYLE_NAMING_OFF"/>
<property name="onCommentFormat" value="CHECKSTYLE_NAMING_ON"/>
<property name="checkFormat" value=".*Name.*"/>
<property name="messageFormat" value=".*name.*"/>
</module>
</module>