|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!DOCTYPE module PUBLIC |
| 3 | + "-//Puppy Crawl//DTD Check Configuration 1.3//EN" |
| 4 | + "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> |
| 5 | +<module name="Checker"> |
| 6 | + <!-- Tabs are strictly banned --> |
| 7 | + <module name="FileTabCharacter"/> |
| 8 | + |
| 9 | + <module name="TreeWalker"> |
| 10 | + <!-- Important basics --> |
| 11 | + <!-- <module name="PackageDeclaration"/> Unlikely that we would miss this in a PR --> |
| 12 | + <module name="OuterTypeFilename"/> <!-- TypeName -> TypeName.java --> |
| 13 | + |
| 14 | + <!-- |
| 15 | + Control package usage, so people don't insert Bukkit into WE where it shouldn't belong, etc. |
| 16 | + It is a bit draconian, so update as necessary! |
| 17 | + --> |
| 18 | + <module name="ImportControl"> |
| 19 | + <property name="file" value="worldguard-core/config/checkstyle/import-control.xml"/> |
| 20 | + </module> |
| 21 | + |
| 22 | + <!-- Code --> |
| 23 | + <module name="HideUtilityClassConstructor"/> <!-- Utility classes should not have a constructor --> |
| 24 | + <module name="CovariantEquals"/> |
| 25 | + <module name="EqualsHashCode"/> <!-- equals() and hashCode() go together --> |
| 26 | + <module name="NestedTryDepth"> <!-- SHOULD not need to adjust this --> |
| 27 | + <property name="max" value="2"/> |
| 28 | + </module> |
| 29 | + <module name="SuperFinalize"/> <!-- We don't actually use this --> |
| 30 | + |
| 31 | + <!-- Style --> |
| 32 | + <module name="LeftCurly"> <!-- Left brace never goes on another line --> |
| 33 | + <property name="option" value="eol"/> |
| 34 | + </module> <!-- We don't check right brace --> |
| 35 | + <module name="DefaultComesLast"/> <!-- default case in switch should be last --> |
| 36 | + <module name="GenericWhitespace"/> |
| 37 | + |
| 38 | + <!-- Naming --> |
| 39 | + <module name="ClassTypeParameterName"> |
| 40 | + <property name="format" value="^[A-Z][a-zA-Z0-9]*$"/> |
| 41 | + </module> |
| 42 | + <module name="LocalFinalVariableName"/> |
| 43 | + <module name="LocalVariableName"> |
| 44 | + <property name="format" value="^[a-z_][a-zA-Z0-9]*$"/> |
| 45 | + </module> |
| 46 | + <module name="MemberName"> |
| 47 | + <property name="format" value="^[a-z_][a-zA-Z0-9]*$"/> |
| 48 | + </module> |
| 49 | + <module name="MethodName"> |
| 50 | + <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> |
| 51 | + </module> |
| 52 | + <!-- <module name="PackageName"/> Unlikely that we would miss this in a PR --> |
| 53 | + <module name="ParameterName"/> |
| 54 | + <!-- <module name="TypeName"/> Unlikely that we would miss this in a PR --> |
| 55 | + </module> |
| 56 | + |
| 57 | + <!-- Require the header, something that many people forget and we hate to fix --> |
| 58 | + <!-- You should configure the header in your IDE --> |
| 59 | + <module name="Header"> |
| 60 | + <property name="headerFile" value="config/checkstyle/header.txt"/> |
| 61 | + <property name="fileExtensions" value="java"/> |
| 62 | + </module> |
| 63 | +</module> |
0 commit comments