"Fossies" - the Fresh Open Source Software Archive

Member "apache-log4j-2.12.4-src/checkstyle.xml" (20 Dec 2021, 10585 Bytes) of package /linux/misc/apache-log4j-2.12.4-src.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "checkstyle.xml": 2.17.1_vs_2.17.2-rc1.

    1 <!DOCTYPE module PUBLIC
    2     "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
    3     "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
    4 
    5 <!--
    6    Licensed to the Apache Software Foundation (ASF) under one or more
    7    contributor license agreements.  See the NOTICE file distributed with
    8    this work for additional information regarding copyright ownership.
    9    The ASF licenses this file to You under the Apache License, Version 2.0
   10    (the "License"); you may not use this file except in compliance with
   11    the License.  You may obtain a copy of the License at
   12 
   13        http://www.apache.org/licenses/LICENSE-2.0
   14 
   15    Unless required by applicable law or agreed to in writing, software
   16    distributed under the License is distributed on an "AS IS" BASIS,
   17    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   18    See the License for the specific language governing permissions and
   19    limitations under the License.
   20 -->
   21 
   22 <!-- Checkstyle configuration that checks the commons-configuration coding conventions -->
   23 
   24 <module name="Checker">
   25     <property name="localeLanguage" value="en"/>
   26 
   27     <!-- Checks that a package.html file exists for each package.     -->
   28     <!-- See http://checkstyle.sourceforge.net/config_javadoc.html -->
   29     <module name="JavadocPackage"/>
   30 
   31     <!-- Checks whether files end with a new line.                        -->
   32     <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
   33     <module name="NewlineAtEndOfFile">
   34         <property name="lineSeparator" value="lf"/>
   35     </module>
   36     
   37     <!-- Checks that property files contain the same keys.         -->
   38     <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
   39     <module name="Translation"/>
   40 
   41     <!-- Checks for Headers                              -->
   42     <!-- See http://checkstyle.sourceforge.net/config_header.html#Header -->
   43     <module name="Header">
   44         <property name="headerFile" value="${licensedir}"/>
   45         <property name="fileExtensions" value="java"/>
   46         <!--<property name="ignoreLines" value="2"/> -->
   47     </module>
   48 
   49     <!-- Checks for Tab characters -->
   50     <!-- See http://checkstyle.sourceforge.net/config_whitespace.html#FileTabCharacter -->
   51     <module name="FileTabCharacter">
   52         <property name="fileExtensions" value="java"/>
   53     </module>
   54 
   55     <!-- Checks for white space at the end of the line -->
   56     <!-- See http://checkstyle.sourceforge.net/config_regexp.html -->
   57     <!-- Updated to ignore whitespace following '*' in javadoc comments -->
   58     <!-- http://stackoverflow.com/questions/9100059/checkstyle-trailing-spaces-regexp-issue -->
   59     <module name="RegexpSingleline">
   60       <property name="format" value="(?&lt;!\A[ \t]*\*?)[ \t]$"/>
   61       <property name="message" value="Line has trailing spaces."/>
   62       <property name="fileExtensions" value="java"/>
   63     </module>
   64 
   65     <!-- Exceptions -->
   66     <!--<module name="SuppressionFilter">
   67         <property name="file" value="conf/checkstyle-suppressions.xml"/>
   68     </module> -->
   69     <!--
   70     <module name="SuppressionCommentFilter">
   71       <property name="offCommentFormat" value="Check\:OFF\: ([\w\|]+)"/>
   72       <property name="onCommentFormat" value="Check\:ON\: ([\w\|]+)"/>
   73       <property name="checkFormat" value="$1"/>
   74     </module>
   75     -->
   76     <module name="SuppressionCommentFilter" />
   77     <module name="SuppressWithNearbyCommentFilter"/>
   78 
   79     <module name="TreeWalker">
   80 
   81         <property name="cacheFile" value="${checkstyle.cache.file}"/>
   82 
   83         <!-- Ensure that CHECKSTYLE:OFF comments are available to the filter: -->
   84         <module name="FileContentsHolder"/>
   85 
   86         <!-- Checks for Javadoc comments.                     -->
   87         <!-- See http://checkstyle.sf.net/config_javadoc.html -->
   88         <module name="JavadocMethod">
   89             <property name="scope" value="public"/>
   90             <property name="allowUndeclaredRTE" value="true"/>
   91               <property name="allowMissingJavadoc" value="true"/>
   92         </module>
   93         <module name="JavadocType">
   94             <!-- <property name="authorFormat" value="null"/> -->
   95             <!-- It is unfortunate to have to do this but checkstyle doesn't allow custom tags -->
   96             <property name="allowUnknownTags" value="true"/>
   97         </module>
   98         <module name="JavadocVariable">
   99             <property name="scope" value="protected"/>
  100         </module>
  101         <module name="JavadocStyle">
  102             <property name="scope" value="public"/>
  103             <!-- the checkHtml check is disabled as it generates incorrect errors -->
  104             <property name="checkHtml" value="false"/>
  105         </module>
  106 
  107 
  108         <!-- Checks for Naming Conventions.                  -->
  109         <!-- See http://checkstyle.sf.net/config_naming.html -->
  110         <module name="ConstantName">
  111           <property name="format" value="^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$|^capabilities$|^log$"/>
  112         </module>
  113         <module name="LocalFinalVariableName"/>
  114         <module name="LocalVariableName"/>
  115         <module name="MemberName"/>
  116         <module name="MethodName"/>
  117         <module name="PackageName"/>
  118         <module name="ParameterName"/>
  119         <module name="StaticVariableName"/>
  120         <module name="TypeName"/>
  121 
  122         <!-- Following interprets the header file as regular expressions. -->
  123         <!-- <module name="RegexpHeader"/>                                -->
  124 
  125 
  126         <!-- Checks for imports                              -->
  127         <!-- See http://checkstyle.sf.net/config_import.html -->
  128         <module name="AvoidStarImport">
  129           <property name="allowStaticMemberImports" value="true"/>
  130         </module>
  131         <module name="IllegalImport"/><!-- defaults to sun.* packages -->
  132         <module name="RedundantImport"/>
  133         <module name="UnusedImports"/>
  134         <module name="ImportControl">
  135             <property name="severity" value="error"/>
  136             <property name="file" value="checkstyle-import-control.xml"/>
  137         </module>
  138         <module name="ImportOrder">
  139             <!-- Imports must be separated (by one newline) into the following groups:
  140                      java and javax
  141                      org
  142                      com
  143                      all others
  144                  Imports within a group must be sorted alphabetically (lexicographically)
  145                  All static imports come below all other imports -->
  146             <property name="groups" value="/^javax?\./,org,com"/>
  147             <property name="ordered" value="true"/>
  148             <property name="caseSensitive" value="true"/>
  149             <property name="separated" value="true"/>
  150             <property name="option" value="bottom"/>
  151         </module>
  152 
  153 
  154         <!-- Checks for Size Violations.                    -->
  155         <!-- See http://checkstyle.sf.net/config_sizes.html -->
  156         <!--<module name="FileLength"/>-->
  157         <module name="LineLength">
  158             <property name="max" value="120"/>
  159             <!-- Ignore import statements -->
  160             <property name="ignorePattern" value="^import\s.*$"/>
  161         </module>
  162         <module name="MethodLength"/>
  163         <module name="ParameterNumber">
  164             <property name="max" value="15"/>
  165         </module>
  166 
  167 
  168         <!-- Checks for whitespace                               -->
  169         <!-- See http://checkstyle.sf.net/config_whitespace.html -->
  170         <module name="EmptyForIteratorPad"/>
  171         <module name="NoWhitespaceAfter"/>
  172         <module name="NoWhitespaceBefore"/>
  173         <module name="OperatorWrap">
  174            <property name="tokens" value="ASSIGN"/>
  175            <property name="option" value="eol"/>
  176         </module>
  177         <module name="ParenPad"/>
  178         <module name="WhitespaceAfter"/>
  179         <module name="WhitespaceAround"/>
  180         <module name="GenericWhitespace"/>
  181 
  182 
  183         <!-- Modifier Checks                                    -->
  184         <!-- See http://checkstyle.sf.net/config_modifiers.html -->
  185         <module name="ModifierOrder"/>
  186         <module name="RedundantModifier"/>
  187 
  188 
  189         <!-- Checks for blocks. You know, those {}'s         -->
  190         <!-- See http://checkstyle.sf.net/config_blocks.html -->
  191         <module name="AvoidNestedBlocks">
  192           <property name="allowInSwitchCase" value="true"/>
  193         </module>
  194         <!-- Require empty catch blocks to have at least a comment -->
  195         <module name="EmptyBlock">
  196           <property name="option" value="text"/>
  197           <property name="tokens" value="LITERAL_CATCH"/>
  198         </module>
  199         <module name="LeftCurly">
  200             <property name="option" value="eol"/>
  201         </module>
  202         <module name="NeedBraces"/>
  203         <module name="RightCurly">
  204             <property name="option" value="same"/>
  205         </module>
  206 
  207 
  208         <!-- Checks for common coding problems               -->
  209         <!-- See http://checkstyle.sf.net/config_coding.html -->
  210         <module name="CovariantEquals"/>
  211         <module name="EqualsHashCode"/>
  212         <module name="IllegalInstantiation"/>
  213         <!-- <module name="InnerAssignment"/> -->
  214         <module name="MagicNumber">
  215             <property name="ignoreNumbers" value="-1,0,1,2,3,4,5,6,7"/>
  216         </module>
  217         <module name="SimplifyBooleanExpression"/>
  218         <module name="SimplifyBooleanReturn"/>
  219         <module name="StringLiteralEquality"/>
  220         <module name="SuperClone"/>
  221         <module name="SuperFinalize"/>
  222         <module name="DeclarationOrder"/>
  223         <!-- <module name="ExplicitInitialization"/> -->
  224         <module name="DefaultComesLast"/>
  225         <module name="FallThrough"/>
  226         <module name="MultipleVariableDeclarations"/>
  227         <!-- <module name="UnnecessaryParentheses"/> -->
  228 
  229         <!-- Checks for class design                         -->
  230         <!-- See http://checkstyle.sf.net/config_design.html -->
  231         <module name="FinalClass"/>
  232         <module name="HideUtilityClassConstructor"/>
  233         <module name="InterfaceIsType"/>
  234         <module name="VisibilityModifier">
  235             <property name="protectedAllowed" value="true"/>
  236         </module>
  237 
  238 
  239         <!-- Miscellaneous other checks.                   -->
  240         <!-- See http://checkstyle.sf.net/config_misc.html -->
  241         <module name="ArrayTypeStyle"/>
  242         <module name="TodoComment">
  243             <property name="severity" value="info"/>
  244         </module>
  245         <module name="UpperEll"/>
  246 
  247         <module name="HiddenField">
  248           <property name="ignoreConstructorParameter" value="true"/>
  249           <property name="ignoreSetter" value="true"/>
  250         </module>
  251         
  252     </module>
  253 
  254 </module>