Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
233 lines (202 sloc) 7.94 KB
<?xml version="1.0"?>
<!--
~ Copyright 2010 Greplin, Inc. All Rights Reserved.
-->
<!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="severity" value="error"/>
<!--<module name="SuppressionFilter">-->
<!--<property name="file" value="checkstyle-suppressions.xml"/>-->
<!--</module>-->
<module name="FileTabCharacter">
<property name="eachLine" value="false"/>
</module>
<module name="FileLength">
<property name="fileExtensions" value="java"/>
</module>
<module name="NewlineAtEndOfFile"/>
<module name="RegexpSingleline">
<property name="format" value="new Closeable\(\)"/>
<property name="message" value="Remember that anonymous inner classes have hard refs to the outer class!"/>
</module>
<!-- the authors' copyright notice needs to be there -->
<module name="RegexpSingleline">
<property name="format" value="Copyright \d{4} the hegemon authors."/>
<property name="minimum" value="1"/>
<!-- Need to specify a maximum, so 10 times is more than enough. -->
<property name="maximum" value="10"/>
</module>
<!-- And so do the apache clauses -->
<module name="RegexpSingleline">
<property name="format" value="Licensed under the Apache License, Version 2.0"/>
<property name="minimum" value="1"/>
<!-- Need to specify a maximum, so 10 times is more than enough. -->
<property name="maximum" value="10"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="^\s*//\S"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="^\s*(protected|public|private) [A-Z][^/(,]+$"/>
<property name="message" value="Member variables must be final or have a MUTABLE comment explaining why not"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="new (Integer|Long|Double|Float)\("/>
<property name="message" value="Unnecessary boxing of a numeric type"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="import\s+javax\.inject\."/>
<property name="message" value="Did you mean to use com.googe.inject?"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="StringBuffer"/>
<property name="message" value="Use StringBuilder instead of StringBuffer"/>
</module>
<module name="TreeWalker">
<property name="tabWidth" value="4"/>
<module name="ArrayTrailingComma"/>
<module name="AnnotationUseStyle"/>
<module name="AvoidStarImport"/>
<module name="ConstantName">
<property name="format" value="^((log)|([A-Z][A-Z0-9]*(_[A-Z0-9]+)*))$"/>
</module>
<module name="CyclomaticComplexity">
<property name="severity" value="ignore"/>
</module>
<module name="EmptyBlock">
<property name="option" value="text"/>
</module>
<module name="EmptyForIteratorPad"/>
<module name="EmptyStatement"/>
<module name="EqualsAvoidNull"/>
<module name="EqualsHashCode"/>
<module name="ExecutableStatementCount">
<property name="max" value="30" />
</module>
<module name="FileContentsHolder"/>
<module name="GenericWhitespace"/>
<module name="HideUtilityClassConstructor"/>
<module name="IllegalCatch"/>
<module name="IllegalImport"/>
<module name="IllegalInstantiation"/>
<module name="IllegalThrows"/>
<module name="Indentation">
<property name="basicOffset" value="2"/>
<property name="braceAdjustment" value="0"/>
<property name="caseIndent" value="2"/>
</module>
<module name="InnerAssignment"/>
<module name="JavadocMethod">
<property name="scope" value="protected"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
</module>
<module name="JavadocType">
<property name="scope" value="protected"/>
</module>
<module name="JavadocStyle">
<property name="scope" value="protected"/>
</module>
<module name="LeftCurly">
<property name="option" value="eol"/>
<property name="maxLineLength" value="120"/>
</module>
<module name="LineLength">
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
<property name="max" value="120"/>
</module>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="MethodParamPad"/>
<module name="MissingSwitchDefault"/>
<module name="MissingOverride">
<property name="javaFiveCompatibility" value="true"/>
</module>
<module name="ModifierOrder"/>
<module name="NeedBraces"/>
<module name="NestedIfDepth">
<property name="max" value="3"/>
</module>
<module name="NestedTryDepth">
<property name="max" value="2"/>
</module>
<module name="NoWhitespaceAfter">
<property name="tokens" value="ARRAY_INIT"/>
<property name="tokens" value="BNOT"/>
<property name="tokens" value="DEC"/>
<property name="tokens" value="DOT"/>
<property name="tokens" value="INC"/>
<property name="tokens" value="LNOT"/>
<property name="tokens" value="UNARY_MINUS"/>
<property name="tokens" value="UNARY_PLUS"/>
</module>
<module name="NoWhitespaceBefore"/>
<module name="NoWhitespaceBefore">
<property name="tokens" value="DOT"/>
<property name="allowLineBreaks" value="true"/>
</module>
<module name="OperatorWrap"/>
<module name="OperatorWrap">
<property name="tokens" value="ASSIGN"/>
<property name="tokens" value="DIV_ASSIGN"/>
<property name="tokens" value="PLUS_ASSIGN"/>
<property name="tokens" value="MINUS_ASSIGN"/>
<property name="tokens" value="STAR_ASSIGN"/>
<property name="tokens" value="MOD_ASSIGN"/>
<property name="tokens" value="SR_ASSIGN"/>
<property name="tokens" value="BSR_ASSIGN"/>
<property name="tokens" value="SL_ASSIGN"/>
<property name="tokens" value="BXOR_ASSIGN"/>
<property name="tokens" value="BOR_ASSIGN"/>
<property name="tokens" value="BAND_ASSIGN"/>
<property name="option" value="eol"/>
</module>
<module name="OuterTypeNumber"/>
<module name="PackageAnnotation"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="ParenPad"/>
<module name="RedundantImport"/>
<module name="RedundantModifier"/>
<module name="RequireThis">
<property name="checkMethods" value="false"/>
</module>
<module name="RightCurly"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StaticVariableName">
<property name="format" value="^([A-Z][a-z]+)+$"/>
</module>
<module name="SuppressWarnings"/>
<module name="TypecastParenPad"/>
<module name="TypeName"/>
<module name="UnnecessaryParentheses"/>
<module name="UnusedImports"/>
<module name="UpperEll"/>
<module name="VisibilityModifier">
<property name="protectedAllowed" value="true"/>
<property name="publicMemberPattern" value="((^serialVersionUID)|Stat)$"/>
</module>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
</module>
</module>
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="lint\: disable=([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
<property name="influenceFormat" value="0"/>
</module>
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="lint\: disable=([\w\|]+) next (\d+) lines"/>
<property name="checkFormat" value="$1"/>
<property name="influenceFormat" value="$2"/>
</module>
</module>