blob: 0786caf144d847720d2fda92abe9780a516f6096 [file] [log] [blame] [raw]
<?xml version="1.0"?>
<!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"/>
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf"/>
</module>
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="TreeWalker">
<property name="tabWidth" value="4"/>
<!-- Code -->
<module name="NoFinalizer"/>
<module name="ArrayTypeStyle"/>
<module name="FallThrough"/>
<module name="OuterTypeFilename"/>
<module name="UpperEll"/>
<module name="ModifierOrder"/>
<module name="SimplifyBooleanReturn"/>
<module name="SimplifyBooleanExpression"/>
<module name="StringLiteralEquality"/>
<module name="DefaultComesLast"/>
<module name="RedundantModifier"/>
<!-- Imports -->
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="IllegalImport">
<property name="illegalPkgs" value="net.minecraft.server, org.bukkit.craftbukkit"/>
</module>
<module name="IllegalTokenText">
<!-- Avoid unicode literals for characters with escapes -->
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
<property name="format"
value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
<property name="message" value="Avoid using corresponding octal or Unicode escape."/>
</module>
<!-- Blocks -->
<module name="LeftCurly"/>
<module name="RightCurly"/>
<module name="RightCurly">
<!-- For these tokens, the brace should be on its own line -->
<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>
<module name="EmptyBlock">
<property name="option" value="TEXT"/>
<property name="tokens"
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
</module>
<!-- Whitespace -->
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="MethodParamPad"/>
<module name="WhitespaceAfter"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore">
<property name="allowLineBreaks" value="true"/>
</module>
<module name="GenericWhitespace">
<message key="ws.followed" value="GenericWhitespace ''{0}'' is followed by whitespace."/>
<message key="ws.preceded" value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
<message key="ws.illegalFollow" value="GenericWhitespace ''{0}'' should followed by whitespace."/>
<message key="ws.notPreceded" value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<!--<property name="allowEmptyTypes" value="true"/>-->
<!--<property name="allowEmptyLoops" value="true"/>-->
<message key="ws.notFollowed" value="WhitespaceAround: ''{0}'' is not followed by whitespace."/>
<message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
<!-- RCURLY exempted due to incorrect checking on annotation array literals -->
<!-- See @ToString in GlowOfflinePlayer and MetadataMap -->
<property name="tokens"
value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR,
BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN,
DO_WHILE, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT,
LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY,
LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH,
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>
<!-- Naming conventions -->
<module name="ClassTypeParameterName">
<message key="name.invalidPattern" value="Class type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="LocalFinalVariableName">
<message key="name.invalidPattern" value="Local final variable name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="LocalVariableName">
<message key="name.invalidPattern" value="Local variable name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MemberName">
<message key="name.invalidPattern" value="Member name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-zA-Z0-9_]*$"/>
<message key="name.invalidPattern" value="Method name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MethodTypeParameterName">
<message key="name.invalidPattern" value="Method type parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
<message key="name.invalidPattern" value="Package name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ParameterName">
<message key="name.invalidPattern" value="Parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="TypeName">
<message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
</module>
<!-- Checks that the code doesn't yet pass -->
<!--<module name="AvoidStarImport"/>-->
<!--<module name="NeedBraces"/>-->
<!--<module name="MissingSwitchDefault"/>-->
<!--<module name="OneStatementPerLine"/>-->
<!--<module name="Indentation"/>-->
<!-- Checks in future checkstyle versions -->
<!--<module name="OneTopLevelClass"/>-->
<!--<module name="NoLineWrap"/>-->
<!--<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>
</module>-->
<!--<module name="OverloadMethodsDeclarationOrder"/>-->
<!--<module name="VariableDeclarationUsageDistance"/>-->
<!--<module name="AbbreviationAsWordInName">
<property name="ignoreFinal" value="false"/>
<property name="allowedAbbreviationLength" value="1"/>
</module>-->
<!--<module name="CustomImportOrder">
<property name="thirdPartyPackageRegExp" value=".*"/>
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
</module>-->
</module>
</module>