-
Notifications
You must be signed in to change notification settings - Fork 128
/
Copy pathcheck_style.xml
74 lines (74 loc) · 3.3 KB
/
check_style.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
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!-- Checks that there are no tab characters ('\t') in the source code. -->
<module name="Checker">
<module name="TreeWalker">
<!-- No EOL should be placed before block start ('{') -->
<module name="LeftCurly">
<property name="option" value="eol"/>
<property name="severity" value="error"/>
</module>
<!-- '}' rules -->
<module name="RightCurly">
<!-- '}' should be on the same line as a next statement -->
<property name="option" value="same"/>
<property name="severity" value="error"/>
</module>
<!-- Braces are mandatory around code blocks -->
<module name="NeedBraces">
<property name="severity" value="error"/>
</module>
<!-- Checks the Javadoc of a method or constructor. -->
<module name="JavadocMethod">
<!-- Check for JavaDoc only on public methods -->
<property name="severity" value="warning"/>
<property name="scope" value="public"/>
</module>
<!-- Checks Javadoc comments for class and interface definitions. -->
<module name="JavadocType">
<!-- Check for JavaDoc only on public types -->
<property name="scope" value="public"/>
<property name="severity" value="warning"/>
</module>
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sourceforge.net/config_naming.html -->
<!-- Sun Naming Conventions -->
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="PackageName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<module name="LineLength">
<property name="max" value="120"/>
<property name="severity" value="warning"/>
</module>
<!-- Checks correct indentation of Java Code. -->
<module name="Indentation">
<!-- how many spaces to use for new indentation level -->
<property name="basicOffset" value="2" />
<!-- how far brace should be indented when on next line -->
<property name="braceAdjustment" value="0"/>
<!-- how much to indent a case label -->
<property name="caseIndent" value="2"/>
<property name="severity" value="warning"/>
</module>
<!-- Specify method parameters code conventions -->
<module name="MethodParamPad">
<!-- Whitespace is required after method name -->
<property name="option" value="space" />
<!-- Check only methods and constructors declarations -->
<property name="tokens" value="METHOD_DEF, CTOR_DEF" />
<property name="severity" value="warning"/>
</module>
<!-- Checks the policy on the padding of parentheses; i.e. whether a space is required after a left parenthesis and before a
right parenthesis, or such spaces are forbidden. -->
<!-- <module name="ParenPad"> -->
<!-- Whitespace required before ')' and after ')' -->
<!-- <property name="option" value="space"/>
</module> -->
</module>
</module>