Created
September 24, 2015 15:12
-
-
Save athkalia/a8e910c65536f578bf16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE module PUBLIC | |
"-//Puppy Crawl//DTD Check Configuration 1.3//EN" | |
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> | |
<!--All the rules for the checkstyle static analysis tool. Some rules run under | |
the 'Checker' module while most of them run under the 'TreeWalker' module.--> | |
<module name="Checker"> | |
<!--=================================================================== Configuration ===================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config.html--> | |
<module name="SuppressionFilter"> | |
<!--property exists in follower pom.xml--> | |
<property name="file" value="${checkstyle.suppressions.file}"/> | |
</module> | |
<!--Allow @SuppressWarnings annotation for checkstyle.--> | |
<module name="SuppressWarningsFilter"/> | |
<!--Allow the use of //CHECKSTYLE.OFF: <check> and //CHECKSTYLE.ON: <check> for suppressing a particular line of code.--> | |
<module name="SuppressionCommentFilter"> | |
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/> | |
<property name="onCommentFormat" value="CHECKSTYLE.ON\: ([\w\|]+)"/> | |
<property name="checkFormat" value="$1"/> | |
</module> | |
<!--====================================================================== Header =======================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_header.html--> | |
<!--Rule disabled - we are not using headers in the project--> | |
<!--<module name="Header"/>--> | |
<!--Rule disabled - we are not using any headers in the project--> | |
<!--<module name="RegexpHeader"/>--> | |
<!--=================================================================== Javadoc Comments ================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_javadoc.html--> | |
<module name="JavadocPackage"/> | |
<!--=================================================================== Miscellaneous ===================================================================--> | |
<!--http://checkstyle.sourceforge.net/config_misc.html--> | |
<module name="NewlineAtEndOfFile"> | |
<property name="lineSeparator" value="lf"/> | |
</module> | |
<!--Rule disabled - we do not have any multi-lingual property files.--> | |
<!--<module name="Translation"/>--> | |
<!--Rule disabled - not looking at any property files for duplicates at the moment--> | |
<!--<module name="UniqueProperties"/>--> | |
<!--===================================================================== Regexp ========================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_regexp.html--> | |
<!--Rule disabled - we are not using any custom regular expressions to match warnings.--> | |
<!--<module name="RegexpSingleline"/>--> | |
<!--Rule disabled - we are not using any custom regular expressions to match warnings.--> | |
<!--<module name="RegexpMultiline"/>--> | |
<!--================================================================= Size Violations ===================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_sizes.html--> | |
<module name="FileLength"/> | |
<!--================================================================== Whitespace ===================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_whitespace.html--> | |
<module name="FileTabCharacter"/> | |
<module name="TreeWalker"> | |
<!--================================================================ Configuration ==================================================================--> | |
<!--This module is needed to work with the SuppressionCommentFilter module that is defined on the 'Configuration' section above.--> | |
<module name="FileContentsHolder"/> | |
<!--================================================================== Annotations ==================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_annotation.html--> | |
<module name="AnnotationUseStyle"/> | |
<module name="MissingDeprecated"/> | |
<module name="MissingOverride"/> | |
<module name="PackageAnnotation"/> | |
<module name="SuppressWarnings"/> | |
<module name="SuppressWarningsHolder"/> | |
<module name="AnnotationLocation"> | |
<property name="allowSamelineMultipleAnnotations" value="true"/> | |
</module> | |
<!--================================================================== Block Checks =================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_blocks.html--> | |
<module name="EmptyBlock"/> | |
<module name="LeftCurly"/> | |
<module name="NeedBraces"/> | |
<module name="RightCurly"/> | |
<module name="AvoidNestedBlocks"/> | |
<!--================================================================= Class Design ==================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_design.html--> | |
<module name="VisibilityModifier"> | |
<property name="packageAllowed" value="true"/> | |
<property name="protectedAllowed" value="true"/> | |
</module> | |
<module name="FinalClass"/> | |
<module name="InterfaceIsType"/> | |
<module name="HideUtilityClassConstructor"/> | |
<!--Rule disabled - Too demanding rule.--> | |
<!--<module name="DesignForExtension"/>--> | |
<module name="MutableException"> | |
<property name="format" value="^.*Exception$"/> | |
</module> | |
<module name="ThrowsCount"> | |
<property name="max" value="3"/> | |
</module> | |
<module name="InnerTypeLast"/> | |
<module name="OneTopLevelClass"/> | |
<!--==================================================================== Coding =====================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_coding.html--> | |
<module name="ArrayTrailingComma"/> | |
<!--Rule disabled - we are using inline conditionals.--> | |
<!--<module name="AvoidInlineConditionals"/>--> | |
<module name="VariableDeclarationUsageDistance"/> | |
<module name="CovariantEquals"/> | |
<module name="EmptyStatement"/> | |
<module name="EqualsAvoidNull"/> | |
<module name="EqualsHashCode"/> | |
<module name="FinalLocalVariable"/> | |
<!--Rule disabled - we are using method parameters with the same name as fields.--> | |
<!--<module name="HiddenField"/>--> | |
<module name="IllegalInstantiation"/> | |
<!--Rule disabled - we are using the tokens mentioned in this rule like '++'.--> | |
<!--<module name="IllegalToken">--> | |
<!--Rule disabled - we are not using checkstyle to search for any custom tokens.--> | |
<!--<module name="IllegalTokenText"/>--> | |
<module name="InnerAssignment"/> | |
<module name="MagicNumber"/> | |
<module name="MissingSwitchDefault"/> | |
<module name="ModifiedControlVariable"/> | |
<module name="SimplifyBooleanExpression"/> | |
<module name="SimplifyBooleanReturn"/> | |
<module name="StringLiteralEquality"/> | |
<module name="NestedForDepth"/> | |
<!--Limit to how many nested if statements we can have.--> | |
<module name="NestedIfDepth"> | |
<property name="max" value="5"/> | |
</module> | |
<module name="NestedTryDepth"/> | |
<module name="NoClone"/> | |
<module name="NoFinalizer"/> | |
<module name="SuperClone"/> | |
<module name="SuperFinalize"/> | |
<module name="IllegalCatch"/> | |
<module name="IllegalThrows"/> | |
<module name="PackageDeclaration"/> | |
<!--Rule disabled - we can have as many return statements as we like.--> | |
<!--<module name="ReturnCount">--> | |
<module name="IllegalType"/> | |
<!--Rule disabled - this rule is causing too much trouble.--> | |
<!--<module name="DeclarationOrder"/>--> | |
<!--Rule disabled - already checked by PMD.--> | |
<!--<module name="ParameterAssignment"/>--> | |
<module name="ExplicitInitialization"/> | |
<module name="DefaultComesLast"/> | |
<!--Rule disabled - we don't want empty constructors everywhere.--> | |
<!--<module name="MissingCtor"/>--> | |
<module name="FallThrough"/> | |
<module name="MultipleStringLiterals"> | |
<property name="allowedDuplicates" value="10"/> | |
</module> | |
<module name="MultipleVariableDeclarations"/> | |
<!--Rule disabled - we are not using 'this' everywhere.--> | |
<!--<module name="RequireThis"/>--> | |
<module name="UnnecessaryParentheses"/> | |
<module name="OneStatementPerLine"/> | |
<module name="VariableDeclarationUsageDistance"/> | |
<module name="OverloadMethodsDeclarationOrder"/> | |
<!--==================================================================== Imports ====================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_imports.html--> | |
<module name="AvoidStarImport"/> | |
<!--Rule disabled - we are using static imports.--> | |
<!--<module name="AvoidStaticImport"/>--> | |
<module name="IllegalImport"/> | |
<module name="RedundantImport"/> | |
<!--Rule disabled - this rule is already enforced by pmd. Also this rule has false positives when javadoc "@link" methods are used with their imports.--> | |
<!--<module name="UnusedImports"/>--> | |
<!--Rule disabled - we are using Intellij's rules for the order of imports.--> | |
<!--<module name="ImportOrder"/>--> | |
<!--Rule disabled - we are not using import control.--> | |
<!--<module name="ImportControl"/>--> | |
<module name="CustomImportOrder"/> | |
<!--================================================================= Javadoc Comments ==============================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_javadoc.html--> | |
<!--Rule disabled - we are not using Javadoc for all class definitions.--> | |
<!--<module name="JavadocType"/>--> | |
<!--Rule disabled - we are not using Javadoc for all method definitions.--> | |
<!--<module name="JavadocMethod"/>--> | |
<!--Rule disabled - we are not using Javadoc for all variable definitions.--> | |
<!--<module name="JavadocVariable"/>--> | |
<module name="JavadocStyle"/> | |
<!--Rule disabled.--> | |
<!--<module name="WriteTag"/>--> | |
<module name="NonEmptyAtclauseDescription"/> | |
<module name="JavadocTagContinuationIndentation"/> | |
<module name="SummaryJavadoc"/> | |
<module name="AtclauseOrder"/> | |
<!--Rule disabled - we are not using any html in javadoc--> | |
<!--<module name="JavadocParagraph"/>--> | |
<module name="SingleLineJavadoc"/> | |
<!--==================================================================== Metrics ====================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_metrics.html--> | |
<module name="BooleanExpressionComplexity"> | |
<property name="max" value="3"/> | |
</module> | |
<module name="ClassDataAbstractionCoupling"> | |
<property name="max" value="10"/> | |
</module> | |
<module name="ClassFanOutComplexity"> | |
<property name="max" value="25"/> | |
</module> | |
<!--Rule disabled - we are not using cyclomatic complexity rule.--> | |
<!--<module name="CyclomaticComplexity"/>--> | |
<!--Rule disabled - we are not using NPathComplexity rule.--> | |
<!--<module name="NPathComplexity"/>--> | |
<!--Rule disabled - we are not using JavaNCSS rule.--> | |
<!--<module name="JavaNCSS"/>--> | |
<!--================================================================= Miscellaneous =================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_misc.html--> | |
<module name="TodoComment"/> | |
<module name="UncommentedMain"/> | |
<module name="UpperEll"/> | |
<module name="ArrayTypeStyle"/> | |
<module name="FinalParameters"/> | |
<!--Rule disabled - we are not using custom token searches.--> | |
<!--<module name="DescendantToken"/>--> | |
<!--Rule disabled - there's a problem with package-info files and this rules, gives us false positives--> | |
<!--<module name="Indentation"/>--> | |
<!--Rule disabled - we allow trailing comments in the project.--> | |
<!--<module name="TrailingComment"/>--> | |
<module name="OuterTypeFilename"/> | |
<module name="AvoidEscapedUnicodeCharacters"/> | |
<!--=================================================================== Modifiers ===================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_modifier.html--> | |
<module name="ModifierOrder"/> | |
<module name="RedundantModifier"/> | |
<!--============================================================== Naming Conventions ===============================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_naming.html--> | |
<module name="AbstractClassName"/> | |
<module name="ClassTypeParameterName"/> | |
<module name="ConstantName"/> | |
<module name="LocalFinalVariableName"/> | |
<module name="LocalVariableName"/> | |
<module name="MemberName"/> | |
<module name="MethodName"> | |
<!--Support method names with underscore ("_") so as to split the name into three sections: given-when-then.--> | |
<property name="format" value="^[a-z][a-zA-Z0-9_]*$"/> | |
</module> | |
<module name="MethodTypeParameterName"/> | |
<module name="InterfaceTypeParameterName"/> | |
<module name="PackageName"/> | |
<module name="ParameterName"/> | |
<module name="AbbreviationAsWordInName"/> | |
<module name="StaticVariableName"/> | |
<module name="TypeName"/> | |
<!--=================================================================== Regexp ======================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_regexp.html--> | |
<!--Rule disabled - we not not using custom regular expressions to match issues.--> | |
<!--<module name="RegexpSinglelineJava"/>--> | |
<!--==================== Size Violations ======================--> | |
<!--See http://checkstyle.sourceforge.net/config_sizes.html--> | |
<!--Rule disabled - we are not interested in this rule.--> | |
<!--<module name="ExecutableStatementCount"/>--> | |
<module name="LineLength"> | |
<property name="max" value="180"/> | |
</module> | |
<module name="MethodLength"/> | |
<module name="AnonInnerLength"> | |
<property name="max" value="40"/> | |
</module> | |
<module name="ParameterNumber"/> | |
<module name="OuterTypeNumber"/> | |
<module name="MethodCount"/> | |
<!--================================================================== Whitespace ===================================================================--> | |
<!--See http://checkstyle.sourceforge.net/config_whitespace.html--> | |
<module name="GenericWhitespace"/> | |
<module name="EmptyForInitializerPad"/> | |
<module name="EmptyForIteratorPad"/> | |
<module name="MethodParamPad"/> | |
<module name="NoWhitespaceAfter"/> | |
<module name="NoWhitespaceBefore"/> | |
<module name="OperatorWrap"> | |
<property name="option" value="eol"/> | |
</module> | |
<module name="ParenPad"/> | |
<module name="TypecastParenPad"/> | |
<module name="WhitespaceAfter"/> | |
<module name="WhitespaceAround"/> | |
<module name="NoLineWrap"/> | |
<module name="EmptyLineSeparator"> | |
<property name="allowNoEmptyLineBetweenFields" value="true"/> | |
<property name="tokens" value="IMPORT, CLASS_DEF, ENUM_DEF, INTERFACE_DEF, CTOR_DEF, METHOD_DEF, STATIC_INIT, INSTANCE_INIT, VARIABLE_DEF"/> | |
</module> | |
<module name="SeparatorWrap"/> | |
</module> | |
</module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment