apache-ignite

Форк
0
/
checkstyle.xml 
206 строк · 9.1 Кб
1
<?xml version="1.0"?>
2

3
<!--
4
  Licensed to the Apache Software Foundation (ASF) under one or more
5
  contributor license agreements.  See the NOTICE file distributed with
6
  this work for additional information regarding copyright ownership.
7
  The ASF licenses this file to You under the Apache License, Version 2.0
8
  (the "License"); you may not use this file except in compliance with
9
  the License.  You may obtain a copy of the License at
10

11
       http://www.apache.org/licenses/LICENSE-2.0
12

13
  Unless required by applicable law or agreed to in writing, software
14
  distributed under the License is distributed on an "AS IS" BASIS,
15
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
  See the License for the specific language governing permissions and
17
  limitations under the License.
18
-->
19

20
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
21
    "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
22
<module name="Checker">
23
    <property name="charset" value="UTF-8"/>
24

25
    <property name="fileExtensions" value="java, properties, xml"/>
26

27
    <!-- Whitespaces Checks. See: http://checkstyle.sourceforge.net/config_whitespace.html -->
28
    <module name="FileTabCharacter">
29
        <property name="eachLine" value="true"/>
30
    </module>
31

32
    <!-- Misc Checks. See: http://checkstyle.sourceforge.net/config_misc.html -->
33
    <module name="NewlineAtEndOfFile"/>
34

35
    <module name="TreeWalker">
36
        <!-- Coding Checks. See: https://checkstyle.sourceforge.io/config_coding.html -->
37
        <module name="SimplifyBooleanExpression"/>
38

39
        <!-- Config Blocks. See: https://checkstyle.sourceforge.io/config_blocks.html -->
40
        <module name="EmptyCatchBlock">
41
            <property name="exceptionVariableName" value="ignore|expected"/>
42
        </module>
43

44
        <!-- Import Checks. See: http://checkstyle.sourceforge.net/config_imports.html -->
45
        <module name="RedundantImport"/>
46
        <module name="UnusedImports"/>
47
        <module name="CustomImportOrder">
48
            <property name="customImportOrderRules"
49
                      value="STANDARD_JAVA_PACKAGE###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STATIC"/>
50
            <property name="standardPackageRegExp" value="^java\."/>
51
            <property name="specialImportsRegExp" value="^javax\."/>
52
            <property name="sortImportsInGroupAlphabetically" value="true"/>
53
            <property name="separateLineBetweenGroups" value="false"/>
54
        </module>
55
        <module name="AvoidStarImport"/>
56

57
        <!-- Whitespaces: See: https://checkstyle.sourceforge.io/config_whitespace.html -->
58
        <module name="WhitespaceAround">
59
            <property name="allowEmptyConstructors" value="true"/>
60
            <property name="allowEmptyMethods" value="true"/>
61
            <property name="allowEmptyTypes" value="true"/>
62
            <property name="allowEmptyLoops" value="true"/>
63
            <property name="allowEmptyLambdas" value="true"/>
64
            <property name="allowEmptyCatches" value="true"/>
65
        </module>
66

67
        <!--Modifiers Checks. See: http://checkstyle.sourceforge.net/config_modifier.html-->
68
        <module name="ModifierOrder"/>
69

70
        <!--Annotation checks. See: http://checkstyle.sourceforge.net/config_annotation.html-->
71
        <module name="MissingOverride"/>
72

73
        <!-- Empty line checks. See: http://checkstyle.sourceforge.net/config_whitespace.html#EmptyLineSeparator -->
74
        <module name="EmptyLineSeparator">
75
            <!-- PACKAGE_DEF excluded according to Ignite code style. -->
76
            <property name="tokens" value="IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, STATIC_INIT,
77
                INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF" />
78

79
            <property name="allowMultipleEmptyLines" value="false" />
80
            <property name="allowMultipleEmptyLinesInsideClassMembers" value="false" />
81
        </module>
82

83
        <!-- @Override annotations on the same line with a method declaration check. -->
84
        <module name="AnnotationOnSameLine" />
85
        <module name="SuppressionXpathSingleFilter">
86
            <property name="checks" value="AnnotationOnSameLine" />
87
            <property name="query" value="//ANNOTATION[.//IDENT[not(@text='Override')]]" />
88
        </module>
89
        <!--
90
            Checks the padding between the identifier of a method definition, constructor definition, method call, or
91
            constructor invocation; and the left parenthesis of the parameter list.
92
            See: https://checkstyle.sourceforge.io/config_whitespace.html#MethodParamPad
93
        -->
94
        <module name="MethodParamPad"/>
95

96
        <!--
97
            Checks that there is no whitespace after a token.
98
            See: https://checkstyle.sourceforge.io/config_whitespace.html#NoWhitespaceAfter
99
        -->
100
        <module name="NoWhitespaceAfter">
