Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
315 lines (288 sloc) 12.4 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">
<!--
Copyright (c) 2016-2017, Mihai Emil Andronache
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of camel nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@link http://checkstyle.sourceforge.net/config.html
-->
<module name="Checker">
<!--
Enforces English locale to be independent from the
default locale which may vary between environments.
-->
<property name="localeLanguage" value="en"/>
<!--
Checks that property files contain the same keys.
-->
<module name="Translation"/>
<!-- Checks for duplicate code -->
<!-- https://sourceforge.net/p/checkstyle/bugs/693/ -->
<!-- <module name="StrictDuplicateCode"/> -->
<!--
Maximum number of lines in any .java file is limited.
-->
<module name="FileLength">
<property name="max" value="1000"/>
<property name="fileExtensions" value="java"/>
</module>
<!--
TAB chars are not allowed anywhere.
-->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
<property name="fileExtensions" value="java,txt,xml,xsl,xsd,properties,groovy,vm,MF,sh,sql,tokens,g,spec,css,csv"/>
</module>
<!--
C++ style inline comment is not allowed.
-->
<module name="RegexpSingleline">
<property name="format" value="/\*.*\*/"/>
<property name="message" value="This kind of comment is not allowed."/>
</module>
<!--
Windows line endings are not allowed.
-->
<module name="RegexpMultiline">
<property name="format" value="\r\n$"/>
<property name="message"
value="Lines in file should end with Unix-like end of line"/>
</module>
<!--
JavaDoc regexp checks
-->
<module name="RegexpSingleline">
<property name="format" value="\* +@return +[^A-Z]"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="@return tag description should start with capital letter"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="\* +@param +\w+ +[^A-Z]"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="@param tag description should start with capital letter"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="/\*\* +[^A-Z\{]"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="First sentence in a comment should start with a capital letter"/>
</module>
<module name="RegexpMultiline">
<property name="format" value="/\*\*\W+\* +[^A-Z\{]"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="First sentence in a comment should start with a capital letter"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="synchronized +\(this\) +\{"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="Using THIS as a lock is a bad practice (use class variable instead)"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="synchronized +\([\w\.]\.class\) +\{"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="Using class as a lock is a bad practice (use class variable instead)"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="org\.apache\.commons\.(codec|lang3?)\.CharEncoding"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="Use 'java.nio.charset.StandardCharsets' instead"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="^(?! *(/\*\*|\*|//)).*[\.\-\+%/\*&lt;&gt;] *$"/>
<property name="fileExtensions" value="java"/>
<property name="message" value="Line cannot end with this symbol, move it to the next line"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="^ *="/>
<property name="fileExtensions" value="java"/>
<property name="message" value="Line cannot start with this symbol, move it to the previous line"/>
</module>
<!--
Enable suppressions
-->
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="@checkstyle (\w+) \((\d+) lines?\)"/>
<property name="checkFormat" value="$1"/>
<property name="influenceFormat" value="$2"/>
</module>
<module name="TreeWalker">
<property name="cacheFile" value="target/qulice_cachefile" />
<!-- to enable suppressions -->
<module name="FileContentsHolder"/>
<!-- Checks for blocks. -->
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<module name="AvoidNestedBlocks"/>
<!-- Checks for class design. -->
<module name="VisibilityModifier"/>
<module name="FinalClass"/>
<module name="InterfaceIsType"/>
<module name="HideUtilityClassConstructor"/>
<module name="DesignForExtension"/>
<module name="MutableException"/>
<module name="ThrowsCount" />
<module name="InnerTypeLast"/>
<!-- Checks for common coding problems -->
<module name="ArrayTrailingComma"/>
<module name="AvoidInlineConditionals"/>
<module name="CovariantEquals"/>
<module name="EmptyStatement"/>
<module name="EqualsAvoidNull"/>
<module name="EqualsHashCode"/>
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
</module>
<module name="IllegalInstantiation"/>
<module name="IllegalTokenText" />
<module name="InnerAssignment"/>
<module name="MissingSwitchDefault"/>
<module name="ModifiedControlVariable"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="NestedForDepth"/>
<module name="NestedIfDepth">
<property name="max" value="3"/>
</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"/>
<module name="ReturnCount">
<property name="max" value="1"/>
</module>
<module name="IllegalType"/>
<module name="ParameterAssignment"/>
<module name="ExplicitInitialization"/>
<module name="DefaultComesLast"/>
<module name="FallThrough"/>
<module name="MultipleVariableDeclarations"/>
<module name="RequireThis"/>
<module name="UnnecessaryParentheses"/>
<module name="OneStatementPerLine"/>
<!-- Checks for imports. -->
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="NoLineWrap"/>
<!-- Checks for Javadoc comments. -->
<module name="JavadocType">
<property name="allowUnknownTags" value="true"/>
</module>
<module name="JavadocMethod"/>
<module name="JavadocVariable"/>
<module name="JavadocStyle"/>
<!-- Metrics. -->
<module name="BooleanExpressionComplexity"/>
<module name="ClassDataAbstractionCoupling">
<property name="max" value="20"/>
</module>
<module name="ClassFanOutComplexity">
<!--
Total number of classes that a particular class
depends on. We're increasing this value because
default "20" is too low.
-->
<property name="max" value="30"/>
</module>
<module name="CyclomaticComplexity"/>
<module name="NPathComplexity"/>
<module name="JavaNCSS"/>
<!-- Miscellaneous other checks. -->
<module name="TodoComment"/>
<module name="UpperEll"/>
<module name="ArrayTypeStyle"/>
<module name="FinalParameters">
<property name="tokens" value="CTOR_DEF,METHOD_DEF,FOR_EACH_CLAUSE,LITERAL_CATCH"/>
</module>
<module name="Indentation"/>
<module name="CommentsIndentation"/>
<module name="TrailingComment"/>
<module name="OuterTypeFilename"/>
<!-- Modifier Checks. -->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<!-- Checks for Naming Conventions. -->
<module name="AbbreviationAsWordInNameCheck">
<property name="allowedAbbreviations" value="IT"/>
<property name="allowedAbbreviationLength" value="1"/>
</module>
<module name="ClassTypeParameterName"/>
<module name="ConstantName"/>
<module name="LocalFinalVariableName">
<property name="format" value="^(id|[A-Za-z]{3,20})$"/>
<property name="tokens" value="VARIABLE_DEF"/>
</module>
<module name="LocalVariableName">
<property name="format" value="^(i|j|k|id|[A-Za-z]{3,20})$"/>
</module>
<module name="CatchParameterName">
<property name="format" value="^(ex|[A-Za-z]{3,20})$"/>
</module>
<module name="MemberName">
<property name="format" value="^(id|[A-Za-z]{3,20})$"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z]{2,}[a-zA-Z]+$"/>
</module>
<module name="MethodTypeParameterName"/>
<module name="PackageName"/>
<module name="ParameterName">
<property name="format" value="^(id|[A-Za-z]{3,})$"/>
</module>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<!-- Checks for Size Violations. -->
<module name="ExecutableStatementCount">
<property name="max" value="20"/>
</module>
<module name="LineLength">
<property name="max" value="80"/>
<property name="ignorePattern" value="^import .*$|^\s+\*\s.*https?:\/\/.+"/>
</module>
<module name="AnonInnerLength" />
<module name="MethodLength"/>
<module name="ParameterNumber">
<property name="max" value="3"/>
</module>
<module name="OuterTypeNumber"/>
<module name="MethodCount"/>
<!-- Checks for whitespace. -->
<module name="GenericWhitespace"/>
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
</module>
</module>
You can’t perform that action at this time.