activemq-artemis/etc/checkstyle.xml

114 lines
5.4 KiB
XML
Raw Normal View History

<?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.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!-- See http://checkstyle.sourceforge.net/availablechecks.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 for redundant exceptions declared in throws clause such as duplicates, unchecked exceptions or subclasses of another declared exception. -->
<module name="RedundantThrows">
<property name="allowUnchecked" value="true"/>
</module>
<!-- 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 a new line. Note, this is not the recommendation from Sun. It is a legacy preference. -->
<module name="LeftCurly">
<property name="option" value="nl"/>
</module>
<!-- Make sure right curly braces are on a new line by itself. Note, this is not the recommendation from Sun. It is a legacy preference. -->
<module name="RightCurly">
<property name="option" value="alone"/>
</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"/>
</module>
2014-11-10 11:14:12 -05:00
<module name="IllegalImport">
<property name="illegalPkgs" value="junit.framework"/>
</module>
<!-- TODO: Where to place this now? -->
2014-11-10 11:14:12 -05:00
<!-- developed at https://github.com/hornetq/hornetq-checkstyle-checks -->
<module name="org.hornetq.checks.annotation.RequiredAnnotation">
<property name="annotationName" value="Parameters"/>
<property name="requiredParameters" value="name"/>
</module>
2015-03-10 15:28:20 -04:00
<module name="WriteTag">
<property name="tag" value="@author"/>
<property name="tagSeverity" value="error"/>
<property name="severity" value="ignore"/>
</module>
</module>
</module>