c-bicoe.dina-base-api.0.128.source-code.checkstyle.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dina-base-api Show documentation
Show all versions of dina-base-api Show documentation
Base DINA API package for Java built on SpringBoot and Crnk
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Check Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <!-- This is a modified version of the twitter CheckStyle configuration file. Checkstyle configuration that checks the sun coding conventions from: - the Java Language Specification at http://java.sun.com/docs/books/jls/second_edition/html/index.html - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - the Javadoc guidelines at http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - some best practices Most Checks are configurable, be sure to consult the documentation. To completely disable a check, just comment it out or delete it from the file. Finally, it is worth reading the documentation. To learn more about CheckStyle plugin check out the following resources: CheckStyle: http://checkstyle.sf.net Wiki: https://bitbucket.org/aafc-mbb/seqdb/wiki/Installing%20and%20using%20CheckStyle To configure how CheckStyle looks on the page check out the following wiki page for settings: Severity of violation: Currently it's set up so all whitespace related issues are ignored instead of errors. All other violations are considered errors unless suppressed. The options of severity are - ignore - info - warning - error Augment the level of severity of check violations with: <property name="severity" value=OPTION/> Twitters License: ================================================================================================= Copyright 2011 Twitter, Inc. _________________________________________________________________________________________________ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or 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="charset" value="UTF-8"/> <!-- Specify what all the severity is of all violations --> <property name="severity" value="warning"/> <!-- Specify what file types to run CheckStyle on. --> <!-- See http://checkstyle.sourceforge.net/config.html#Checker --> <property name="fileExtensions" value="java"/> <!-- Checks whether files end with a new line. --> <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> <module name="NewlineAtEndOfFile"> <property name="severity" value="error"/> </module> <!-- Checks for Size Violations. --> <!-- See http://checkstyle.sf.net/config_sizes.html --> <module name="LineLength"> <property name="max" value="100"/> <!-- Ignore import statements and javadoc comments and variables --> <property name="ignorePattern" value='^(import.*$|^ *\*( |[^\/]) *.*)|((.*)=( |)"(.*)"(.*))'/> <!-- severity is at ignore until we fix the other issues --> <property name="severity" value="ignore"/> </module> <!-- Checks that property files contain the same keys. --> <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> <module name="Translation"/> <!-- Checks for whitespace --> <!-- See http://checkstyle.sf.net/config_whitespace.html --> <module name="FileTabCharacter"> <!-- Only show the first instance of a tab being used in the file. --> <property name="eachLine" value="false"/> <property name="severity" value="ignore"/> </module> <!-- Miscellaneous other checks. --> <!-- See http://checkstyle.sf.net/config_misc.html --> <!-- severity is at ignore until we fix the other issues --> <module name="RegexpSingleline"> <property name="format" value="\s+$"/> <property name="minimum" value="0"/> <property name="maximum" value="0"/> <property name="message" value="Line has trailing spaces."/> <property name="severity" value="ignore"/> </module> <module name="TreeWalker"> <!-- Indent Checks --> <!-- How much spaces a tab is worth --> <property name="tabWidth" value="2"/> <!-- severity is at ignore until we fix the other issues --> <module name="Indentation"> <property name="basicOffset" value="2"/> <property name="braceAdjustment" value="0"/> <property name="caseIndent" value="2"/> <property name="throwsIndent" value="4"/> <property name="lineWrappingIndentation" value="2"/> <property name="arrayInitIndent" value="2"/> <property name="severity" value="error"/> </module> <!-- Suppressions Checks You can turn off style check for a specific line by using an in code comment. An example on how to use this: _____ The name of the violation you want to turn off temporarily. | | _____________ Reason for turning it off. | | v v //CHECKSTYLE.OFF: IllegalCatch - Much more readable than catching 7 exceptions catch (Exception e) //CHECKSTYLE.ON: IllegalCatch This suppress will affect code one line above and below the line you put the comment on. --> <!-- Turn off the line above it --> <module name="SuppressWithNearbyCommentFilter"> <property name="influenceFormat" value="1"/> </module> <!-- now again for one line before the comment --> <module name="SuppressWithNearbyCommentFilter"> <property name="influenceFormat" value="-1"/> </module> <module name="SuppressionCommentFilter"> <property name="offCommentFormat" value="CHECKSTYLE\:OFF ([\w\|]+)"/> <property name="onCommentFormat" value="CHECKSTYLE\:ON ([\w\|]+)"/> <property name="checkFormat" value="$1"/> </module> <!-- Annotation Checks --> <module name="AnnotationUseStyle"> <property name="severity" value="error"/> </module> <module name="MissingDeprecated"> <property name="severity" value="error"/> </module> <module name="MissingOverride"> <property name="severity" value="error"/> </module> <module name="PackageAnnotation"> <property name="severity" value="error"/> </module> <!-- Checks for Javadoc comments. --> <!-- See http://checkstyle.sf.net/config_javadoc.html --> <module name="JavadocMethod"> <property name="severity" value="ignore"/> <!-- javadoc doesn't need one @param, @return, @throws tags --> <property name="accessModifiers" value="public"/> <property name="allowMissingParamTags" value="true"/> <property name="allowMissingReturnTag" value="true"/> <!-- Allow tags for runtime exceptions that are not explicitly declared --> </module> <module name="MissingJavadocMethod"> <!-- don't require javadoc for methods shorter than or equal to this many lines (including opening & closing brace lines) --> <property name="minLineCount" value="5"/> <!-- simple set/get methods don't need javadoc comments --> <property name="allowMissingPropertyJavadoc" value="true" /> </module> <module name="JavadocType"> <property name="severity" value="ignore"/> <property name="excludeScope" value="private"/> </module> <module name="JavadocStyle"> <property name="severity" value="ignore"/> <property name="checkEmptyJavadoc" value="true"/> <property name="checkFirstSentence" value="false"/> </module> <!-- Checks for Naming Conventions. --> <!-- Class names must start with a capital letter. --> <module name="ClassTypeParameterName"> <property name="format" value="^[A-Z][A-Z0-9]?$"/> <property name="severity" value="error"/> <message key="name.invalidPattern" value="The class named ''{0}'' should be written in UpperCamelCase."/> </module> <!-- Method Types Name Conventions --> <module name="MethodTypeParameterName"> <property name="format" value="^[A-Z][A-Z0-9]?$"/> <property name="severity" value="error"/> </module> <module name="ConstantName"> <property name="severity" value="error"/> </module> <module name="LocalFinalVariableName"> <!-- allow VAR_NAME and varName in local final variables, leave it up to user to use them appropriately depending on whether or not the variable is A_CONSTANT_VARIBLE, or aMutableVariable. --> <property name="format" value="^(([a-z][a-zA-Z0-9]*)|([A-Z][A-Z0-9]*(_[A-Z0-9]+)*))$" /> <property name="severity" value="error"/> </module> <module name="LocalVariableName"> <property name="severity" value="error"/> </module> <module name="MemberName"> <property name="severity" value="error"/> </module> <module name="PackageName"> <property name="severity" value="error"/> </module> <module name="ParameterName"> <property name="severity" value="error"/> </module> <module name="StaticVariableName"> <property name="severity" value="error"/> </module> <module name="TypeName"> <property name="severity" value="error"/> </module> <!-- Following interprets the header file as regular expressions. --> <!-- <module name="RegexpHeader"/> --> <!-- Checks for imports --> <!-- See http://checkstyle.sf.net/config_import.html --> <module name="AvoidStarImport"> <property name="excludes" value="org.junit.Assert"/> <property name="excludes" value="java.util.*"/> <property name="severity" value="error"/> </module> <!-- Defaults to sun.* packages --> <module name="IllegalImport"> <property name="severity" value="error"/> <property name="illegalClasses" value=" com.google.common.collect.ImmutableList, com.google.common.collect.ImmutableMap, com.google.common.collect.ImmutableSet, com.google.common.base.Optional, javax.annotation.Nullable, javax.annotation.Nonnull "/> </module> <module name="RedundantImport"> <property name="severity" value="error"/> </module> <module name="UnusedImports"> <property name="severity" value="error"/> </module> <!-- Import Orders --> <module name="ImportOrder"> <property name="groups" value="/^javax?\./,org,com,ca.gc.aafc"/> <property name="ordered" value="true"/> <property name="separated" value="true"/> <property name="option" value="bottom"/> <property name="severity" value="ignore"/> <message key="import.ordering" value="Wrong order for ''{0}'' import. Order should be: java, javax, org, com, ca.gc.aafc. Each group should be separated by a single blank line." /> </module> <module name="OuterTypeNumber"/> <!-- Checks for whitespace --> <!-- See http://checkstyle.sf.net/config_whitespace.html --> <module name="EmptyForInitializerPad"/> <module name="EmptyForIteratorPad"/> <module name="GenericWhitespace"/> <!-- severity is at ignore until we fix the other issues --> <module name="MethodParamPad"> <property name="severity" value="ignore"/> </module> <module name="NoWhitespaceAfter"> <property name="severity" value="ignore"/> </module> <module name="NoWhitespaceBefore"> <property name="severity" value="ignore"/> </module> <module name="OperatorWrap"> <property name="severity" value="ignore"/> </module> <module name="ParenPad"> <property name="severity" value="ignore"/> </module> <module name="TypecastParenPad"> <property name="severity" value="ignore"/> </module> <module name="WhitespaceAfter"> <property name="severity" value="ignore"/> </module> <module name="WhitespaceAround"> <!-- Intentionally excludes RCURLY (default) since it trips on anonymous inner class declarations when chained with a method call. --> <property name="severity" value="error"/> <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"/> </module> <!-- Modifier Checks --> <!-- See http://checkstyle.sf.net/config_modifiers.html --> <module name="ModifierOrder"> <property name="severity" value="error"/> </module> <module name="RedundantModifier"> <property name="severity" value="error"/> </module> <!-- Checks for blocks. You know, those {}'s --> <!-- See http://checkstyle.sf.net/config_blocks.html --> <module name="AvoidNestedBlocks"> <property name="severity" value="error"/> </module> <module name="EmptyBlock"> <!-- Allow comments to satisfy the EmptyBlock check --> <property name="option" value="text"/> <property name="severity" value="error"/> </module> <module name="LeftCurly"> <property name="severity" value="error"/> </module> <module name="NeedBraces"> <property name="severity" value="error"/> </module> <module name="RightCurly"> <property name="severity" value="error"/> </module> <!-- Checks for common coding problems --> <!-- See http://checkstyle.sf.net/config_coding.html --> <module name="CovariantEquals"> <property name="severity" value="error"/> </module> <module name="EmptyStatement"> <property name="severity" value="error"/> </module> <module name="EqualsAvoidNull"> <property name="severity" value="error"/> </module> <module name="EqualsHashCode"> <property name="severity" value="error"/> </module> <module name="HiddenField"> <property name="ignoreConstructorParameter" value="true"/> <property name="ignoreSetter" value="true"/> <property name="severity" value="warning"/> </module> <!-- Checks for catch of overly general exception classes like RuntimeException, Exception, Throwable, etc. --> <module name="IllegalCatch"> <property name="severity" value="error"/> </module> <!-- disallow calling constructors on these classes calling factories is the only way to create these objects --> <module name="IllegalInstantiation"> <property name="classes" value="java.lang.Boolean"/> <property name="severity" value="error"/> </module> <module name="IllegalToken"> <property name="tokens" value="LITERAL_NATIVE"/> <property name="severity" value="error"/> </module> <module name="MissingSwitchDefault"> <property name="severity" value="error"/> </module> <module name="ModifiedControlVariable"> <property name="severity" value="error"/> </module> <module name="SimplifyBooleanExpression"> <property name="severity" value="error"/> </module> <module name="SimplifyBooleanReturn"> <property name="severity" value="error"/> </module> <module name="StringLiteralEquality"> <property name="severity" value="error"/> </module> <module name="NestedForDepth"> <property name="max" value="2"/> <property name="severity" value="error"/> </module> <module name="NestedTryDepth"> <property name="max" value="1"/> <property name="severity" value="error"/> </module> <module name="NoClone"> <property name="severity" value="error"/> </module> <module name="NoFinalizer"> <property name="severity" value="error"/> </module> <module name="SuperClone"> <property name="severity" value="error"/> </module> <module name="SuperFinalize"> <property name="severity" value="error"/> </module> <!-- disallow throws Throwable unless a superclass or interface requires this --> <module name="IllegalThrows"> <property name="severity" value="error"/> </module> <module name="PackageDeclaration"> <property name="severity" value="error"/> </module> <module name="ParameterAssignment"> <property name="severity" value="error"/> </module> <module name="DefaultComesLast"> <property name="severity" value="error"/> </module> <module name="FallThrough"> <property name="severity" value="error"/> </module> <module name="MultipleVariableDeclarations"> <property name="severity" value="error"/> </module> <module name="UnnecessaryParentheses"> <property name="severity" value="error"/> </module> <module name="OneStatementPerLine"> <property name="severity" value="error"/> </module> <module name="FinalClass"> <property name="severity" value="error"/> </module> <module name="HideUtilityClassConstructor"> <property name="severity" value="error"/> </module> <module name="InterfaceIsType"> <property name="severity" value="error"/> </module> <module name="VisibilityModifier"> <property name="protectedAllowed" value="true"/> <!-- Allow public members at the coder's discretion, for struct-like things. --> <property name="publicMemberPattern" value="^.*$" /> <property name="severity" value="error"/> </module> <module name="MutableException"> <property name="severity" value="error"/> </module> <!-- Miscellaneous other checks. --> <!-- See http://checkstyle.sf.net/config_misc.html --> <module name="ArrayTypeStyle"> <property name="severity" value="error"/> </module> <module name="UpperEll"> <property name="severity" value="error"/> </module> <module name="ArrayTypeStyle"> <property name="severity" value="error"/> </module> <module name="OuterTypeFilename"> <property name="severity" value="error"/> </module> <!-- Regexp checks --> <module name="RegexpSinglelineJava"> <property name="severity" value="error"/> <property name="format" value="System.exit"/> <property name="ignoreComments" value="true"/> <property name="message" value="Don't System.exit(), throw a RuntimeException()" /> </module> </module> </module>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy