2019-06-07 23:28:03 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE module PUBLIC
|
|
|
|
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
|
|
|
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
|
|
|
<module name="Checker">
|
|
|
|
<property name="tabWidth" value="4"/>
|
|
|
|
<property name="charset" value="UTF-8" />
|
|
|
|
|
|
|
|
<module name="SuppressionFilter">
|
2021-01-08 16:16:56 +00:00
|
|
|
<property name="file" value="${config_loc}/suppressions.xml" />
|
2019-06-07 23:28:03 +00:00
|
|
|
</module>
|
|
|
|
|
2020-01-22 11:14:30 +00:00
|
|
|
<module name="BeforeExecutionExclusionFileFilter">
|
|
|
|
<property name="fileNamePattern" value="render_old"/>
|
|
|
|
</module>
|
|
|
|
|
2019-06-07 23:28:03 +00:00
|
|
|
<module name="TreeWalker">
|
|
|
|
<!-- Annotations -->
|
|
|
|
<module name="AnnotationLocation" />
|
|
|
|
<module name="AnnotationUseStyle" />
|
2019-10-27 15:16:47 +00:00
|
|
|
<module name="MissingDeprecated" />
|
2019-06-07 23:28:03 +00:00
|
|
|
<module name="MissingOverride" />
|
|
|
|
|
|
|
|
<!-- Blocks -->
|
|
|
|
<module name="EmptyBlock" />
|
|
|
|
<module name="EmptyCatchBlock">
|
|
|
|
<property name="exceptionVariableName" value="ignored" />
|
|
|
|
</module>
|
|
|
|
<module name="LeftCurly">
|
|
|
|
<property name="option" value="nl" />
|
|
|
|
<!-- The defaults, minus lambdas. -->
|
|
|
|
<property name="tokens" value="ANNOTATION_DEF,CLASS_DEF,CTOR_DEF,ENUM_CONSTANT_DEF,ENUM_DEF,INTERFACE_DEF,LITERAL_CASE,LITERAL_CATCH,LITERAL_DEFAULT,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_SWITCH,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,METHOD_DEF,OBJBLOCK,STATIC_INIT" />
|
|
|
|
</module>
|
|
|
|
<module name="NeedBraces">
|
|
|
|
<property name="allowSingleLineStatement" value="true"/>
|
|
|
|
</module>
|
|
|
|
<module name="RightCurly">
|
|
|
|
<property name="option" value="alone" />
|
|
|
|
</module>
|
|
|
|
|
|
|
|
<!-- Class design. As if we've ever followed good practice here. -->
|
|
|
|
<module name="FinalClass" />
|
|
|
|
<module name="InterfaceIsType" />
|
|
|
|
<module name="MutableException" />
|
|
|
|
<module name="OneTopLevelClass" />
|
|
|
|
|
|
|
|
<!-- Coding -->
|
|
|
|
<module name="ArrayTrailingComma" />
|
|
|
|
<module name="EqualsHashCode" />
|
|
|
|
<!-- FallThrough does not handle unreachable code well -->
|
|
|
|
<module name="IllegalInstantiation" />
|
|
|
|
<module name="IllegalThrows" />
|
|
|
|
<module name="ModifiedControlVariable" />
|
|
|
|
<module name="NoClone" />
|
|
|
|
<module name="NoFinalizer" />
|
|
|
|
<module name="OneStatementPerLine" />
|
|
|
|
<module name="PackageDeclaration" />
|
|
|
|
<module name="SimplifyBooleanExpression" />
|
|
|
|
<module name="SimplifyBooleanReturn" />
|
|
|
|
<module name="StringLiteralEquality" />
|
2021-08-08 11:44:56 +00:00
|
|
|
<module name="UnnecessaryParentheses">
|
|
|
|
<!-- Default minus LAND. -->
|
|
|
|
<property name="tokens" value="EXPR,IDENT,NUM_DOUBLE,NUM_FLOAT,NUM_INT,NUM_LONG,STRING_LITERAL,LITERAL_NULL,LITERAL_FALSE,LITERAL_TRUE,ASSIGN,BAND_ASSIGN,BOR_ASSIGN,BSR_ASSIGN,BXOR_ASSIGN,DIV_ASSIGN,MINUS_ASSIGN,MOD_ASSIGN,PLUS_ASSIGN,SL_ASSIGN,SR_ASSIGN,STAR_ASSIGN,LAMBDA,TEXT_BLOCK_LITERAL_BEGIN,LITERAL_INSTANCEOF,GT,LT,GE,LE,EQUAL,NOT_EQUAL,UNARY_MINUS,UNARY_PLUS,INC,DEC,LNOT,BNOT,POST_INC,POST_DEC" />
|
|
|
|
</module>
|
2019-10-27 15:16:47 +00:00
|
|
|
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration" />
|
|
|
|
<module name="UnnecessarySemicolonInTryWithResources" />
|
|
|
|
<module name="UnnecessarySemicolonInEnumeration" />
|
2019-06-07 23:28:03 +00:00
|
|
|
|
|
|
|
<!-- Imports -->
|
2021-08-08 11:44:56 +00:00
|
|
|
<module name="CustomImportOrder">
|
|
|
|
<property name="customImportOrderRules"
|
|
|
|
value="THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE###STATIC"
|
|
|
|
/>
|
|
|
|
</module>
|
2019-06-07 23:28:03 +00:00
|
|
|
<module name="IllegalImport" />
|
|
|
|
<module name="RedundantImport" />
|
|
|
|
<module name="UnusedImports" />
|
|
|
|
|
|
|
|
<!-- Javadoc -->
|
2019-10-27 15:16:47 +00:00
|
|
|
<!-- TODO: Missing* checks for the dan200.computercraft.api package? -->
|
2019-06-07 23:28:03 +00:00
|
|
|
<module name="AtclauseOrder" />
|
2019-10-27 15:16:47 +00:00
|
|
|
<module name="InvalidJavadocPosition" />
|
|
|
|
<module name="JavadocBlockTagLocation" />
|
|
|
|
<module name="JavadocMethod"/>
|
|
|
|
<module name="JavadocType"/>
|
|
|
|
<module name="JavadocStyle" />
|
2019-06-07 23:28:03 +00:00
|
|
|
<module name="NonEmptyAtclauseDescription" />
|
|
|
|
<module name="SingleLineJavadoc" />
|
2019-10-27 15:16:47 +00:00
|
|
|
<module name="SummaryJavadocCheck"/>
|
2019-06-07 23:28:03 +00:00
|
|
|
|
|
|
|
<!-- Misc -->
|
|
|
|
<module name="ArrayTypeStyle" />
|
|
|
|
<module name="CommentsIndentation" />
|
|
|
|
<module name="Indentation" />
|
|
|
|
<module name="OuterTypeFilename" />
|
|
|
|
|
|
|
|
<!-- Modifiers -->
|
|
|
|
<module name="ModifierOrder" />
|
|
|
|
<module name="RedundantModifier" />
|
|
|
|
|
|
|
|
<!-- Naming -->
|
|
|
|
<module name="ClassTypeParameterName" />
|
|
|
|
<module name="InterfaceTypeParameterName" />
|
|
|
|
<module name="LambdaParameterName" />
|
|
|
|
<module name="LocalFinalVariableName" />
|
|
|
|
<module name="LocalVariableName" />
|
2021-01-15 16:35:49 +00:00
|
|
|
<module name="MemberName" />
|
2019-06-07 23:28:03 +00:00
|
|
|
<module name="MethodName" />
|
|
|
|
<module name="MethodTypeParameterName" />
|
|
|
|
<module name="PackageName">
|
2021-01-15 16:35:49 +00:00
|
|
|
<property name="format" value="^dan200\.computercraft(\.[a-z][a-z0-9]*)*" />
|
2019-06-07 23:28:03 +00:00
|
|
|
</module>
|
|
|
|
<module name="ParameterName" />
|
|
|
|
<module name="StaticVariableName">
|
2020-05-15 16:09:12 +00:00
|
|
|
<property name="format" value="^[a-z][a-zA-Z0-9]*|CAPABILITY(_[A-Z_]+)?$" />
|
2019-06-07 23:28:03 +00:00
|
|
|
<property name="applyToPrivate" value="false" />
|
|
|
|
</module>
|
|
|
|
<module name="StaticVariableName">
|
2020-05-15 16:09:12 +00:00
|
|
|
<property name="format" value="^(s_)?[a-z][a-zA-Z0-9]*|CAPABILITY(_[A-Z_]+)?$" />
|
2019-06-07 23:28:03 +00:00
|
|
|
<property name="applyToPrivate" value="true" />
|
|
|
|
</module>
|
|
|
|
<module name="TypeName" />
|
|
|
|
|
|
|
|
<!-- Whitespace -->
|
|
|
|
<module name="EmptyForInitializerPad"/>
|
|
|
|
<module name="EmptyForIteratorPad">
|
|
|
|
<property name="option" value="space"/>
|
|
|
|
</module>
|
|
|
|
<module name="GenericWhitespace" />
|
|
|
|
<module name="MethodParamPad" />
|
|
|
|
<module name="NoLineWrap" />
|
|
|
|
<module name="NoWhitespaceAfter">
|
|
|
|
<property name="tokens" value="AT,INC,DEC,UNARY_MINUS,UNARY_PLUS,BNOT,LNOT,DOT,ARRAY_DECLARATOR,INDEX_OP" />
|
|
|
|
</module>
|
|
|
|
<module name="NoWhitespaceBefore" />
|
|
|
|
<!-- TODO: Decide on an OperatorWrap style. -->
|
|
|
|
<module name="ParenPad">
|
|
|
|
<property name="option" value="space" />
|
|
|
|
<property name="tokens" value="ANNOTATION,ANNOTATION_FIELD_DEF,CTOR_CALL,CTOR_DEF,ENUM_CONSTANT_DEF,LITERAL_CATCH,LITERAL_DO,LITERAL_FOR,LITERAL_IF,LITERAL_NEW,LITERAL_SWITCH,LITERAL_SYNCHRONIZED,LITERAL_WHILE,METHOD_CALL,METHOD_DEF,RESOURCE_SPECIFICATION,SUPER_CTOR_CALL,LAMBDA" />
|
|
|
|
</module>
|
|
|
|
<module name="ParenPad">
|
|
|
|
<property name="option" value="nospace" />
|
|
|
|
<property name="tokens" value="DOT,EXPR,QUESTION" />
|
|
|
|
</module>
|
|
|
|
<module name="SeparatorWrap">
|
|
|
|
<property name="option" value="eol" />
|
|
|
|
<property name="tokens" value="COMMA,SEMI,ELLIPSIS,ARRAY_DECLARATOR,RBRACK,METHOD_REF" />
|
|
|
|
</module>
|
|
|
|
<module name="SeparatorWrap">
|
|
|
|
<property name="option" value="nl" />
|
|
|
|
<property name="tokens" value="DOT,AT" />
|
|
|
|
</module>
|
|
|
|
<module name="SingleSpaceSeparator" />
|
|
|
|
<module name="TypecastParenPad" />
|
|
|
|
<module name="WhitespaceAfter">
|
|
|
|
<property name="tokens" value="COMMA" />
|
|
|
|
</module>
|
|
|
|
<module name="WhitespaceAround">
|
|
|
|
<property name="ignoreEnhancedForColon" value="false" />
|
2021-11-21 11:19:02 +00:00
|
|
|
<!-- Allow empty functions -->
|
|
|
|
<property name="allowEmptyLambdas" value="true" />
|
|
|
|
<property name="allowEmptyMethods" value="true" />
|
2019-06-07 23:28:03 +00:00
|
|
|
<property name="allowEmptyConstructors" value="true" />
|
2021-10-06 17:28:28 +00:00
|
|
|
<property name="allowEmptyTypes" value="true" />
|
2021-11-21 11:19:02 +00:00
|
|
|
|
2019-06-09 08:07:31 +00:00
|
|
|
<property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAMBDA,LAND,LCURLY,LE,LITERAL_RETURN,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND" />
|
2019-06-07 23:28:03 +00:00
|
|
|
</module>
|
|
|
|
</module>
|
|
|
|
|
|
|
|
<module name="FileTabCharacter" />
|
|
|
|
<module name="NewlineAtEndOfFile" />
|
2019-10-16 08:22:38 +00:00
|
|
|
<module name="RegexpSingleline">
|
|
|
|
<property name="format" value="\s+$"/>
|
|
|
|
<property name="message" value="Trailing whitespace"/>
|
|
|
|
</module>
|
2019-06-07 23:28:03 +00:00
|
|
|
</module>
|