checkstyle.checkstyle-oss.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of build-config Show documentation
Show all versions of build-config Show documentation
OpenGamma build configuration (checkstyle)
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> <!-- Copyright (C) 2016 - present by OpenGamma Inc. and the OpenGamma group of companies Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <module name="Checker"> <property name="severity" value="warning"/> <property name="localeLanguage" value="en"/> <property name="localeCountry" value="GB"/> <module name="TreeWalker"> <property name="tabWidth" value="2"/> <!-- Allow abbreviations in local variables, but not in methods --> <module name="AbbreviationAsWordInName"> <property name="allowedAbbreviationLength" value="1"/> <property name="ignoreFinal" value="false"/> <property name="ignoreStatic" value="true"/> <property name="ignoreOverriddenMethods" value="true"/> <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF"/> </module> <module name="AbbreviationAsWordInName"> <property name="allowedAbbreviationLength" value="3"/> <property name="ignoreFinal" value="false"/> <property name="ignoreStatic" value="true"/> <property name="ignoreOverriddenMethods" value="true"/> <property name="tokens" value="PARAMETER_DEF, VARIABLE_DEF"/> </module> <module name="ArrayTypeStyle"> <property name="severity" value="error"/> <message key="array.type.style" value="Array must be defined as Foo[] array, not Foo array[]"/> </module> <module name="AvoidStarImport"> <property name="severity" value="error"/> </module> <module name="ConstantName"> <property name="format" value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$|^log([A-Z][a-zA-Z0-9]*)?$|^[a-z][a-zA-Z0-9]*Log$"/> </module> <module name="CovariantEquals"/> <module name="DefaultComesLast"> <property name="severity" value="error"/> </module> <module name="EmptyBlock"> <property name="option" value="text"/> <property name="tokens" value="LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_IF,LITERAL_FOR,LITERAL_TRY,LITERAL_WHILE,STATIC_INIT"/> </module> <module name="EqualsHashCode"/> <module name="ExplicitInitialization"> <property name="severity" value="error"/> </module> <module name="FallThrough"> <property name="severity" value="error"/> </module> <module name="GenericWhitespace"/> <module name="IllegalImport"/><!-- other imports disallowed by regex below --> <module name="IllegalInstantiation"> <property name="classes" value="Boolean"/> <property name="severity" value="error"/> </module> <module name="Indentation"> <property name="basicOffset" value="2"/> <property name="caseIndent" value="2"/> </module> <module name="InnerAssignment"/> <module name="InterfaceIsType"/> <!-- Allow method Javadoc to be missing on protected, but not on public --> <module name="JavadocMethod"> <property name="scope" value="public"/> <property name="allowUndeclaredRTE" value="true"/> <property name="allowMissingThrowsTags" value="true"/> <property name="allowMissingPropertyJavadoc" value="true"/> <property name="logLoadErrors" value="true"/> <property name="suppressLoadErrors" value="true"/> <property name="validateThrows" value="true"/> </module> <module name="JavadocMethod"> <property name="scope" value="protected"/> <property name="excludeScope" value="public"/> <property name="allowUndeclaredRTE" value="true"/> <property name="allowMissingJavadoc" value="true"/> <property name="allowMissingThrowsTags" value="true"/> <property name="allowMissingPropertyJavadoc" value="true"/> <property name="logLoadErrors" value="true"/> <property name="suppressLoadErrors" value="true"/> <property name="validateThrows" value="true"/> </module> <module name="JavadocStyle"> <property name="scope" value="public"/> <property name="checkFirstSentence" value="true"/> <property name="checkEmptyJavadoc" value="false"/> <property name="checkHtml" value="false"/> <property name="tokens" value="ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_DEF, INTERFACE_DEF, METHOD_DEF"/> </module> <module name="JavadocTagContinuationIndentation"> <property name="offset" value="2"/> </module> <module name="JavadocType"> <property name="scope" value="protected"/> </module> <module name="JavadocVariable"> <property name="scope" value="protected"/> </module> <module name="LeftCurly"> <property name="severity" value="error"/> </module> <module name="LineLength"> <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/> <property name="max" value="200"/> <property name="tabWidth" value="2"/> </module> <module name="LocalFinalVariableName"/> <module name="LocalVariableName"/> <module name="MemberName"> <property name="format" value="^_?[a-z][a-zA-Z0-9$]*$"/> </module> <module name="MethodLength"> <property name="max" value="300"/> </module> <module name="MethodName"/> <module name="MethodParamPad"> <property name="severity" value="error"/> </module> <module name="MissingDeprecated"/> <module name="MissingOverride"/> <module name="ModifierOrder"> <property name="severity" value="error"/> </module> <module name="MutableException"> <property name="severity" value="error"/> <message key="mutable.exception" value="Fields in an exception class must be final"/> </module> <module name="NeedBraces"> <property name="severity" value="error"/> </module> <module name="NoFinalizer"/> <module name="NonEmptyAtclauseDescription"/> <module name="NoWhitespaceAfter"> <property name="severity" value="error"/> </module> <module name="NoWhitespaceBefore"> <property name="allowLineBreaks" value="true"/> <property name="tokens" value="SEMI,DOT,POST_DEC,POST_INC"/> <property name="severity" value="error"/> </module> <module name="OneTopLevelClass"/> <module name="OperatorWrap"> <property name="option" value="eol"/> <property name="tokens" value="ASSIGN, DIV_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN, STAR_ASSIGN, MOD_ASSIGN, SR_ASSIGN, BSR_ASSIGN, SL_ASSIGN, BXOR_ASSIGN, BOR_ASSIGN, BAND_ASSIGN"/> </module> <module name="PackageAnnotation"/> <module name="PackageName"/> <module name="ParameterName"/> <module name="ParameterNumber"> <property name="max" value="20"/> </module> <module name="ParenPad"> <property name="severity" value="error"/> </module> <module name="RightCurly"> <property name="severity" value="error"/> </module> <module name="SeparatorWrap"> <property name="tokens" value="DOT"/> <property name="option" value="nl"/> <property name="severity" value="error"/> </module> <module name="SeparatorWrap"> <property name="tokens" value="COMMA"/> <property name="option" value="eol"/> <property name="severity" value="error"/> </module> <module name="StaticVariableName"> <property name="format" value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$|^log$"/> </module> <module name="StringLiteralEquality"/> <module name="TypeName"/> <module name="TypecastParenPad"> <property name="severity" value="error"/> </module> <module name="UpperEll"> <property name="severity" value="error"/> </module> <module name="VisibilityModifier"/> <module name="WhitespaceAfter"> <property name="severity" value="error"/> </module> <module name="WhitespaceAround"> <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,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/> <property name="allowEmptyConstructors" value="true"/> <property name="allowEmptyMethods" value="true"/> <property name="allowEmptyLambdas" value="true"/> <property name="allowEmptyTypes" value="true"/> <property name="severity" value="error"/> </module> <module name="SuppressWithNearbyCommentFilter"> <property name="commentFormat" value="CSIGNORE"/> <property name="checkFormat" value=".*"/> <property name="checkC" value="false"/> </module> </module> <!-- Header inlined due to m2e --> <module name="RegexpHeader"> <property name="header" value="^/\*\n^ \* Copyright \(C\) (2009|20[12][0-9]) - present by OpenGamma Inc\. and the OpenGamma group of companies\n^ \*\n^ \* Please see distribution for license\.\n^ \*\/"/> <property name="fileExtensions" value="java,proto"/> <property name="severity" value="error"/> </module> <module name="RegexpSingleline"> <property name="format" value="import org.testng.collections."/> <property name="message" value="Invalid import, maybe you want com.google.common.collect"/> <property name="severity" value="error"/> </module> <module name="RegexpSingleline"> <property name="format" value="import org.testng.internal."/> <property name="message" value="Invalid import, internal testng classes not allowed"/> <property name="severity" value="error"/> </module> <module name="RegexpSingleline"> <property name="format" value="import com.beust.jcommander.internal."/> <property name="message" value="Invalid import, maybe you want com.google.common.collect"/> <property name="severity" value="error"/> </module> <module name="RegexpSingleline"> <property name="format" value="UnsupportedEncodingException "/> <property name="message" value="Use constants on Guava Charsets class instead"/> </module> <module name="SuppressWithPlainTextCommentFilter"> <property name="offCommentFormat" value="CSOFF: ALL"/> <property name="onCommentFormat" value="CSON: ALL"/> </module> <module name="SuppressWithPlainTextCommentFilter"> <property name="offCommentFormat" value="CSOFF\: ([\w\|]+)"/> <property name="onCommentFormat" value="CSON\: ([\w\|]+)"/> <property name="checkFormat" value="$1"/> </module> <module name="FileLength"/> <module name="FileTabCharacter"> <property name="eachLine" value="true"/> <property name="severity" value="error"/> </module> <module name="NewlineAtEndOfFile"/> </module>