All Downloads are FREE. Search and download functionalities are using the official Maven repository.

blaze-persistence.checkstyle-config.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0"?>
<!--
  Copyright 2014 - 2024 Blazebit.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License 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.
  -->
<!DOCTYPE module PUBLIC
        "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
        "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<module name="Checker">

    <!-- Checks for Size Violations.                    -->
    <!-- See http://checkstyle.sf.net/config_sizes.html -->
    <module name="FileLength">
        <property name="max" value="5000"/>
        <property name="fileExtensions" value="java"/>
    </module>

    <!-- Checks for whitespace                               -->
    <!-- See http://checkstyle.sf.net/config_whitespace.html -->
    <module name="FileTabCharacter"/>

    <module name="SuppressionFilter">
        <property name="file"
                  value="${checkstyle.suppressions.file}"
                  default="checkstyle-suppressions.xml"/>
    </module>

    <module name="SuppressWarningsFilter" />

    <!-- Javadoc -->
    <!-- See http://checkstyle.sourceforge.net/config_javadoc.html -->
    <module name="JavadocPackage"/>

    <module name="TreeWalker">

        <module name="SuppressWarningsHolder" />

        <!-- Javadoc -->
        <!-- See http://checkstyle.sourceforge.net/config_javadoc.html -->
        <module name="AtclauseOrder">
            <property name="tagOrder" value="@param, @return, @throws, @exception, @author, @version, @since, @see, @serial, @serialField, @serialData, @deprecated"/>
            <property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
        </module>
        <module name="JavadocMethod">
            <property name="accessModifiers" value="package,protected,public"/>
        </module>
        <module name="MissingJavadocMethodCheck">
            <property name="allowMissingPropertyJavadoc" value="true"/>
        </module>
        <module name="JavadocStyle">
            <property name="scope" value="public"/>
        </module>
        <module name="JavadocType">
            <property name="scope" value="package"/>
            <!-- Only first name and last name -->
            <property name="authorFormat" value="[a-zA-Z\-]+( [a-zA-Z\-])+"/>
            <!-- avoid errors on tag '@noinspection' -->
            <property name="allowUnknownTags" value="true"/>
        </module>
        <module name="NonEmptyAtclauseDescription"/>
        <module name="com.blazebit.persistence.checkstyle.JavadocSinceCheck">
            <property name="sinceFormat" value="[1-9]+\.[0-9]+\.[0-9]+"/>
        </module>

        <!-- Checks for Naming Conventions.                  -->
        <!-- See http://checkstyle.sf.net/config_naming.html -->
        <module name="MemberName">
            <!-- Allow internal methods -->
            <property name="format" value="^(\$\$_)?[a-z][a-zA-Z0-9]*$"/>
        </module>

        <module name="ConstantName">
            <!-- Allow thread locals to have non-upper case names although they are static final -->
            <property name="format"
                      value="^((threadLocal[A-Z][a-zA-Z]*)|([a-z][a-zA-Z]*ThreadLocal)|([A-Z][A-Z0-9]*(_[A-Z0-9]+)*))$"/>
        </module>

        <module name="LocalVariableName"/>
        <module name="MethodName"/>
        <module name="PackageName"/>
        <module name="LocalFinalVariableName"/>
        <module name="ParameterName"/>
        <module name="StaticVariableName"/>
        <module name="TypeName"/>

        <!-- Checks for imports                              -->
        <!-- See http://checkstyle.sf.net/config_import.html -->
        <module name="AvoidStarImport">
            <property name="excludes" value="java.io,java.net,java.util,javax.enterprise.inject.spi,javax.enterprise.context"/>
        </module>
        <module name="IllegalImport"/>
        <module name="RedundantImport"/>
        <module name="UnusedImports"/>


        <module name="MethodLength">
            <property name="max" value="450"/>
        </module>
        <module name="ParameterNumber">
            <property name="max" value="30"/>
        </module>

        <!-- Checks for blocks. You know, those {}'s         -->
        <!-- See http://checkstyle.sf.net/config_blocks.html -->
        <module name="NeedBraces"/>
        <module name="LeftCurly"/>
        <module name="RightCurly"/>

        <!-- Checks for common coding problems               -->
        <!-- See http://checkstyle.sf.net/config_coding.html -->
        <module name="EmptyStatement"/>
        <module name="EqualsHashCode"/>
        <module name="DefaultComesLast"/>
        <module name="MissingSwitchDefault"/>
        <module name="FallThrough"/>
        <module name="MultipleVariableDeclarations"/>

        <module name="HideUtilityClassConstructor"/>
        <module name="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck">
            <property name="packageAllowed" value="false"/>
            <property name="protectedAllowed" value="true"/>
            <property name="publicMemberPattern" value="^serialVersionUID"/>
            <property name="severity" value="warning"/>
        </module>

        <!-- allow usage of CHECKSTYLE:OFF and CHECKSTYLE:ON -->
        <module name="SuppressionCommentFilter">
            <property name="offCommentFormat" value="CHECKSTYLE\:OFF\: ([\w\|]+)"/>
            <property name="onCommentFormat" value="CHECKSTYLE\:ON\: ([\w\|]+)"/>
            <property name="checkFormat" value="$1"/>
        </module>

        <!-- Miscellaneous other checks.                   -->
        <!-- See http://checkstyle.sf.net/config_misc.html -->
        <module name="ArrayTypeStyle"/>
        <!-- Line with Trailing Spaces -->
        <module name="RegexpSinglelineJava">
            <property name="format" value="[^\s\r\n]\s+$"/>
            <property name="ignoreComments" value="true"/>
            <property name="message" value="Line has trailing spaces."/>
        </module>

        <module name="UpperEll"/>

        <module name="WhitespaceAround">
            <property name="tokens" value=""/>
        </module>
        <module name="StringLiteralEquality"/>
        <module name="NoFinalizer"/>
        <module name="MissingOverride"/>
        <module name="EqualsAvoidNull"/>
        <module name="DeclarationOrder"/>
        <module name="OneStatementPerLine"/>
        <module name="Indentation">
            <property name="lineWrappingIndentation" value="0"/>
        </module>
        <module name="ModifierOrder"/>
    </module>
    <module name="LineLength">
        <property name="max" value="450"/>
        <property name="ignorePattern" value="@version|@see"/>
    </module>

</module>





© 2015 - 2024 Weber Informatics LLC | Privacy Policy