| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| |
| Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. |
| |
| This program and the accompanying materials are made available under the |
| terms of the Eclipse Public License v. 2.0, which is available at |
| http://www.eclipse.org/legal/epl-2.0. |
| |
| This Source Code may also be made available under the following Secondary |
| Licenses when the conditions for such availability set forth in the |
| Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| version 2 with the GNU Classpath Exception, which is available at |
| https://www.gnu.org/software/classpath/license.html. |
| |
| SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| |
| --> |
| |
| <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> |
| |
| <module name="Checker"> |
| <property name="charset" value="UTF-8"/> |
| |
| <!-- Checks for whitespace --> |
| <!-- See http://checkstyle.sf.net/config_whitespace.html --> |
| <module name="FileTabCharacter"> |
| <property name="eachLine" value="true"/> |
| </module> |
| |
| <module name="LineLength"> |
| <property name="max" value="130"/> |
| <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://|@see| \* |@link|TODO|@todo|@version"/> |
| <property name="fileExtensions" value="java"/> |
| </module> |
| |
| <module name="TreeWalker"> |
| <property name="tabWidth" value="4"/> |
| |
| <module name="OuterTypeFilename"/> |
| |
| <module name="AvoidStarImport"/> |
| <!--<module name="UnusedImports"/>--> |
| |
| <module name="OneTopLevelClass"/> |
| <module name="NoLineWrap"/> |
| <module name="MethodParamPad"/> |
| <module name="NoWhitespaceAfter"/> |
| <module name="NoWhitespaceBefore"/> |
| <module name="OperatorWrap"/> |
| <module name="ParenPad"/> |
| <module name="TypecastParenPad"/> |
| <module name="WhitespaceAfter"/> |
| |
| <module name="EmptyBlock"> |
| <property name="option" value="TEXT"/> |
| <property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/> |
| </module> |
| |
| <module name="NeedBraces"> |
| <property name="allowSingleLineStatement" value="true"/> |
| </module> |
| <module name="LeftCurly"> |
| <!-- without literal LAMBDA --> |
| <property name="tokens" value="ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_CONSTANT_DEF, ENUM_DEF, |
| INTERFACE_DEF, LITERAL_CASE, LITERAL_CATCH, LITERAL_DEFAULT, |
| LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, |
| LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, |
| METHOD_DEF, OBJBLOCK, STATIC_INIT" /> |
| </module> |
| <module name="RightCurly"> |
| <property name="option" value="alone"/> |
| <!-- without literal LITERAL_TRY, LITERAL_CATCH, LITERAL_IF --> |
| <property name="tokens" |
| value="LITERAL_FOR, LITERAL_WHILE, LITERAL_FINALLY, LITERAL_ELSE"/> |
| </module> |
| |
| <module name="WhitespaceAround"> |
| <!-- Removed static initializer issues: RCURLY, SLIST --> |
| <property name="tokens" |
| value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, |
| DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, |
| LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, |
| LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, |
| NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, |
| TYPE_EXTENSION_AND"/> |
| <property name="allowEmptyConstructors" value="true"/> |
| <property name="allowEmptyMethods" value="true"/> |
| <property name="allowEmptyTypes" value="true"/> |
| <property name="allowEmptyLoops" value="true"/> |
| <message key="ws.notFollowed" |
| 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)"/> |
| <message key="ws.notPreceded" |
| value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/> |
| </module> |
| |
| <module name="OneStatementPerLine"/> |
| <module name="FallThrough"/> |
| <module name="UpperEll"/> |
| <module name="ModifierOrder"/> |
| |
| <module name="SeparatorWrap"> |
| <property name="tokens" value="DOT"/> |
| <property name="option" value="nl"/> |
| </module> |
| <module name="SeparatorWrap"> |
| <property name="tokens" value="COMMA"/> |
| <property name="option" value="EOL"/> |
| </module> |
| |
| <module name="NoFinalizer"/> |
| |
| <module name="GenericWhitespace"> |
| <message key="ws.followed" |
| value="GenericWhitespace ''{0}'' is followed by whitespace."/> |
| <message key="ws.preceded" |
| value="GenericWhitespace ''{0}'' is preceded with whitespace."/> |
| <message key="ws.illegalFollow" |
| value="GenericWhitespace ''{0}'' should followed by whitespace."/> |
| <message key="ws.notPreceded" |
| value="GenericWhitespace ''{0}'' is not preceded with whitespace."/> |
| </module> |
| |
| <module name="AnnotationLocation"> |
| <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/> |
| </module> |
| <module name="AnnotationLocation"> |
| <property name="tokens" value="VARIABLE_DEF"/> |
| <property name="allowSamelineMultipleAnnotations" value="true"/> |
| </module> |
| |
| <!-- No Trailing Whitespaces. --> |
| <module name="RegexpSinglelineJava"> |
| <property name="format" value="[ ]+$"/> |
| <property name="message" value="File contains trailing whitespace."/> |
| </module> |
| </module> |
| </module> |