|
| 1 | +<?xml version="1.0"?> |
| 2 | + |
| 3 | +<!-- |
| 4 | +Licensed to the Apache Software Foundation (ASF) under one |
| 5 | +or more contributor license agreements. See the NOTICE file |
| 6 | +distributed with this work for additional information |
| 7 | +regarding copyright ownership. The ASF licenses this file |
| 8 | +to you under the Apache License, Version 2.0 (the |
| 9 | +"License"); you may not use this file except in compliance |
| 10 | +with the License. You may obtain a copy of the License at |
| 11 | +
|
| 12 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | +
|
| 14 | +Unless required by applicable law or agreed to in writing, |
| 15 | +software distributed under the License is distributed on an |
| 16 | +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 17 | +KIND, either express or implied. See the License for the |
| 18 | +specific language governing permissions and limitations |
| 19 | +under the License. |
| 20 | +--> |
| 21 | + |
| 22 | +<!DOCTYPE module PUBLIC |
| 23 | + "-//Puppy Crawl//DTD Check Configuration 1.3//EN" |
| 24 | + "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> |
| 25 | + |
| 26 | +<!-- See http://checkstyle.sourceforge.net/checks.html for documentation on available checks --> |
| 27 | +<module name="Checker"> |
| 28 | + <!-- Checks to see if a file contains a tab character. --> |
| 29 | + <module name="FileTabCharacter"> |
| 30 | + <property name="eachLine" value="true"/> |
| 31 | + </module> |
| 32 | + |
| 33 | + <!-- Checks for trailing whitespace. --> |
| 34 | + <module name="RegexpSingleline"> |
| 35 | + <!-- \s matches whitespace character, $ matches end of line. --> |
| 36 | + <property name="format" value="\s+$"/> |
| 37 | + <property name="message" value="Line has trailing spaces."/> |
| 38 | + </module> |
| 39 | + |
| 40 | + <module name="TreeWalker"> |
| 41 | + <module name="AtclauseOrder"/> |
| 42 | + <module name="NonEmptyAtclauseDescription"/> |
| 43 | + <module name="SingleLineJavadoc"> |
| 44 | + <property name="ignoreInlineTags" value="false"/> |
| 45 | + </module> |
| 46 | + <module name="InvalidJavadocPosition"/> |
| 47 | + <module name="JavadocBlockTagLocation"/> |
| 48 | + <module name="JavadocContentLocation"/> |
| 49 | + <module name="JavadocLeadingAsteriskAlign" /> |
| 50 | + <module name="JavadocMissingLeadingAsterisk"/> |
| 51 | + <module name="JavadocMissingWhitespaceAfterAsterisk"/> |
| 52 | + |
| 53 | + <!-- Checks for imports --> |
| 54 | + <module name="AvoidStarImport"/> |
| 55 | + <module name="RedundantImport"/> |
| 56 | + <module name="UnusedImports"/> |
| 57 | + |
| 58 | + <!-- Modifier Checks --> |
| 59 | + <module name="ModifierOrder"/> |
| 60 | + <module name="RedundantModifier"/> |
| 61 | + |
| 62 | + <!-- Checks for common coding problems --> |
| 63 | + <module name="EmptyStatement"/> |
| 64 | + <!-- Checks that classes that override equals() also override hashCode(). --> |
| 65 | + <module name="EqualsHashCode"/> |
| 66 | + <!-- Checks for illegal instantiations where a factory method is preferred. --> |
| 67 | + <module name="IllegalInstantiation"/> |
| 68 | + |
| 69 | + <!-- Checks that long constants are defined with an upper ell. --> |
| 70 | + <module name="UpperEll"/> |
| 71 | + <!-- This check makes sure that all package annotations are in the package-info.java file. --> |
| 72 | + <module name="PackageAnnotation"/> |
| 73 | + <!-- Checks that if a class defines a covariant method equals, then it defines method equals(java.lang.Object). --> |
| 74 | + <module name="CovariantEquals"/> |
| 75 | + <!-- Checks the style of array type definitions. --> |
| 76 | + <module name="ArrayTypeStyle"/> |
| 77 | + <!-- Make sure left curly braces are on the same line. --> |
| 78 | + <module name="LeftCurly"/> |
| 79 | + |
| 80 | + <module name="RightCurly"/> |
| 81 | + <module name="RightCurly"> |
| 82 | + <property name="option" value="alone"/> |
| 83 | + <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/> |
| 84 | + </module> |
| 85 | + <!-- Checks that there is no whitespace after certain tokens; e.g. "." and "!". --> |
| 86 | + <module name="NoWhitespaceAfter"/> |
| 87 | + <!-- Checks that there is no whitespace before certain tokens; e.g. "++" and ";". --> |
| 88 | + <module name="NoWhitespaceBefore"/> |
| 89 | + <!-- Checks that most tokens are surrounded by whitespace. RCURLY is omitted so we can do stuff like "new Thread(){...}.start()". --> |
| 90 | + <module name="WhitespaceAround"> |
| 91 | + <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND"/> |
| 92 | + </module> |
| 93 | + <module name="WhitespaceAfter"> |
| 94 | + <property name="tokens" value="COMMA"/> |
| 95 | + </module> |
| 96 | + <module name="GenericWhitespace"/> |
| 97 | + <module name="ParenPad"> |
| 98 | + <property name="option" value="nospace"/> |
| 99 | + </module> |
| 100 | + <!-- Ensure there is no space between the identifier of a method definition, constructor definition, method call, or constructor invocation and the left parenthesis of the parameter list. --> |
| 101 | + <module name="MethodParamPad"/> |
| 102 | + <!-- Ensure proper indentation. --> |
| 103 | + <module name="Indentation"> |
| 104 | + <property name="basicOffset" value="3"/> |
| 105 | + <property name="caseIndent" value="3"/> |
| 106 | + <property name="throwsIndent" value="3"/> |
| 107 | + <property name="arrayInitIndent" value="3"/> |
| 108 | + <property name="lineWrappingIndentation" value="3"/> |
| 109 | + </module> |
| 110 | + |
| 111 | + <module name="IllegalImport"> |
| 112 | + <property name="illegalPkgs" value="junit.framework"/> |
| 113 | + </module> |
| 114 | + |
| 115 | + <module name="WriteTag"> |
| 116 | + <property name="tag" value="@author"/> |
| 117 | + <property name="tagSeverity" value="error"/> |
| 118 | + <property name="severity" value="ignore"/> |
| 119 | + </module> |
| 120 | + |
| 121 | + <module name="UnnecessarySemicolonInTryWithResources"/> |
| 122 | + |
| 123 | + <module name="NeedBraces"> |
| 124 | + <property name="tokens" value="LITERAL_IF, LITERAL_ELSE, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO"/> |
| 125 | + <property name="allowSingleLineStatement" value="false"/> |
| 126 | + </module> |
| 127 | + |
| 128 | + <!-- begin Sevntu checks, http://sevntu-checkstyle.github.io/sevntu.checkstyle/ --> |
| 129 | + <module name="DiamondOperatorForVariableDefinition"/> |
| 130 | + <module name="RequiredParameterForAnnotation"> |
| 131 | + <property name="annotationName" value="Parameterized.Parameters"/> |
| 132 | + <property name="requiredParameters" value="name"/> |
| 133 | + </module> |
| 134 | + <!-- end Sevntu checks --> |
| 135 | + </module> |
| 136 | +</module> |
0 commit comments