Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | <!-- |
| 3 | Copyright (c) 2016 Huawei Technologies Co., Ltd. |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 4 | Modifications Copyright (C) 2019-2020 Nordix Foundation. |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 5 | |
| 6 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | you may not use this file except in compliance with the License. |
| 8 | You may obtain a copy of the License at |
| 9 | |
| 10 | http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | |
| 12 | Unless required by applicable law or agreed to in writing, software |
| 13 | distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | See the License for the specific language governing permissions and |
| 16 | limitations under the License. |
| 17 | --> |
| 18 | <!DOCTYPE module PUBLIC |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 19 | "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" |
| 20 | "https://checkstyle.org/dtds/configuration_1_3.dtd"> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 21 | |
| 22 | <!-- |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 23 | Checkstyle configuration that checks the Google coding conventions from Google Java Style |
| 24 | that can be found at https://google.github.io/styleguide/javaguide.html |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 25 | |
| 26 | Checkstyle is very configurable. Be sure to read the documentation at |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 27 | http://checkstyle.org (or in your downloaded distribution). |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 28 | |
| 29 | To completely disable a check, just comment it out or delete it from the file. |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 30 | To suppress certain violations please review suppression filters. |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 31 | |
| 32 | Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov. |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 33 | --> |
| 34 | |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 35 | <!-- |
| 36 | To update the checkstyle version in ONAP see: |
| 37 | https://wiki.onap.org/display/DW/How+to+update+ONAP+checkstyle+when+Checkstyle+steps+their+version |
| 38 | --> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 39 | |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 40 | <module name="Checker"> |
| 41 | <property name="charset" value="UTF-8" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 42 | |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 43 | <property name="severity" value="warning" /> |
| 44 | |
| 45 | <property name="fileExtensions" value="java, properties, xml" /> |
| 46 | <!-- Excludes all 'module-info.java' files --> |
| 47 | <!-- See https://checkstyle.org/config_filefilters.html --> |
| 48 | <module name="BeforeExecutionExclusionFileFilter"> |
| 49 | <property name="fileNamePattern" value="module\-info\.java$" /> |
| 50 | </module> |
| 51 | <!-- https://checkstyle.org/config_filters.html#SuppressionFilter --> |
| 52 | <module name="SuppressionFilter"> |
| 53 | <property name="file" value="${org.checkstyle.google.suppressionfilter.config}" |
| 54 | default="checkstyle-suppressions.xml" /> |
| 55 | <property name="optional" value="true" /> |
| 56 | </module> |
| 57 | |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 58 | <!-- Checks for whitespace --> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 59 | <!-- See http://checkstyle.org/config_whitespace.html --> |
| 60 | <module name="FileTabCharacter"> |
| 61 | <property name="eachLine" value="true" /> |
| 62 | </module> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 63 | |
liamfallon | 5a4892d | 2019-12-06 13:21:21 +0000 | [diff] [blame] | 64 | <module name="LineLength"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 65 | <property name="fileExtensions" value="java" /> |
| 66 | <property name="max" value="120" /> |
| 67 | <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://" /> |
liamfallon | 5a4892d | 2019-12-06 13:21:21 +0000 | [diff] [blame] | 68 | </module> |
| 69 | |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 70 | <module name="TreeWalker"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 71 | <module name="OuterTypeFilename" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 72 | <module name="IllegalTokenText"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 73 | <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL" /> |
| 74 | <property name="format" |
| 75 | 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)" /> |
| 76 | <property name="message" |
| 77 | value="Consider using special escape sequence instead of octal value or Unicode escaped value." /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 78 | </module> |
| 79 | <module name="AvoidEscapedUnicodeCharacters"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 80 | <property name="allowEscapesForControlCharacters" value="true" /> |
| 81 | <property name="allowByTailComment" value="true" /> |
| 82 | <property name="allowNonPrintableEscapes" value="true" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 83 | </module> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 84 | <module name="AvoidStarImport" /> |
| 85 | <module name="OneTopLevelClass" /> |
| 86 | <module name="NoLineWrap"> |
| 87 | <property name="tokens" value="PACKAGE_DEF, IMPORT, STATIC_IMPORT" /> |
| 88 | </module> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 89 | <module name="EmptyBlock"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 90 | <property name="option" value="TEXT" /> |
| 91 | <property name="tokens" |
| 92 | value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 93 | </module> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 94 | <module name="NeedBraces"> |
| 95 | <property name="tokens" value="LITERAL_DO, LITERAL_ELSE, LITERAL_FOR, LITERAL_IF, LITERAL_WHILE" /> |
| 96 | </module> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 97 | <module name="LeftCurly"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 98 | <property name="tokens" |
| 99 | value="ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_CONSTANT_DEF, ENUM_DEF, |
| 100 | INTERFACE_DEF, LAMBDA, LITERAL_CASE, LITERAL_CATCH, LITERAL_DEFAULT, |
| 101 | LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, |
| 102 | LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, METHOD_DEF, |
| 103 | OBJBLOCK, STATIC_INIT" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 104 | </module> |
| 105 | <module name="RightCurly"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 106 | <property name="id" value="RightCurlySame" /> |
| 107 | <property name="tokens" |
| 108 | value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, |
| 109 | LITERAL_DO" /> |
| 110 | </module> |
| 111 | <module name="RightCurly"> |
| 112 | <property name="id" value="RightCurlyAlone" /> |
| 113 | <property name="option" value="alone" /> |
| 114 | <property name="tokens" |
| 115 | value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, |
| 116 | INSTANCE_INIT, ANNOTATION_DEF, ENUM_DEF" /> |
| 117 | </module> |
| 118 | <module name="SuppressionXpathSingleFilter"> |
| 119 | <!-- suppresion is required till https://github.com/checkstyle/checkstyle/issues/7541 --> |
| 120 | <property name="id" value="RightCurlyAlone" /> |
| 121 | <property name="query" |
| 122 | value="//RCURLY[parent::SLIST[count(./*)=1] |
| 123 | or preceding-sibling::*[last()][self::LCURLY]]" /> |
| 124 | </module> |
| 125 | <module name="WhitespaceAfter"> |
| 126 | <property name="tokens" |
| 127 | value="COMMA, SEMI, TYPECAST, LITERAL_IF, LITERAL_ELSE, |
| 128 | LITERAL_WHILE, LITERAL_DO, LITERAL_FOR, DO_WHILE" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 129 | </module> |
| 130 | <module name="WhitespaceAround"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 131 | <property name="allowEmptyConstructors" value="true" /> |
| 132 | <property name="allowEmptyLambdas" value="true" /> |
| 133 | <property name="allowEmptyMethods" value="true" /> |
| 134 | <property name="allowEmptyTypes" value="true" /> |
| 135 | <property name="allowEmptyLoops" value="true" /> |
| 136 | <property name="tokens" |
| 137 | value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, |
| 138 | BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAMBDA, LAND, |
| 139 | LCURLY, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, |
| 140 | LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, |
| 141 | LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, |
| 142 | NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, |
| 143 | SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 144 | <message key="ws.notFollowed" |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 145 | value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)" /> |
| 146 | <message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace." /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 147 | </module> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 148 | <module name="OneStatementPerLine" /> |
| 149 | <module name="MultipleVariableDeclarations" /> |
| 150 | <module name="ArrayTypeStyle" /> |
| 151 | <module name="MissingSwitchDefault" /> |
| 152 | <module name="FallThrough" /> |
| 153 | <module name="UpperEll" /> |
| 154 | <module name="ModifierOrder" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 155 | <module name="EmptyLineSeparator"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 156 | <property name="tokens" |
| 157 | value="PACKAGE_DEF, IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, |
| 158 | STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF" /> |
| 159 | <property name="allowNoEmptyLineBetweenFields" value="true" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 160 | </module> |
| 161 | <module name="SeparatorWrap"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 162 | <property name="id" value="SeparatorWrapDot" /> |
| 163 | <property name="tokens" value="DOT" /> |
| 164 | <property name="option" value="nl" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 165 | </module> |
| 166 | <module name="SeparatorWrap"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 167 | <property name="id" value="SeparatorWrapComma" /> |
| 168 | <property name="tokens" value="COMMA" /> |
| 169 | <property name="option" value="EOL" /> |
| 170 | </module> |
| 171 | <module name="SeparatorWrap"> |
| 172 | <!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/258 --> |
| 173 | <property name="id" value="SeparatorWrapEllipsis" /> |
| 174 | <property name="tokens" value="ELLIPSIS" /> |
| 175 | <property name="option" value="EOL" /> |
| 176 | </module> |
| 177 | <module name="SeparatorWrap"> |
| 178 | <!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/259 --> |
| 179 | <property name="id" value="SeparatorWrapArrayDeclarator" /> |
| 180 | <property name="tokens" value="ARRAY_DECLARATOR" /> |
| 181 | <property name="option" value="EOL" /> |
| 182 | </module> |
| 183 | <module name="SeparatorWrap"> |
| 184 | <property name="id" value="SeparatorWrapMethodRef" /> |
| 185 | <property name="tokens" value="METHOD_REF" /> |
| 186 | <property name="option" value="nl" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 187 | </module> |
| 188 | <module name="PackageName"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 189 | <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$" /> |
| 190 | <message key="name.invalidPattern" value="Package name ''{0}'' must match pattern ''{1}''." /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 191 | </module> |
| 192 | <module name="TypeName"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 193 | <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, ANNOTATION_DEF" /> |
| 194 | <message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''." /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 195 | </module> |
| 196 | <module name="MemberName"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 197 | <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$" /> |
| 198 | <message key="name.invalidPattern" value="Member name ''{0}'' must match pattern ''{1}''." /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 199 | </module> |
| 200 | <module name="ParameterName"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 201 | <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$" /> |
| 202 | <message key="name.invalidPattern" value="Parameter name ''{0}'' must match pattern ''{1}''." /> |
| 203 | </module> |
| 204 | <module name="LambdaParameterName"> |
| 205 | <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$" /> |
| 206 | <message key="name.invalidPattern" value="Lambda parameter name ''{0}'' must match pattern ''{1}''." /> |
| 207 | </module> |
| 208 | <module name="CatchParameterName"> |
| 209 | <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$" /> |
| 210 | <message key="name.invalidPattern" value="Catch parameter name ''{0}'' must match pattern ''{1}''." /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 211 | </module> |
| 212 | <module name="LocalVariableName"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 213 | <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$" /> |
| 214 | <message key="name.invalidPattern" value="Local variable name ''{0}'' must match pattern ''{1}''." /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 215 | </module> |
| 216 | <module name="ClassTypeParameterName"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 217 | <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)" /> |
| 218 | <message key="name.invalidPattern" value="Class type name ''{0}'' must match pattern ''{1}''." /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 219 | </module> |
| 220 | <module name="MethodTypeParameterName"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 221 | <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)" /> |
| 222 | <message key="name.invalidPattern" value="Method type name ''{0}'' must match pattern ''{1}''." /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 223 | </module> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 224 | <module name="InterfaceTypeParameterName"> |
| 225 | <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)" /> |
| 226 | <message key="name.invalidPattern" value="Interface type name ''{0}'' must match pattern ''{1}''." /> |
| 227 | </module> |
| 228 | <module name="NoFinalizer" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 229 | <module name="GenericWhitespace"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 230 | <message key="ws.followed" value="GenericWhitespace ''{0}'' is followed by whitespace." /> |
| 231 | <message key="ws.preceded" value="GenericWhitespace ''{0}'' is preceded with whitespace." /> |
| 232 | <message key="ws.illegalFollow" value="GenericWhitespace ''{0}'' should followed by whitespace." /> |
| 233 | <message key="ws.notPreceded" value="GenericWhitespace ''{0}'' is not preceded with whitespace." /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 234 | </module> |
| 235 | <module name="Indentation"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 236 | <property name="basicOffset" value="4" /> |
| 237 | <property name="braceAdjustment" value="0" /> |
| 238 | <property name="caseIndent" value="4" /> |
| 239 | <property name="throwsIndent" value="4" /> |
| 240 | <property name="lineWrappingIndentation" value="4" /> |
| 241 | <property name="arrayInitIndent" value="4" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 242 | </module> |
| 243 | <module name="AbbreviationAsWordInName"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 244 | <property name="ignoreFinal" value="false" /> |
| 245 | <property name="allowedAbbreviationLength" value="1" /> |
| 246 | <property name="tokens" |
| 247 | value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, ANNOTATION_DEF, ANNOTATION_FIELD_DEF, |
| 248 | PARAMETER_DEF, VARIABLE_DEF, METHOD_DEF" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 249 | </module> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 250 | <module name="OverloadMethodsDeclarationOrder" /> |
| 251 | <module name="VariableDeclarationUsageDistance" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 252 | <module name="CustomImportOrder"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 253 | <property name="sortImportsInGroupAlphabetically" value="true" /> |
| 254 | <property name="separateLineBetweenGroups" value="true" /> |
| 255 | <property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE" /> |
| 256 | <property name="tokens" value="IMPORT, STATIC_IMPORT, PACKAGE_DEF" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 257 | </module> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 258 | <module name="MethodParamPad"> |
| 259 | <property name="tokens" |
| 260 | value="CTOR_DEF, LITERAL_NEW, METHOD_CALL, METHOD_DEF, |
| 261 | SUPER_CTOR_CALL, ENUM_CONSTANT_DEF" /> |
| 262 | </module> |
| 263 | <module name="NoWhitespaceBefore"> |
| 264 | <property name="tokens" |
| 265 | value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, |
| 266 | LABELED_STAT, METHOD_REF" /> |
| 267 | <property name="allowLineBreaks" value="true" /> |
| 268 | </module> |
| 269 | <module name="ParenPad"> |
| 270 | <property name="tokens" |
| 271 | value="ANNOTATION, ANNOTATION_FIELD_DEF, CTOR_CALL, CTOR_DEF, DOT, ENUM_CONSTANT_DEF, |
| 272 | EXPR, LITERAL_CATCH, LITERAL_DO, LITERAL_FOR, LITERAL_IF, LITERAL_NEW, |
| 273 | LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_WHILE, METHOD_CALL, |
| 274 | METHOD_DEF, QUESTION, RESOURCE_SPECIFICATION, SUPER_CTOR_CALL, LAMBDA" /> |
| 275 | </module> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 276 | <module name="OperatorWrap"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 277 | <property name="option" value="NL" /> |
| 278 | <property name="tokens" |
| 279 | value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, |
| 280 | LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF " /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 281 | </module> |
| 282 | <module name="AnnotationLocation"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 283 | <property name="id" value="AnnotationLocationMostCases" /> |
| 284 | <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 285 | </module> |
| 286 | <module name="AnnotationLocation"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 287 | <property name="id" value="AnnotationLocationVariables" /> |
| 288 | <property name="tokens" value="VARIABLE_DEF" /> |
| 289 | <property name="allowSamelineMultipleAnnotations" value="true" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 290 | </module> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 291 | <module name="NonEmptyAtclauseDescription" /> |
| 292 | <module name="InvalidJavadocPosition" /> |
| 293 | <module name="JavadocTagContinuationIndentation" /> |
| 294 | <module name="SummaryJavadoc"> |
| 295 | <property name="forbiddenSummaryFragments" |
| 296 | value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 297 | </module> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 298 | <module name="JavadocParagraph" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 299 | <module name="AtclauseOrder"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 300 | <property name="tagOrder" value="@param, @return, @throws, @deprecated" /> |
| 301 | <property name="target" |
| 302 | value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 303 | </module> |
| 304 | <module name="JavadocMethod"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 305 | <property name="scope" value="public" /> |
| 306 | <property name="allowMissingParamTags" value="true" /> |
| 307 | <property name="allowMissingReturnTag" value="true" /> |
| 308 | <property name="allowedAnnotations" value="Override, Test" /> |
| 309 | <property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 310 | </module> |
liamfallon | 5a4892d | 2019-12-06 13:21:21 +0000 | [diff] [blame] | 311 | <module name="MissingJavadocMethod"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 312 | <property name="scope" value="public" /> |
| 313 | <property name="minLineCount" value="2" /> |
| 314 | <property name="allowedAnnotations" value="Override, Test" /> |
| 315 | <property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF" /> |
| 316 | <property name="ignoreMethodNamesRegex" value="^(test|before|after)[a-zA-Z0-9_]*$" /> |
liamfallon | 5a4892d | 2019-12-06 13:21:21 +0000 | [diff] [blame] | 317 | </module> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 318 | <module name="MethodName"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 319 | <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$" /> |
| 320 | <message key="name.invalidPattern" value="Method name ''{0}'' must match pattern ''{1}''." /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 321 | </module> |
| 322 | <module name="SingleLineJavadoc"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 323 | <property name="ignoreInlineTags" value="false" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 324 | </module> |
| 325 | <module name="EmptyCatchBlock"> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 326 | <property name="exceptionVariableName" value="expected" /> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 327 | </module> |
liamfallon | 4e18f39 | 2020-06-10 14:49:25 +0100 | [diff] [blame] | 328 | <module name="CommentsIndentation"> |
| 329 | <property name="tokens" value="SINGLE_LINE_COMMENT, BLOCK_COMMENT_BEGIN" /> |
| 330 | </module> |
| 331 | <!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter --> |
| 332 | <module name="SuppressionXpathFilter"> |
| 333 | <property name="file" value="${org.checkstyle.google.suppressionxpathfilter.config}" |
| 334 | default="checkstyle-xpath-suppressions.xml" /> |
| 335 | <property name="optional" value="true" /> |
| 336 | </module> |
Gary Wu | 7f1c152 | 2017-06-21 15:03:17 -0700 | [diff] [blame] | 337 | </module> |
| 338 | </module> |