-
Notifications
You must be signed in to change notification settings - Fork 3.3k
/
Copy pathcheckstyle.xml
142 lines (127 loc) · 5.15 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
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
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd" >
<!--
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
ON MVN COMPILE NOT WORKING
If you wondering why 'mvn compile' does not work building HBase
(in particular, if you are doing it for the first time), instead do
'mvn package'. If you are interested in the full story, see
https://issues.apache.org/jira/browse/HBASE-6795.
-->
<module name="Checker">
<!-- Filter out Checkstyle warnings that have been suppressed with the @SuppressWarnings
annotation -->
<module name="SuppressWarningsFilter"/>
<module name="FileTabCharacter"/>
<module name="TreeWalker">
<!-- Annotations Checks
http://checkstyle.sourceforge.net/config_annotation.html -->
<module name="MissingDeprecated"/>
<!-- Block Checks
http://checkstyle.sourceforge.net/config_blocks.html -->
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<!-- Class Design Checks
http://checkstyle.sourceforge.net/config_design.html -->
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier">
<property name="packageAllowed" value="true"/>
<property name="protectedAllowed" value="true"/>
<property name="allowPublicImmutableFields" value="true"/>
</module>
<!-- Coding Checks
http://checkstyle.sourceforge.net/config_coding.html -->
<module name="ArrayTypeStyle"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="NoFinalizer"/>
<!-- Import Checks
http://checkstyle.sourceforge.net/config_imports.html -->
<module name="AvoidStarImport"/>
<module name="ImportOrder">
<property name="groups" value="*,org.apache.hbase.thirdparty,org.apache.hadoop.hbase.shaded"/>
<property name="option" value="top" />
<property name="ordered" value="true"/>
<property name="sortStaticImportsAlphabetically" value="true"/>
</module>
<module name="RedundantImport"/>
<module name="UnusedImports">
<property name="processJavadoc" value="true"/>
</module>
<module name="IllegalImport">
<!--
TODO include the o.a.htrace package for HTrace v3 once we can upgrade
to checkstyle 8.6 plus and use a message filter to suppress
errors from proper use of o.a.htrace.core
org.apache.htrace,
-->
<property name="illegalPkgs" value="
com.google.common,
io.netty,
org.apache.commons.cli,
org.apache.commons.collections,
org.apache.commons.collections4,
org.apache.commons.lang,
org.apache.curator.shaded,
org.apache.hadoop.classification,
org.apache.htrace.shaded,
org.codehaus.jackson,
org.htrace"/>
<property name="illegalClasses" value="
org.apache.commons.logging.Log,
org.apache.commons.logging.LogFactory"/>
</module>
<!-- Javadoc Checks
http://checkstyle.sourceforge.net/config_javadoc.html -->
<module name="JavadocTagContinuationIndentation">
<property name="offset" value="2"/>
</module>
<module name="NonEmptyAtclauseDescription"/>
<!-- Miscellaneous Checks
http://checkstyle.sourceforge.net/config_misc.html -->
<module name="UpperEll"/>
<module name="Indentation">
<property name="basicOffset" value="2"/>
<property name="caseIndent" value="2"/>
<property name="throwsIndent" value="2"/>
<property name="arrayInitIndent" value="2"/>
<property name="lineWrappingIndentation" value="2"/>
</module>
<module name="MethodLength"/>
<!-- Whitespace Checks
http://checkstyle.sourceforge.net/config_whitespace.html -->
<module name="MethodParamPad"/>
<module name="ParenPad"/>
<!-- Make the @SuppressWarnings annotations available to Checkstyle -->
<module name="SuppressWarningsHolder"/>
</module>
<!-- Size Violation Checks
http://checkstyle.sourceforge.net/config_sizes.html -->
<module name="LineLength">
<property name="max" value="100"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://|org.apache.thrift.|com.google.protobuf.|hbase.protobuf.generated"/>
</module>
</module>