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

checkstyle.checkstyle.xml Maven / Gradle / Ivy

Go to download

Resources, like Checkstyle rules and site templates, for FreeLibrary projects.

There is a newer version: 12.0.2
Show newest version
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
  "https://checkstyle.org/dtds/configuration_1_3.dtd">

<!-- Checkstyle-Configuration: FreeLibrary Description: Checkstyle configuration for the FreeLibrary projects -->
<module name="Checker">
  <property name="severity" value="warning" />
  <module name="LineLength">
    <property name="id" value="lineLengthChecker" />
    <property name="max" value="120" />
    <property name="fileExtensions" value="java, py, sh, txt" />
  </module>
  <module name="TreeWalker">
    <module name="RedundantImport" />
    <module name="RedundantModifier" />
    <module name="UnusedImports" />
    <module name="AvoidStarImport">
      <property name="excludes" value="j2html.TagCreator,org.junit.Assert,info.freelibrary.util.Constants" />
    </module>
    <module name="ConstantName" />
    <module name="EqualsHashCode" />
    <module name="StringLiteralEquality" />
    <module name="SuperClone" />
    <module name="IllegalImport" />
    <module name="DefaultComesLast" />
    <module name="InnerTypeLast" />
    <module name="UpperEll" />
    <module name="MemberName">
      <property name="format" value="^(my|is|has)[A-Z0-9][a-zA-Z0-9]*$" />
    </module>
    <!-- Below checks to make sure there are no stray main methods -->
    <module name="UncommentedMain" />
    <module name="UnnecessaryParentheses" />
    <module name="DeclarationOrder" />
    <module name="SuperFinalize" />
    <module name="EmptyStatement" />
    <module name="SingleSpaceSeparator" />
    <module name="EqualsAvoidNull" />
    <module name="FinalClass" />
    <module name="EmptyCatchBlock">
      <property name="exceptionVariableName" value="expected" />
    </module>
    <module name="BooleanExpressionComplexity">
      <property name="max" value="4" />
    </module>
    <module name="MissingJavadocMethod">
      <property name="scope" value="private" />
    </module>
    <module name="JavadocMethod">
      <property name="validateThrows" value="true" />
      <property name="allowedAnnotations"
        value="Override, Test, Before, BeforeClass, After, AfterClass, JsonInclude, JsonGetter, JsonSetter, JsonProperty" />
    </module>
    <module name="JavadocType">
      <property name="excludeScope" value="anoninner" />
    </module>
    <module name="NonEmptyAtclauseDescription"/>
    <module name="InvalidJavadocPosition"/>
    <module name="JavadocVariable" />
    <module name="MissingJavadocPackage" />
    <module name="SummaryJavadocCheck" />
    <module name="MissingJavadocType">
      <property name="scope" value="private" />
    </module>
    <module name="JavadocStyle">
      <property name="checkFirstSentence" value="false"/>
    </module>
    <module name="NeedBraces" />
    <module name="LeftCurly" />
    <module name="RightCurly" />
    <module name="WhitespaceAround">
      <property name="tokens"
        value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND" />
    </module>
    <module name="Indentation">
      <property name="throwsIndent" value="8" />
    </module>
    <module name="SuppressWarningsHolder" />
    <module name="FinalLocalVariable" />
    <module name="FinalParameters" />
    <module name="GenericWhitespace" />
    <module name="MissingDeprecated" />
    <module name="MultipleStringLiterals">
      <property name="allowedDuplicates" value="1" />
    </module>
    <module name="MissingSwitchDefault" />
    <module name="MultipleVariableDeclarations" />
    <module name="ParameterName">
      <property name="format" value="^a[a-zA-Z0-9]+$" />
    </module>
    <module name="ModifierOrder" />
    <module name="IllegalThrows" />
    <module name="HideUtilityClassConstructor" />
    <module name="MultipleVariableDeclarations" />
    <module name="SuppressionCommentFilter">
      <property name="offCommentFormat" value="BEGIN GENERATED CODE" />
      <property name="onCommentFormat" value="END GENERATED CODE" />
    </module>
  </module>
  <module name="FileTabCharacter">
    <property name="id" value="fileTabCharacterChecker" />
    <property name="eachLine" value="true" />
    <property name="fileExtensions" value="java,css,js,xml,xq,default,tmpl,properties" />
  </module>
  <module name="RegexpSingleline">
    <property name="id" value="regexpSingleLineChecker" />
    <property name="format" value="(?&lt;!\*)\s+$|\*\s\s+$" />
    <property name="message" value="Trailing whitespace" />
    <property name="fileExtensions" value="java,css,js,xml,html,default,tmpl,properties" />
  </module>
  <module name="SuppressWarningsFilter" />
  <module name="NewlineAtEndOfFile">
    <property name="id" value="newLineAtEndOfFileChecker" />
    <property name="fileExtensions" value="java,css,js,xml,html,default,tmpl,properties" />
  </module>
</module>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy