-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcheckstyle.xml
79 lines (61 loc) · 2.87 KB
/
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!--
Copyright 2008 the EasyAnt project See the NOTICE file distributed
with this work for additional information regarding copyright
ownership. Licensed under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by
applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the
License.
-->
<!--
Checkstyle configuration that checks the sun coding conventions from:
- the Java Language Specification at
http://java.sun.com/docs/books/jls/second_edition/html/index.html -
the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - the
Javadoc guidelines at
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - the
JDK Api documentation http://java.sun.com/j2se/docs/api/index.html -
some best practices Checkstyle is very configurable. Be sure to read
the documentation at http://checkstyle.sf.net (or in your downloaded
distribution). Most Checks are configurable, be sure to consult the
documentation. To completely disable a check, just comment it out or
delete it from the file. Finally, it is worth reading the
documentation.
-->
<module name="Checker">
<!--检查文件是否是UTF-8格式-->
<property name="charset" value="UTF-8"/>
<!-- 检查property文件中是否有相同的key。 -->
<module name="Translation"/>
<module name="TreeWalker">
<!-- Checks for Naming Conventions. -->
<!-- Checks for imports -->
<!--
检查是否有重复的import。
<module name="RedundanImport"/>
-->
<module name="AvoidStarImport"/>
<!-- Checks for whitespace -->
<!-- Modifier Checks -->
<!-- Checks for blocks. -->
<module name="LeftCurly"/>
<module name="RightCurly"/>
<!-- Checks for common coding problems -->
<!-- if最多嵌套3层 -->
<module name="NestedIfDepth">
<property name="max" value="2"/>
</module>
<!-- Checks for class design -->
<module name="FinalClass"/>
<!-- Miscellaneous other checks. -->
<module name="UpperEll"/>
</module>
</module>