mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-06 10:09:01 +00:00
As a follow-up to #3618/dc7de893747b90b627d729f9f18a758bb4dad9d5 update checkstyle to the latest version, restoring the originally intended "RightCurly" style, and updating all the code to properly adhere to the style as enforced by the new checkstyle version. The version of checkstyle we used before the aforementioned commit had a bug which didn't properly enforced our intended "RightCurly" style (see https://github.com/checkstyle/checkstyle/issues/6345). That commit changed the style to accommodate the handful of unintended style violations. This commit reverts that change for 2 main reasons: - The style was always intended to use `alone` for both `METHOD_DEF` and `CTOR_DEF`. - There are over 1,000 existing uses of the intended style and around 30 violations of this style which were unintentionally allowed. Reverting the style back to the original and cleaning up the unintented violations makes the code more consistent and prevents further style inconsistencies in the future. There were a handful of other changes related to checkstyle bugs which allowed unintended style violations. These were related to indentation levels. This closes #3619 (with some minor changes from Robbie to fix remaining violations)
112 lines
5.1 KiB
XML
112 lines
5.1 KiB
XML
<?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">
|
|
|
|
<!-- See http://checkstyle.sourceforge.net/checks.html for documentation on available checks -->
|
|
<module name="Checker">
|
|
<!-- Checks to see if a file contains a tab character. -->
|
|
<module name="FileTabCharacter">
|
|
<property name="eachLine" value="true"/>
|
|
</module>
|
|
|
|
<!-- Checks for trailing whitespace. -->
|
|
<module name="RegexpSingleline">
|
|
<!-- \s matches whitespace character, $ matches end of line. -->
|
|
<property name="format" value="\s+$"/>
|
|
<property name="message" value="Line has trailing spaces."/>
|
|
</module>
|
|
|
|
<module name="TreeWalker">
|
|
|
|
<!-- Checks for imports -->
|
|
<module name="AvoidStarImport"/>
|
|
<module name="RedundantImport"/>
|
|
<module name="UnusedImports"/>
|
|
|
|
<!-- Modifier Checks -->
|
|
<module name="ModifierOrder"/>
|
|
<module name="RedundantModifier"/>
|
|
|
|
<!-- Checks for common coding problems -->
|
|
<module name="EmptyStatement"/>
|
|
<!-- Checks that classes that override equals() also override hashCode(). -->
|
|
<module name="EqualsHashCode"/>
|
|
<!-- Checks for illegal instantiations where a factory method is preferred. -->
|
|
<module name="IllegalInstantiation"/>
|
|
|
|
<!-- Checks that long constants are defined with an upper ell. -->
|
|
<module name="UpperEll"/>
|
|
<!-- This check makes sure that all package annotations are in the package-info.java file. -->
|
|
<module name="PackageAnnotation"/>
|
|
<!-- Checks that if a class defines a covariant method equals, then it defines method equals(java.lang.Object). -->
|
|
<module name="CovariantEquals"/>
|
|
<!-- Checks the style of array type definitions. -->
|
|
<module name="ArrayTypeStyle"/>
|
|
<!-- Make sure left curly braces are on the same line. -->
|
|
<module name="LeftCurly"/>
|
|
|
|
<module name="RightCurly"/>
|
|
<module name="RightCurly">
|
|
<property name="option" value="alone"/>
|
|
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
|
|
</module>
|
|
<!-- Checks that there is no whitespace after certain tokens; e.g. "." and "!". -->
|
|
<module name="NoWhitespaceAfter"/>
|
|
<!-- Checks that there is no whitespace before certain tokens; e.g. "++" and ";". -->
|
|
<module name="NoWhitespaceBefore"/>
|
|
<!-- Checks that most tokens are surrounded by whitespace. RCURLY is omitted so we can do stuff like "new Thread(){...}.start()". -->
|
|
<module name="WhitespaceAround">
|
|
<property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND"/>
|
|
</module>
|
|
<!-- Ensure there is no space between the identifier of a method definition, constructor definition, method call, or constructor invocation and the left parenthesis of the parameter list. -->
|
|
<module name="MethodParamPad"/>
|
|
<!-- Ensure proper indentation. -->
|
|
<module name="Indentation">
|
|
<property name="basicOffset" value="3"/>
|
|
<property name="caseIndent" value="3"/>
|
|
<property name="throwsIndent" value="3"/>
|
|
<property name="arrayInitIndent" value="3"/>
|
|
<property name="lineWrappingIndentation" value="3"/>
|
|
</module>
|
|
|
|
<module name="IllegalImport">
|
|
<property name="illegalPkgs" value="junit.framework"/>
|
|
</module>
|
|
|
|
<module name="WriteTag">
|
|
<property name="tag" value="@author"/>
|
|
<property name="tagSeverity" value="error"/>
|
|
<property name="severity" value="ignore"/>
|
|
</module>
|
|
|
|
<!-- Sevntu checks, http://sevntu-checkstyle.github.io/sevntu.checkstyle/ -->
|
|
<module name="DiamondOperatorForVariableDefinition"/>
|
|
<module name="RequiredParameterForAnnotation">
|
|
<property name="annotationName" value="Parameterized.Parameters"/>
|
|
<property name="requiredParameters" value="name"/>
|
|
</module>
|
|
|
|
</module>
|
|
</module>
|