1<?xml version="1.0"?> 2<!DOCTYPE module PUBLIC 3 "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" 4 "https://checkstyle.org/dtds/configuration_1_3.dtd"> 5 6<module name="Checker"> 7 <property name="charset" value="UTF-8" /> 8 <property name="severity" value="warning" /> 9 <property name="fileExtensions" value="java" /> 10 <module name="TreeWalker"> 11 <!-- Modules for the Google Java Style guide (expect those covered by google-java-format). --> 12 <module name="OuterTypeFilename" /> 13 <module name="IllegalTokenText"> 14 <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL" /> 15 <property name="format" 16 value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)" /> 17 <property name="message" 18 value="Use special escape sequence instead of octal value or Unicode escaped value." /> 19 </module> 20 <module name="AvoidEscapedUnicodeCharacters"> 21 <property name="allowEscapesForControlCharacters" value="true" /> 22 <property name="allowByTailComment" value="true" /> 23 <property name="allowNonPrintableEscapes" value="true" /> 24 </module> 25 <module name="AvoidStarImport" /> 26 <module name="OneTopLevelClass" /> 27 <module name="EmptyBlock"> 28 <property name="option" value="TEXT" /> 29 <property name="tokens" 30 value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH" /> 31 </module> 32 <module name="NeedBraces" /> 33 <module name="MultipleVariableDeclarations" /> 34 <module name="ArrayTypeStyle" /> 35 <module name="MissingSwitchDefault" /> 36 <module name="FallThrough" /> 37 <module name="UpperEll" /> 38 <module name="PackageName"> 39 <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$" /> 40 </module> 41 <module name="TypeName" /> 42 <module name="MemberName"> 43 <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$" /> 44 </module> 45 <module name="ParameterName"> 46 <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$" /> 47 </module> 48 <module name="LambdaParameterName"> 49 <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$" /> 50 </module> 51 <module name="CatchParameterName"> 52 <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$" /> 53 </module> 54 <module name="LocalVariableName"> 55 <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$" /> 56 </module> 57 <module name="ClassTypeParameterName"> 58 <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)" /> 59 </module> 60 <module name="MethodTypeParameterName"> 61 <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)" /> 62 </module> 63 <module name="InterfaceTypeParameterName"> 64 <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)" /> 65 </module> 66 <module name="NoFinalizer" /> 67 <module name="AbbreviationAsWordInName"> 68 <property name="ignoreFinal" value="false" /> 69 <property name="allowedAbbreviationLength" value="1" /> 70 </module> 71 <module name="OverloadMethodsDeclarationOrder" /> 72 <module name="VariableDeclarationUsageDistance"> 73 <property name="allowedDistance" value="4" /> 74 </module> 75 <module name="NonEmptyAtclauseDescription" /> 76 <module name="SummaryJavadoc"> 77 <property name="forbiddenSummaryFragments" 78 value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )" /> 79 </module> 80 <module name="JavadocParagraph" /> 81 <module name="AtclauseOrder"> 82 <property name="tagOrder" value="@param, @return, @throws, @deprecated" /> 83 <property name="target" 84 value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF" /> 85 </module> 86 <module name="JavadocMethod"> 87 <property name="scope" value="public" /> 88 <property name="allowMissingParamTags" value="true" /> 89 <property name="allowMissingReturnTag" value="true" /> 90 <property name="allowedAnnotations" 91 value="Override,BeforeEach,Test,ParameterizedTest,Setup,Benchmark" /> 92 </module> 93 <module name="MethodName"> 94 <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$" /> 95 </module> 96 <module name="SingleLineJavadoc"> 97 <property name="ignoredTags" value="@code,@link,@literal" /> 98 <property name="ignoreInlineTags" value="false" /> 99 </module> 100 <module name="EmptyCatchBlock"> 101 <property name="exceptionVariableName" value="expected" /> 102 </module> 103 104 <!-- Additional modules, not related to the Google Java Style guide. --> 105 <module name="AvoidNestedBlocks"> 106 <property name="allowInSwitchCase" value="true" /> 107 </module> 108 <module name="HideUtilityClassConstructor" /> 109 <module name="InnerTypeLast" /> 110 <module name="InterfaceIsType" /> 111 <module name="MutableException" /> 112 <module name="ThrowsCount" /> 113 <module name="CovariantEquals" /> 114 <module name="DeclarationOrder"> 115 <property name="ignoreModifiers" value="true" /> 116 </module> 117 <module name="DefaultComesLast" /> 118 <module name="EmptyStatement" /> 119 <module name="EqualsHashCode" /> 120 <module name="ExplicitInitialization" /> 121 <module name="IllegalCatch" /> 122 <module name="IllegalThrows" /> 123 <module name="IllegalType"> 124 <property name="illegalClassNames" 125 value="ArrayList,LinkedList,HashSet,TreeSet,LinkedHashSet,HashMap,TreeMap,LinkedHashMap" /> 126 <property name="memberModifiers" value="LITERAL_PUBLIC,LITERAL_PROTECTED" /> 127 </module> 128 <module name="JavadocStyle" /> 129 <module name="ModifiedControlVariable" /> 130 <module name="NoClone" /> 131 <module name="SimplifyBooleanExpression" /> 132 <module name="SimplifyBooleanReturn" /> 133 <module name="StringLiteralEquality" /> 134 <module name="FinalClass" /> 135 <module name="FinalParameters" /> 136 137 <!-- Module allowing to suppress warnings with DontCheck(...) comments. --> 138 <module name="SuppressWithNearbyCommentFilter"> 139 <property name="commentFormat" value="DontCheck\((\w+)\)" /> 140 <property name="checkFormat" value="$1" /> 141 <property name="influenceFormat" value="1" /> 142 </module> 143 <module name="SuppressWithNearbyCommentFilter"> 144 <property name="commentFormat" value="DontCheck\(IllegalCatch\)" /> 145 <property name="checkFormat" value="IllegalCatch" /> 146 <property name="influenceFormat" value="-1" /> 147 </module> 148 </module> 149</module> 150