| <?xml version="1.0"?> |
| |
| <!-- |
| 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. |
| --> |
| |
| <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" |
| "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> |
| <module name="Checker"> |
| <property name="charset" value="UTF-8"/> |
| |
| <property name="fileExtensions" value="java, properties, xml"/> |
| |
| <!-- Suppressions. See: https://checkstyle.sourceforge.io/filters/suppressionfilter.html --> |
| <module name="SuppressionFilter"> |
| <property name="file" value="${checkstyle.suppressions.file}"/> |
| </module> |
| |
| <!-- Whitespaces Checks. See: http://checkstyle.sourceforge.net/config_whitespace.html --> |
| <module name="FileTabCharacter"> |
| <property name="eachLine" value="true"/> |
| </module> |
| |
| <!-- Misc Checks. See: http://checkstyle.sourceforge.net/config_misc.html --> |
| <module name="NewlineAtEndOfFile"/> |
| |
| <module name="RegexpSingleline"> |
| <property name="format" value="org\.mockito\.internal\."/> |
| <property name="message" |
| value="Usage of org.mockito.internal.* is forbidden. Use public Mockito API or standard Java utilities instead."/> |
| </module> |
| |
| <module name="TreeWalker"> |
| <!-- Suppressions. See: https://checkstyle.sourceforge.io/filters/suppressionxpathfilter.html --> |
| <module name="SuppressionXpathFilter"> |
| <property name="file" value="${checkstyle.suppressions.file}"/> |
| </module> |
| |
| <!-- Coding Checks. See: https://checkstyle.sourceforge.io/config_coding.html --> |
| <module name="SimplifyBooleanExpression"/> |
| |
| <!-- Config Blocks. See: https://checkstyle.sourceforge.io/config_blocks.html --> |
| <module name="EmptyCatchBlock"> |
| <property name="exceptionVariableName" value="ignore|expected"/> |
| </module> |
| |
| <!-- Import Checks. See: http://checkstyle.sourceforge.net/config_imports.html --> |
| <module name="RedundantImport"/> |
| <module name="UnusedImports"/> |
| <module name="CustomImportOrder"> |
| <property name="customImportOrderRules" |
| value="STANDARD_JAVA_PACKAGE###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STATIC"/> |
| <property name="standardPackageRegExp" value="^java\."/> |
| <property name="specialImportsRegExp" value="^(javax|jakarta)\."/> |
| <property name="sortImportsInGroupAlphabetically" value="true"/> |
| <property name="separateLineBetweenGroups" value="false"/> |
| </module> |
| <module name="AvoidStarImport"/> |
| |
| <!-- Whitespaces: See: https://checkstyle.sourceforge.io/config_whitespace.html --> |
| <module name="WhitespaceAround"> |
| <property name="allowEmptyConstructors" value="true"/> |
| <property name="allowEmptyMethods" value="true"/> |
| <property name="allowEmptyTypes" value="true"/> |
| <property name="allowEmptyLoops" value="true"/> |
| <property name="allowEmptyLambdas" value="true"/> |
| <property name="allowEmptyCatches" value="true"/> |
| </module> |
| |
| <!--Modifiers Checks. See: http://checkstyle.sourceforge.net/config_modifier.html--> |
| <module name="ModifierOrder"/> |
| |
| <!--Annotation checks. See: http://checkstyle.sourceforge.net/config_annotation.html--> |
| <module name="MissingOverride"/> |
| |
| <!-- Empty line checks. See: http://checkstyle.sourceforge.net/config_whitespace.html#EmptyLineSeparator --> |
| <module name="EmptyLineSeparator"> |
| <!-- PACKAGE_DEF excluded according to Ignite code style. --> |
| <property name="tokens" value="IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, STATIC_INIT, |
| INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF" /> |
| |
| <property name="allowMultipleEmptyLines" value="false" /> |
| <property name="allowMultipleEmptyLinesInsideClassMembers" value="false" /> |
| </module> |
| |
| <!-- @Override annotations on the same line with a method declaration check. --> |
| <module name="AnnotationOnSameLine" /> |
| |
| <!-- |
| Checks the padding between the identifier of a method definition, constructor definition, method call, or |
| constructor invocation; and the left parenthesis of the parameter list. |
| See: https://checkstyle.sourceforge.io/config_whitespace.html#MethodParamPad |
| --> |
| <module name="MethodParamPad"/> |
| |
| <!-- |
| Checks that there is no whitespace after a token. |
| See: https://checkstyle.sourceforge.io/config_whitespace.html#NoWhitespaceAfter |
| --> |
| <module name="NoWhitespaceAfter"> |
| <property name="tokens" value="AT, INC, DEC, UNARY_MINUS, UNARY_PLUS, BNOT, LNOT, DOT, ARRAY_DECLARATOR, |
| INDEX_OP, METHOD_REF, TYPECAST"/> |
| </module> |
| |
| <!-- |
| Checks that there is whitespace after a token. |
| See: https://checkstyle.sourceforge.io/config_whitespace.html#WhitespaceAfter |
| --> |
| <module name="WhitespaceAfter"> |
| <property name="tokens" value="COMMA, SEMI"/> |
| </module> |
| |
| <!-- |
| Checks that there is no whitespace before a token. |
| See: https://checkstyle.sourceforge.io/config_whitespace.html#NoWhitespaceBefore |
| --> |
| <module name="NoWhitespaceBefore"> |
| <property name="tokens" value="COMMA, SEMI, POST_INC, POST_DEC, ELLIPSIS, METHOD_REF, GENERIC_END"/> |
| </module> |
| |
| <module name="NoWhitespaceBefore"> |
| <property name="allowLineBreaks" value="true"/> |
| <property name="tokens" value="DOT"/> |
| </module> |
| |
| <!-- |
| Checks that non-whitespace characters are separated by no more than one whitespace. |
| See: https://checkstyle.sourceforge.io/config_whitespace.html#SingleSpaceSeparator |
| --> |
| <module name="SingleSpaceSeparator"/> |
| |
| <!-- |
| Checks that the whitespace around the Generic tokens are correct. |
| See: https://checkstyle.sourceforge.io/config_whitespace.html#GenericWhitespace |
| --> |
| <module name="GenericWhitespace"/> |
| |
| <!-- |
| Checks for missing Javadoc comments for a method or constructor arguments. |
| See: https://checkstyle.sourceforge.io/config_javadoc.html#MissingJavadocMethod |
| --> |
| <module name="MissingJavadocMethod"> |
| <property name="scope" value="private"/> |
| <property name="allowedAnnotations" value="{}"/> |
| </module> |
| |
| <!-- |
| Checks presence of a Javadoc for a method or constructor. |
| See: https://checkstyle.sourceforge.io/config_javadoc.html#JavadocMethod |
| --> |
| <module name="JavadocMethod"> |
| <property name="accessModifiers" value="public"/> |
| </module> |
| |
| <!-- |
| Checks for missing Javadoc comments for class, enum, interface, and annotation interface definitions. |
| See: https://checkstyle.sourceforge.io/config_javadoc.html#MissingJavadocType |
| --> |
| <module name="MissingJavadocType"> |
| <property name="scope" value="private"/> |
| </module> |
| |
| <!-- |
| Checks that a variable has a Javadoc comment. Ignores serialVersionUID fields. |
| See: https://checkstyle.sourceforge.io/config_javadoc.html#JavadocVariable |
| --> |
| <module name="JavadocVariable"/> |
| |
| <module name="Indentation" /> |
| |
| <module name="LeftCurly"/> |
| |
| <module name="RightCurly"> |
| <property name="option" value="alone" /> |
| </module> |
| |
| <!-- Usage of Ignite abbrevations check. --> |
| <module name="org.apache.ignite.tools.checkstyle.IgniteAbbrevationsRule"/> |
| |
| <!-- Prevents usage of the particular Java classes in Ignite codebase. --> |
| <module name="org.apache.ignite.tools.checkstyle.ClassUsageRestrictionRule"> |
| <property name="className" value="java.util.concurrent.ForkJoinPool"/> |
| <property name="factoryMethods" value="commonPool"/> |
| <property name="substitutionClassName" value="org.apache.ignite.internal.thread.pool.IgniteForkJoinPool"/> |
| </module> |
| |
| <module name="org.apache.ignite.tools.checkstyle.ClassUsageRestrictionRule"> |
| <property name="className" value="java.util.concurrent.Executors"/> |
| <property name="factoryMethods" value="newFixedThreadPool, newWorkStealingPool, newSingleThreadExecutor, newCachedThreadPool, unconfigurableExecutorService"/> |
| <property name="substitutionClassName" value="org.apache.ignite.internal.thread.IgniteThreadPoolExecutor"/> |
| </module> |
| |
| <module name="org.apache.ignite.tools.checkstyle.ClassUsageRestrictionRule"> |
| <property name="className" value="java.util.concurrent.Executors"/> |
| <property name="factoryMethods" value="newSingleThreadScheduledExecutor, newScheduledThreadPool, unconfigurableScheduledExecutorService"/> |
| <property name="substitutionClassName" value="org.apache.ignite.internal.thread.pool.IgniteScheduledThreadPoolExecutor"/> |
| </module> |
| |
| <module name="org.apache.ignite.tools.checkstyle.ClassUsageRestrictionRule"> |
| <property name="className" value="java.util.concurrent.ThreadPoolExecutor"/> |
| <property name="substitutionClassName" value="org.apache.ignite.internal.thread.IgniteThreadPoolExecutor"/> |
| </module> |
| |
| <module name="org.apache.ignite.tools.checkstyle.ClassUsageRestrictionRule"> |
| <property name="className" value="java.util.concurrent.ScheduledThreadPoolExecutor"/> |
| <property name="substitutionClassName" value="org.apache.ignite.internal.thread.pool.IgniteScheduledThreadPoolExecutor"/> |
| </module> |
| |
| <module name="org.apache.ignite.tools.checkstyle.ClassUsageRestrictionRule"> |
| <property name="className" value="java.util.concurrent.CompletableFuture"/> |
| <property name="factoryMethods" value="allOf, anyOf, supplyAsync, runAsync, completedFuture"/> |
| <property name="substitutionClassName" value="org.apache.ignite.internal.thread.context.concurrent.IgniteCompletableFuture"/> |
| </module> |
| |
| <module name="org.apache.ignite.tools.checkstyle.ClassUsageRestrictionRule"> |
| <property name="className" value="java.lang.Thread"/> |
| <property name="substitutionClassName" value="org.apache.ignite.thread.IgniteThread"/> |
| </module> |
| </module> |
| |
| <!-- |
| Checks that the line length not exceeds 140 chars. |
| See: https://checkstyle.org/config_sizes.html#LineLength |
| --> |
| <module name="LineLength"> |
| <property name="max" value="140"/> |
| </module> |
| </module> |