PaperMC/paper-api/checkstyle.xml
2024-06-03 07:18:14 +10:00

107 lines
4.4 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<!-- See http://checkstyle.sourceforge.net/config_misc.html#NewlineAtEndOfFile -->
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf_cr_crlf"/>
</module>
<!-- See http://checkstyle.sourceforge.net/config_whitespace.html -->
<module name="FileTabCharacter"/>
<!-- See http://checkstyle.sourceforge.net/config_misc.html -->
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Line has trailing spaces."/>
</module>
<!-- See https://checkstyle.sourceforge.io/config_javadoc.html#JavadocPackage-->
<module name="JavadocPackage"/>
<module name="SuppressionSingleFilter">
<property name="message" value="'(implNote|implSpec|apiNote)'\."/>
</module>
<!-- Don't check for missing package-info in tests -->
<module name="SuppressionSingleFilter">
<property name="checks" value="JavadocPackage"/>
<property name="files" value=".*[\\/]src[\\/]test[\\/].*\.java$"/>
</module>
<!-- See SPIGOT-7676: Enforce Locale, to prevent issues with turkish 'I' and similar -->
<module name="RegexpSingleline">
<property name="format" value="\.toUpperCase\(\s*\)" />
<property name="message" value="Use toUpperCase(Locale.ROOT) instead of toUpperCase()" />
</module>
<module name="RegexpSingleline">
<property name="format" value="\.toLowerCase\(\s*\)" />
<property name="message" value="Use toLowerCase(Locale.ROOT) instead of toLowerCase()" />
</module>
<module name="TreeWalker">
<!-- See https://checkstyle.org/config_javadoc.html -->
<module name="AtclauseOrder"/>
<module name="InvalidJavadocPosition"/>
<module name="JavadocBlockTagLocation"/>
<module name="JavadocContentLocationCheck"/>
<module name="JavadocMethod"/>
<module name="JavadocType"/>
<module name="MissingJavadocPackage"/>
<module name="NonEmptyAtclauseDescription"/>
<!-- See http://checkstyle.sourceforge.net/config_filters.html -->
<module name="SuppressionCommentFilter"/>
<!-- See http://checkstyle.sourceforge.net/config_imports.html -->
<module name="AvoidStarImport">
<property name="allowStaticMemberImports" value="true"/>
</module>
<module name="ImportOrder">
<property name="option" value="above"/>
<property name="ordered" value="true"/>
<property name="separatedStaticGroups" value="true"/>
<property name="sortStaticImportsAlphabetically" value="true"/>
</module>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<!-- See https://checkstyle.org/config_whitespace.html -->
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoLineWrap"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore">
<property name="allowLineBreaks" value="true"/>
</module>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="SingleSpaceSeparator"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="allowEmptyCatches" value="true"/>
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
</module>
<!-- See http://checkstyle.sourceforge.net/config_modifiers.html -->
<module name="ModifierOrder"/>
<!-- See https://checkstyle.org/config_blocks.html -->
<module name="AvoidNestedBlocks"/>
<module name="LeftCurly"/>
<module name="RightCurly"/>
<!-- See http://checkstyle.sourceforge.net/config_design.html -->
<module name="FinalClass"/>
<!-- See http://checkstyle.sourceforge.net/config_misc.html -->
<module name="ArrayTypeStyle"/>
<module name="UpperEll"/>
</module>
</module>