2014-11-14 19:27:39 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE module PUBLIC
|
|
|
|
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
2019-07-23 02:22:32 +00:00
|
|
|
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
2014-11-14 19:27:39 +00:00
|
|
|
<module name="Checker">
|
|
|
|
<!-- Tabs are strictly banned -->
|
|
|
|
<module name="FileTabCharacter"/>
|
2019-03-11 04:02:51 +00:00
|
|
|
<module name="SuppressWarningsFilter" />
|
2014-11-14 19:27:39 +00:00
|
|
|
<module name="TreeWalker">
|
2019-03-11 04:02:51 +00:00
|
|
|
<module name="SuppressWarningsHolder" /> <!-- allows for @SuppressWarnings annotation -->
|
2014-11-14 19:27:39 +00:00
|
|
|
<!-- Important basics -->
|
|
|
|
<!-- <module name="PackageDeclaration"/> Unlikely that we would miss this in a PR -->
|
|
|
|
<module name="OuterTypeFilename"/> <!-- TypeName -> TypeName.java -->
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Control package usage, so people don't insert Bukkit into WE where it shouldn't belong, etc.
|
|
|
|
It is a bit draconian, so update as necessary!
|
|
|
|
-->
|
2019-07-23 02:22:32 +00:00
|
|
|
<!--
|
2014-11-14 19:27:39 +00:00
|
|
|
<module name="ImportControl">
|
2019-07-23 02:22:32 +00:00
|
|
|
<property name="file" value="import-control.xml"/>
|
2014-11-14 19:27:39 +00:00
|
|
|
</module>
|
2019-07-23 02:22:32 +00:00
|
|
|
-->
|
2014-11-14 19:27:39 +00:00
|
|
|
|
|
|
|
<!-- Code -->
|
|
|
|
<module name="HideUtilityClassConstructor"/> <!-- Utility classes should not have a constructor -->
|
|
|
|
<module name="CovariantEquals"/>
|
|
|
|
<module name="EqualsHashCode"/> <!-- equals() and hashCode() go together -->
|
|
|
|
<module name="NestedTryDepth"> <!-- SHOULD not need to adjust this -->
|
|
|
|
<property name="max" value="2"/>
|
|
|
|
</module>
|
|
|
|
<module name="SuperFinalize"/> <!-- We don't actually use this -->
|
|
|
|
|
|
|
|
<!-- Style -->
|
|
|
|
<module name="LeftCurly"> <!-- Left brace never goes on another line -->
|
|
|
|
<property name="option" value="eol"/>
|
|
|
|
</module> <!-- We don't check right brance -->
|
|
|
|
<module name="DefaultComesLast"/> <!-- default case in switch should be last -->
|
|
|
|
<module name="GenericWhitespace"/>
|
|
|
|
|
|
|
|
<!-- Naming -->
|
|
|
|
<module name="ClassTypeParameterName">
|
|
|
|
<property name="format" value="^[A-Z][a-zA-Z0-9]*$"/>
|
|
|
|
</module>
|
|
|
|
<module name="LocalFinalVariableName"/>
|
|
|
|
<module name="LocalVariableName">
|
|
|
|
<property name="format" value="^[a-z_][a-zA-Z0-9]*$"/>
|
|
|
|
</module>
|
|
|
|
<module name="MemberName">
|
|
|
|
<property name="format" value="^[a-z_][a-zA-Z0-9]*$"/>
|
|
|
|
</module>
|
|
|
|
<module name="MethodName">
|
|
|
|
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
|
|
|
|
</module>
|
|
|
|
<!-- <module name="PackageName"/> Unlikely that we would miss this in a PR -->
|
|
|
|
<module name="ParameterName"/>
|
|
|
|
<!-- <module name="TypeName"/> Unlikely that we would miss this in a PR -->
|
2019-06-27 01:36:35 +00:00
|
|
|
<!-- Validate assignment operators -->
|
|
|
|
<module name="WhitespaceAround">
|
|
|
|
<property name="tokens" value="ASSIGN"/>
|
|
|
|
</module>
|
|
|
|
<!-- Validate String.to(Lower|Upper)Case() calls include Locale argument -->
|
|
|
|
<module name="Regexp">
|
|
|
|
<property name="message" value="Case-conversion calls must include an explicit Locale"/>
|
|
|
|
<property name="format" value="(?!Character)\.to(Lower|Upper)Case\(\)"/>
|
|
|
|
<property name="illegalPattern" value="true"/>
|
|
|
|
</module>
|
|
|
|
</module>
|
|
|
|
<!-- Validate that command annotations are formatted correctly -->
|
|
|
|
<module name="RegexpMultiline">
|
|
|
|
<property name="format" value="^( +)@(Arg|Switch|Command)\(.*?\n\1 {5,}"/>
|
2014-11-14 19:27:39 +00:00
|
|
|
</module>
|
2017-08-02 06:01:12 +00:00
|
|
|
</module>
|