101
            <property name="tokens" value="AT, INC, DEC, UNARY_MINUS, UNARY_PLUS, BNOT, LNOT, DOT, ARRAY_DECLARATOR,
102
                INDEX_OP, METHOD_REF, TYPECAST"/>
103
        </module>
104

105
        <!--
106
            Checks that there is whitespace after a token.
107
            See: https://checkstyle.sourceforge.io/config_whitespace.html#WhitespaceAfter
108
        -->
109
        <module name="WhitespaceAfter">
110
            <property name="tokens" value="COMMA, SEMI"/>
111
        </module>
112

113
        <!--
114
            Checks that there is no whitespace before a token.
115
            See: https://checkstyle.sourceforge.io/config_whitespace.html#NoWhitespaceBefore
116
        -->
117
        <module name="NoWhitespaceBefore">
118
            <property name="tokens" value="COMMA, SEMI, POST_INC, POST_DEC, ELLIPSIS, METHOD_REF, GENERIC_END"/>
119
        </module>
120

121
        <module name="NoWhitespaceBefore">
122
            <property name="allowLineBreaks" value="true"/>
123
            <property name="tokens" value="DOT"/>
124
        </module>
125

126
        <!--
127
            Checks that non-whitespace characters are separated by no more than one whitespace.
128
            See: https://checkstyle.sourceforge.io/config_whitespace.html#SingleSpaceSeparator
129
        -->
130
        <module name="SingleSpaceSeparator"/>
131

132
        <!--
133
            Checks that the whitespace around the Generic tokens are correct.
134
            See: https://checkstyle.sourceforge.io/config_whitespace.html#GenericWhitespace
135
        -->
136
        <module name="GenericWhitespace"/>
137

138
        <!--
139
           Checks for missing Javadoc comments for a method or constructor arguments.
140
           See: https://checkstyle.sourceforge.io/config_javadoc.html#MissingJavadocMethod
141
        -->
142
        <module name="MissingJavadocMethod">
143
            <property name="scope" value="private"/>
144
            <property name="allowedAnnotations" value="{}"/>
145
        </module>
146

147
        <!--
148
           Checks presence of a Javadoc for a method or constructor.
149
           See: https://checkstyle.sourceforge.io/config_javadoc.html#JavadocMethod
150
        -->
151
        <module name="JavadocMethod">
152
            <property name="accessModifiers" value="public"/>
153
        </module>
154

155
        <!--
156
           Checks for missing Javadoc comments for class, enum, interface, and annotation interface definitions.
157
           See: https://checkstyle.sourceforge.io/config_javadoc.html#MissingJavadocType
158
        -->
159
        <module name="MissingJavadocType">
160
            <property name="scope" value="private"/>
161
        </module>
162

163
        <!--
164
           Checks that a variable has a Javadoc comment. Ignores serialVersionUID fields.
165
           See: https://checkstyle.sourceforge.io/config_javadoc.html#JavadocVariable
166
        -->
167
        <module name="JavadocVariable"/>
168

169
        <!--
170
          Suppresses MissingJavadocMethod check violations in the specified packages.
171
          See: https://checkstyle.sourceforge.io/config_filters.html#SuppressionXpathSingleFilter
172
       -->
173
        <module name="SuppressionXpathSingleFilter">
174
            <property name="checks" value="(?&lt;!Missing)JavadocMethod"/>
175
            <property name="files" value="[\\/]internal[\\/]|[\\/]test[\\/]|[\\/]tests[\\/]|[\\/]ml[\\/]|[\\/]yardstick[\\/]"/>
176
        </module>
177

178
        <!--
179
          Suppresses all Javadoc check violations in the specified files.
180
          See: https://checkstyle.sourceforge.io/config_filters.html#SuppressionXpathSingleFilter
181
       -->
182
        <module name="SuppressionXpathSingleFilter">
183
            <property name="checks" value="Javadoc"/>
184
            <property name="files" value="BCrypt\.java|HLL\.java|HLLMetadata\.java|HLLType\.java|BigEndianAscendingWordSerializer\.java|NumberUtil\.java|SchemaVersionOne\.java|BigEndianAscendingWordDeserializer\.java|CacheView\.java|ConcurrentLinkedDeque8\.java|ConcurrentHashMap8\.java|ConcurrentLinkedHashMap\.java"/>
185
        </module>
186

187
        <module name="Indentation" />
188

189
        <module name="LeftCurly"/>
190

191
        <module name="RightCurly">
192
            <property name="option" value="alone" />
193
        </module>
194

195
        <!-- Usage of Ignite abbrevations check. -->
196
        <module name="org.apache.ignite.tools.checkstyle.IgniteAbbrevationsRule"/>
197
    </module>
198

199
    <!--
200
        Checks that the line length not exceeds 140 chars.
201
        See: https://checkstyle.org/config_sizes.html#LineLength
202
    -->
203
    <module name="LineLength">
204
        <property name="max" value="140"/>
205
    </module>
206
</module>
207

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.