Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

297 lines (295 sloc) 16.615 kb
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!-- For available checks, see http://checkstyle.sourceforge.net/availablechecks.html -->
<module name="Checker">
<module name="TreeWalker">
<!-- This check controls the style with the usage of annotations. -->
<module name="AnnotationUseStyle">
<property name="elementStyle" value="compact_no_array"/>
<property name="closingParens" value="never"/>
<property name="trailingArrayComma" value="never"/>
</module>
<!-- This check controls the style with the usage of annotations. -->
<module name="AnonInnerLength">
<property name="max" value="15"/>
</module>
<!-- Checks if array initialization contains optional trailing comma. -->
<module name="ArrayTrailingComma"/>
<!-- Checks the style of array type definitions. -->
<module name="ArrayTypeStyle">
<property name="javaStyle" value="true"/>
</module>
<!-- Check that finds import statements that use the * notation. -->
<module name="AvoidStarImport">
<property name="excludes" value=""/>
</module>
<!-- Restricts nested boolean operators (&&, ||, &, | and ^) to a specified depth -->
<module name="BooleanExpressionComplexity">
<property name="max" value="4"/>
<property name="tokens" value="LAND, BAND, LOR, BOR, BXOR, LAND, BAND, LOR, BOR, BXOR"/>
</module>
<!-- This metric measures the number of instantiations of other classes within the given class. -->
<module name="ClassDataAbstractionCoupling">
<property name="max" value="7"/>
</module>
<!-- The number of other classes a given class relies on. -->
<module name="ClassFanOutComplexity"/>
<!-- Checks that class type parameter names conform to a format specified by the format property. -->
<module name="ClassTypeParameterName">
<property name="format" value="^[A-Z]$"/>
</module>
<!-- Checks that constant names conform to a format specified by the format property. -->
<module name="ConstantName">
<property name="format" value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"/>
</module>
<!-- Checks that if a class defines a covariant method equals, then it defines method equals(java.lang.Object). -->
<module name="CovariantEquals"/>
<!-- Check that the default is after all the cases in a switch statement. -->
<module name="DefaultComesLast"/>
<!-- Checks that classes are designed for inheritance. -->
<module name="DesignForExtension"/>
<!-- Detect the double-checked locking idiom. -->
<module name="DoubleCheckedLocking"/>
<!-- Checks for empty blocks. Must be commented if found. -->
<module name="EmptyBlock">
<property name="option" value="text"/>
</module>
<!-- Checks the padding of an empty for initializer; that is whether a space is required at an empty for initializer, or such spaces are forbidden. -->
<module name="EmptyForInitializerPad">
<property name="option" value="space"/>
</module>
<!-- Checks the padding of an empty for iterator; that is whether a space is required at an empty for iterator, or such spaces are forbidden. -->
<module name="EmptyForIteratorPad">
<property name="option" value="space"/>
</module>
<!-- Detects empty statements. -->
<module name="EmptyStatement"/>
<!-- Checks that any combination of String literals with optional assignment is on the left side of an equals() comparison. -->
<module name="EqualsAvoidNull"/>
<!-- Checks that classes that override equals() also override hashCode(). -->
<module name="EqualsHashCode"/>
<!-- Checks if any class or object member explicitly initialized to default for its type value. -->
<module name="ExplicitInitialization"/>
<!-- Checks for fall through in switch statements Finds locations where a case contains Java code - but lacks a break, return, throw or continue statement. -->
<module name="FallThrough"/>
<!-- Checks that class which has only private ctors is declared as final. -->
<module name="FinalClass"/>
<!-- Ensures that local variables that never get their values changed, must be declared final. -->
<module name="FinalLocalVariable">
<property name="tokens" value="VARIABLE_DEF,PARAMETER_DEF"/>
</module>
<!-- Check that method/constructor/catch/foreach parameters are final. -->
<module name="FinalParameters">
<property name="tokens" value="METHOD_DEF,CTOR_DEF,LITERAL_CATCH"/>
</module>
<!-- Make sure that utility classes (classes that contain only static methods) do not have a public constructor. -->
<module name="HideUtilityClassConstructor"/>
<!-- Catching java.lang.Exception, java.lang.Error or java.lang.RuntimeException is almost never acceptable. -->
<module name="IllegalCatch">
<property name="illegalClassNames" value="java.lang.Throwable, java.lang.Error, java.lang.RuntimeException"/>
</module>
<!-- Checks for illegal instantiations where a factory method is preferred. -->
<module name="IllegalInstantiation">
<property name="classes" value="java.lang.Boolean"/>
</module>
<!-- Throwing java.lang.Error or java.lang.RuntimeException is almost never acceptable. -->
<module name="IllegalThrows">
<property name="illegalClassNames" value="java.lang.Throwable, java.lang.Error, java.lang.RuntimeException"/>
</module>
<!-- Checks correct indentation of Java Code. -->
<module name="Indentation"/>
<!-- Checks for assignments in subexpressions, such as in String s = Integer.toString(i = 2);. -->
<module name="InnerAssignment"/>
<!-- Implements Bloch, Effective Java, Item 17 - Use Interfaces only to define types. -->
<module name="InterfaceIsType">
<property name="allowMarkerInterfaces" value="false"/>
</module>
<!-- Ensures that the setUp(), tearDown()methods are named correctly, have no arguments, return void and are either public or protected. -->
<module name="JUnitTestCase"/>
<!-- Validates Javadoc comments to help ensure they are well formed. -->
<module name="JavadocStyle">
<property name="scope" value="private"/>
<property name="checkEmptyJavadoc" value="false"/>
</module>
<!-- This check calculates the Non Commenting Source Statements (NCSS) metric for java source files and methods. -->
<module name="JavaNCSS">
<property name="methodMaximum" value="80"/>
<property name="classMaximum" value="1500"/>
<property name="fileMaximum" value="2000"/>
</module>
<!-- Checks the placement of left curly braces on types, methods and other blocks. -->
<module name="LeftCurly">
<property name="option" value="eol"/>
<property name="maxLineLength" value="180"/>
</module>
<!-- Checks for long lines. -->
<module name="LineLength">
<property name="max" value="180"/>
</module>
<!-- Checks that local final variable names conform to a format specified by the format property. -->
<module name="LocalFinalVariableName"/>
<!-- Checks that local, non-final variable names conform to a format specified by the format property. -->
<module name="LocalVariableName"/>
<!-- Checks that instance variable names conform to a format specified by the format property. -->
<module name="MemberName"/>
<!-- Checks that method names conform to a format specified by the format property. -->
<module name="MethodName"/>
<!--
Checks the padding between the identifier of a method definition, constructor definition,
method call, or constructor invocation; and the left parenthesis of the parameter list.
-->
<module name="MethodParamPad">
<property name="option" value="nospace"/>
</module>
<!-- Checks that class type parameter names conform to a format specified by the format property. -->
<module name="MethodTypeParameterName"/>
<!-- Checks that classes (except abstract one) define a ctor and don't rely on the default one. -->
<module name="MissingCtor"/>
<!-- Verifies that both the java.lang.Deprecated annotation is present and the @deprecated Javadoc tag is present when either is present. -->
<module name="MissingDeprecated"/>
<!-- Verifies that the java.lang.Override annotation is present when the {@inheritDoc} javadoc tag is present. -->
<module name="MissingOverride"/>
<!-- Checks that switch statement has "default" clause. -->
<module name="MissingSwitchDefault"/>
<!-- Check for ensuring that for loop control variables are not modified inside the for block. -->
<module name="ModifiedControlVariable"/>
<!-- Checks that the order of modifiers conforms to the suggestions in the Java Language specification. -->
<module name="ModifierOrder"/>
<!-- Checks that each variable declaration is in its own statement and on its own line. -->
<module name="MultipleVariableDeclarations"/>
<!-- Ensures that exceptions are immutable. -->
<module name="MutableException"/>
<!-- Restricts nested if-else blocks to a specified depth. -->
<module name="NestedIfDepth">
<property name="max" value="2"/>
</module>
<!-- Restricts nested if-else blocks to a specified depth. -->
<module name="NestedTryDepth">
<property name="max" value="2"/>
</module>
<!-- Checks that there is no whitespace after a token. -->
<module name="NoWhitespaceAfter">
<property name="allowLineBreaks" value="false"/>
</module>
<!-- Checks that there is no whitespace before a token. -->
<module name="NoWhitespaceBefore">
<property name="allowLineBreaks" value="false"/>
</module>
<!-- Checks line wrapping for operators. -->
<module name="OperatorWrap"/>
<!-- Checks for the number of defined types at the "outer" level. -->
<module name="OuterTypeNumber"/>
<!-- This check makes sure that all package annotations are in the package-info.java file. -->
<module name="PackageAnnotation"/>
<!-- Ensures there is a package declaration. -->
<module name="PackageDeclaration"/>
<!-- Checks that package names conform to a format specified by the format property. -->
<module name="PackageName"/>
<!-- Disallow assignment of parameters. -->
<module name="ParameterAssignment"/>
<!-- Checks that parameter names conform to a format specified by the format property. -->
<module name="ParameterName"/>
<!-- Checks the number of parameters that a method or constructor has. -->
<module name="ParameterNumber">
<property name="max" value="7"/>
</module>
<!-- Checks the padding of parentheses. -->
<module name="ParenPad">
<property name="option" value="space"/>
</module>
<!-- Checks for redundant modifiers in interface and annotation definitions. -->
<module name="RedundantModifier"/>
<!-- Checks for redundant exceptions declared in throws clause such as duplicates, unchecked exceptions or subclasses of another declared exception. -->
<module name="RedundantThrows">
<property name="logLoadErrors" value="true"/>
<property name="suppressLoadErrors" value="true"/>
</module>
<!-- Implementation of a check that looks for System.out in java files. -->
<module name="RegexpSinglelineJava">
<property name="format" value="System\.out"/>
<property name="ignoreComments" value="true"/>
</module>
<!-- Implementation of a check that looks for System.err in java files. -->
<module name="RegexpSinglelineJava">
<property name="format" value="System\.err"/>
<property name="ignoreComments" value="true"/>
</module>
<!-- Implementation of a check that looks for printStackTrace in java files. -->
<module name="RegexpSinglelineJava">
<property name="format" value="printStackTrace"/>
<property name="ignoreComments" value="true"/>
</module>
<!-- Checks the placement of right curly braces. -->
<module name="RightCurly">
<property name="option" value="same"/>
</module>
<!-- Checks for overly complicated boolean expressions. -->
<module name="SimplifyBooleanExpression"/>
<!-- Checks for overly complicated boolean return statements. -->
<module name="SimplifyBooleanReturn"/>
<!-- Checks that static, non-final variable names conform to a format specified by the format property. -->
<module name="StaticVariableName"/>
<!-- Checks that string literals are not used with == or !=. -->
<module name="StringLiteralEquality"/>
<!-- Checks that an overriding finalize() method invokes super.finalize(). -->
<module name="SuperFinalize"/>
<!-- Restricts throws statements to a specified count. -->
<module name="ThrowsCount">
<property name="max" value="2"/>
</module>
<!-- A check for TODO comments. -->
<module name="TodoComment">
<property name="format" value="TODO"/>
</module>
<!-- The check to ensure that requires that comments be the only thing on a line. -->
<module name="TrailingComment"/>
<!-- Checks that type names conform to a format specified by the format property. -->
<module name="TypeName"/>
<!-- Checks the padding of parentheses for typecasts. -->
<module name="TypecastParenPad">
<property name="option" value="space"/>
</module>
<!-- Detects uncommented main methods. -->
<module name="UncommentedMain">
<property name="excludedClasses" value="\.Main$"/>
</module>
<!-- Checks if unnecessary parentheses are used in a statement or expression. -->
<module name="UnnecessaryParentheses"/>
<!-- Checks for unused import statements. -->
<module name="UnusedImports"/>
<!-- Checks that long constants are defined with an upper ell. -->
<module name="UpperEll"/>
<!-- Checks visibility of class members. -->
<module name="VisibilityModifier">
<property name="packageAllowed" value="true"/>
<property name="protectedAllowed" value="false"/>
<property name="publicMemberPattern" value="^serialVersionUID$"/>
</module>
<!-- Checks that a token is followed by whitespace, with the exception that it does not check for whitespace after the semicolon of an empty for iterator. -->
<module name="WhitespaceAfter"/>
<!-- Checks that a token is surrounded by whitespace. -->
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
</module>
</module>
<!-- Checks for long source files. -->
<module name="FileLength">
<property name="max" value="2000"/>
</module>
<!-- Checks to see if a file contains a tab character. -->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="Header">
<property name="header" value="/*\n * Copyright (c) 2012, FOSS Nova Software foundation (FNSF),"/>
<property name="charset" value="UTF-8"/>
<property name="fileExtensions" value="java"/>
</module>
<!-- Checks that there is a newline at the end of each file. -->
<module name="NewlineAtEndOfFile">
<property name="fileExtensions" value="java, xml"/>
</module>
</module>
Jump to Line
Something went wrong with that request. Please try again.