Skip to content
Snippets Groups Projects
Select Git revision
  • master
1 result

checkstyle.xml

  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    checkstyle.xml 18.22 KiB
    <?xml version="1.0"?>
    <!DOCTYPE module PUBLIC
            "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
            "https://checkstyle.org/dtds/configuration_1_3.dtd">
    
    <!--
        Checkstyle configuration that checks the Google coding conventions from Google Java Style
        that can be found at https://google.github.io/styleguide/javaguide.html
    
        Checkstyle is very configurable. Be sure to read the documentation at
        http://checkstyle.org (or in your downloaded distribution).
    
        To completely disable a check, just comment it out or delete it from the file.
        To suppress certain violations please review suppression filters.
    
        Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
     -->
    
    <module name="Checker">
      <module name="SuppressWarningsFilter"/>
    
      <property name="charset" value="UTF-8"/>
    
      <property name="severity" value="warning"/>
    
      <property name="fileExtensions" value="java, properties, xml"/>
      <!-- Excludes all 'module-info.java' files              -->
      <!-- See https://checkstyle.org/config_filefilters.html -->
      <module name="BeforeExecutionExclusionFileFilter">
        <property name="fileNamePattern" value="module\-info\.java$"/>
      </module>
      <!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
      <module name="SuppressionFilter">
        <property name="file" value="${org.checkstyle.google.suppressionfilter.config}"
                  default="checkstyle-suppressions.xml" />
        <property name="optional" value="true"/>
      </module>
    
      <!-- Checks for whitespace                               -->
      <!-- See http://checkstyle.org/config_whitespace.html -->
      <module name="FileTabCharacter">
        <property name="eachLine" value="true"/>
      </module>
    
      <module name="LineLength">
        <property name="fileExtensions" value="java"/>
        <property name="max" value="100"/>
        <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
      </module>
    
      <module name="TreeWalker">
        <module name="OuterTypeFilename"/>
        <module name="IllegalTokenText">
          <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
          <property name="format"
                    value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
          <property name="message"
                    value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
        </module>
        <module name="AvoidEscapedUnicodeCharacters">
          <property name="allowEscapesForControlCharacters" value="true"/>
          <property name="allowByTailComment" value="true"/>
          <property name="allowNonPrintableEscapes" value="true"/>
        </module>
        <module name="AvoidStarImport"/>
        <module name="OneTopLevelClass"/>
        <module name="NoLineWrap">
          <property name="tokens" value="PACKAGE_DEF, IMPORT, STATIC_IMPORT"/>
        </module>
        <module name="EmptyBlock">