-
Notifications
You must be signed in to change notification settings - Fork 0
/
rules.xml
128 lines (91 loc) · 4.48 KB
/
rules.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
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration that checks the CS415 conventions from:
http://cs.unh.edu/~cs415/javastyle.pdf
Checkstyle is very configurable. Be sure to read the documentation at
http://checkstyle.sf.net (or in your downloaded distribution).
-->
<module name="Checker">
<!-- Checks for existance of tabs -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<!-- "File contains tab characters" (reported only once) -->
<module name="FileTabCharacter"/>
<module name="TreeWalker">
<!-- Checks for indentation -->
<module name="Indentation">
<property name="basicOffset" value="4"/>
<!-- needs to be a severity enum <property name="severity" value="1"/> -->
</module>
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<!-- Missing a Javadoc comment ,Expected an @return tag,
Expected @param tag for '***' -->
<module name="JavadocMethod"/>
<!-- Missing a Javadoc comment , Type Javadoc comment is missing an @author tag. -->
<!-- javadoc comment must immediately precede class def -->
<module name="JavadocType">
<property name="authorFormat" value="\S"/>
</module>
<!-- Javadoc has empty description section., First sentence should end with a period. -->
<module name="JavadocStyle">
<property name="checkEmptyJavadoc" value="true"/>
</module>
<!-- Checks for Naming Conventions. -->
<!-- Name 'PerCent' must match pattern '^[a-z][a-zA-Z0-9]*$'. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<module name="ConstantName"/> <!-- static final fields all caps and underscors -->
<module name="LocalVariableName"/>
<module name="MemberName">
<property name="format" value="^_?[a-z][a-zA-Z0-9]*$"/>
</module>
<module name="MethodName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<!-- <module name="LineLength"/> -->
<module name="LineLength">
<property name="max" value="80"/>
</module>
<!-- 150 lines is default -->
<module name="MethodLength"/>
<!-- <module name="ParameterNumber"/> -->
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<!-- pad parens -->
<module name="ParenPad">
<property name="option" value="space"/>
</module>
<!-- space after comma -->
<module name="WhitespaceAfter">
<property name="tokens" value="COMMA"/>
</module>
<!-- spaces around tokens -->
<module name="WhitespaceAround">
<property name="tokens" value="ASSIGN, DIV, DIV_ASSIGN, EQUAL,GE, GT, LAND, LCURLY, LE, LOR, LT, MINUS,
MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, RCURLY,
STAR, STAR_ASSIGN"/>
</module>
<!-- Checks for blocks. You know, those {}'s -->
<!-- See http://checkstyle.sf.net/config_blocks.html -->
<module name="LeftCurly">
<property name="option" value="nl"/>
</module>
<module name="RightCurly">
<property name="option" value="alone"/>
<property name="tokens" value="LITERAL_ELSE"/>
</module>
<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<module name="HiddenField"/>
<!-- Checks for class design -->
<!-- See http://checkstyle.sf.net/config_design.html -->
<module name="VisibilityModifier">
<property name="protectedAllowed" value="true"/>
</module>
</module>
</module>