Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathcheckstyle.xml
More file actions
Latest commit
51 lines (42 loc) · 2.11 KB
/
Copy pathcheckstyle.xml
File metadata and controls
51 lines (42 loc) · 2.11 KB
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
<!DOCTYPEmodule PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<modulename="Checker">
<modulename="TreeWalker">
<!-- Code convention checking -->
<!-- One statement per line, one declaration per line -->
<modulename="OneStatementPerLine">
<propertyname="treatTryResourcesAsStatement"value="true"/>
</module>
<!-- Add at least one blank line between method definitions and property definitions -->
<modulename="EmptyLineSeparator">
<propertyname="tokens"value="VARIABLE_DEF, METHOD_DEF"/>
<propertyname="allowMultipleEmptyLines"value="false"/>
<propertyname="allowMultipleEmptyLinesInsideClassMembers"value="false"/>
</module>
<!-- Only one declaration per line -->
<modulename="MultipleVariableDeclarations"/>
<!-- Remove unnecessary parentheses -->
<modulename="UnnecessaryParentheses"/>
<!-- Avoid Redundant Initializations -->
<modulename="ExplicitInitialization"/>
<!-- Other checking -->
<!-- Loops need braces except they are a single line statement -->
<modulename="NeedBraces">
<propertyname="tokens"value="LITERAL_CASE, LITERAL_DEFAULT"/>
<propertyname="allowSingleLineStatement"value="true"/>
</module>
<!-- Class name should be a Hungarian notation, has to start with uppercase -->
<modulename="TypeName"/>
<!-- Method name should have a Hungarian notation, has to start with lowercase -->
<modulename="MethodName">
<propertyname="format"value="^[a-zA-Z](_?[a-zA-Z0-9]+)*$"/>
<propertyname="allowClassName"value="true"/>
</module>
<!-- Naming a variable in a loop can be one char, other variables have Hungarian notation -->
<modulename="LocalVariableName">
<propertyname="format"value="^[a-z][_a-zA-Z0-9]+$"/>
<propertyname="allowOneCharVarInForLoop"value="true"/>
</module>
</module>
</module>