checkstyle.xml 5.74 KB
Newer Older
Luc Maisonobe's avatar
Luc Maisonobe committed
1
<?xml version="1.0"?>
Luc Maisonobe's avatar
Luc Maisonobe committed
2
3
4
<!DOCTYPE module PUBLIC
   "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
   "https://checkstyle.org/dtds/configuration_1_3.dtd">
Luc Maisonobe's avatar
Luc Maisonobe committed
5
6

<module name="Checker">
7
    <module name="TreeWalker">
8
        <module name="AvoidStarImport"/>
9
        <module name="AvoidStaticImport"/>
10
11
12
13
14
15
        <module name="ConstantName"/>
        <module name="DeclarationOrder"/>
        <module name="EqualsHashCode"/>
        <module name="FallThrough"/>
        <module name="FinalLocalVariable"/>
        <module name="FinalParameters"/>
16
17
18
19
        <module name="Regexp">
            <property name="format" value="[ \t]+$"/>
            <property name="illegalPattern" value="true"/>
            <property name="message" value="Trailing whitespace"/>
20
        </module>
21
        <module name="Regexp">
22
            <property name="format" value="System\.out\.println"/>
23
24
            <property name="illegalPattern" value="true"/>
            <property name="ignoreComments" value="true"/>
Luc Maisonobe's avatar
Luc Maisonobe committed
25
        </module>
26
27
28
29
30
31
32
        <module name="HiddenField">
            <property name="ignoreConstructorParameter" value="true"/>
            <property name="ignoreSetter" value="true"/>
        </module>
        <module name="HideUtilityClassConstructor"/>
        <module name="IllegalCatch"/>
        <module name="IllegalImport"/>
33
        <module name="Indentation">
34
            <property name="basicOffset" value="4"/>
35
            <property name="caseIndent"  value="4"/>
36
37
        </module>
        <module name="JavadocMethod">
38
            <property name="validateThrows" value="false"/>
39
        </module>
40
        <module name="JavadocStyle"/>
41
        <module name="JavadocVariable"/>
42
43
        <module name="MissingSwitchDefault"/>
        <module name="ModifierOrder"/>
44
        <module name="MultipleStringLiterals">
45
            <property name="ignoreStringsRegexp" value='^(("")|(".")|("\\\\"))$'/>
46
        </module>
47
        <module name="MultipleVariableDeclarations"/>
Luc Maisonobe's avatar
Luc Maisonobe committed
48
49
50
51
52
        <module name="NoWhitespaceAfter">
            <property name="tokens"
                      value="AT, INC, DEC, UNARY_MINUS, UNARY_PLUS, BNOT, LNOT, DOT,
                             ARRAY_DECLARATOR, INDEX_OP"/>
        </module>
53
        <module name="NoWhitespaceBefore"/>
54
        <module name="OperatorWrap">
55
56
57
58
            <property name="option" value="eol"/>
        </module>
        <module name="RedundantModifier"/>
        <module name="StringLiteralEquality"/>
59
60
61
        <module name="TodoComment">
            <property name="severity" value="warning"/>
        </module>
62
        <module name="UnnecessaryParentheses"/>
63
        <module name="NeedBraces"/>
64
65
        <module name="UnusedImports"/>
        <module name="VisibilityModifier"/>
Luc Maisonobe's avatar
Luc Maisonobe committed
66
        <module name="WhitespaceAfter"/>
67
68
        <module name="WhitespaceAround">
            <property name="tokens"
Luc Maisonobe's avatar
Luc Maisonobe committed
69
                      value="ASSIGN, ARRAY_INIT, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN,
70
71
72
73
74
75
76
                             BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT,
                             LAND, LCURLY, 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, RCURLY, SL, SLIST, SL_ASSIGN, SR,
                             SR_ASSIGN, STAR, STAR_ASSIGN"/>
77
        </module>
Luc Maisonobe's avatar
Luc Maisonobe committed
78
79
80
81
82
83
        <module name="SuppressionCommentFilter">
           <property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocVariable check"/>
            <property name="onCommentFormat"  value="CHECKSTYLE\: resume JavadocVariable check"/>
            <property name="checkFormat"      value="JavadocVariable"/>
        </module>
        <module name="SuppressionCommentFilter">
Luc Maisonobe's avatar
Luc Maisonobe committed
84
85
            <property name="offCommentFormat" value="CHECKSTYLE\: stop VisibilityModifier check"/>
            <property name="onCommentFormat"  value="CHECKSTYLE\: resume VisibilityModifier check"/>
Luc Maisonobe's avatar
Luc Maisonobe committed
86
87
88
            <property name="checkFormat"      value="VisibilityModifierCheck"/>
        </module>
        <module name="SuppressionCommentFilter">
Luc Maisonobe's avatar
Luc Maisonobe committed
89
90
            <property name="offCommentFormat" value="CHECKSTYLE\: stop NoWhitespaceAfter check"/>
            <property name="onCommentFormat"  value="CHECKSTYLE\: resume NoWhitespaceAfter check"/>
Luc Maisonobe's avatar
Luc Maisonobe committed
91
92
            <property name="checkFormat"      value="NoWhitespaceAfter"/>
        </module>
Luc Maisonobe's avatar
Luc Maisonobe committed
93
94
95
96
97
        <module name="SuppressionCommentFilter">
          <property name="offCommentFormat" value="CHECKSTYLE\: stop Indentation check"/>
          <property name="onCommentFormat" value="CHECKSTYLE\: resume Indentation check"/>
          <property name="checkFormat" value="IndentationCheck"/>
        </module>
Luc Maisonobe's avatar
Luc Maisonobe committed
98
99
100
101
102
        <module name="SuppressionCommentFilter">
          <property name="offCommentFormat" value="CHECKSTYLE\: stop MultipleStringLiterals check"/>
          <property name="onCommentFormat" value="CHECKSTYLE\: resume MultipleStringLiterals check"/>
          <property name="checkFormat" value="MultipleStringLiteralsCheck"/>
        </module>
103
104
105
106
107
        <module name="SuppressionCommentFilter">
          <property name="offCommentFormat" value="CHECKSTYLE\: stop IllegalCatch check"/>
          <property name="onCommentFormat" value="CHECKSTYLE\: resume IllegalCatch check"/>
          <property name="checkFormat" value="IllegalCatchCheck"/>
        </module>
Luc Maisonobe's avatar
Luc Maisonobe committed
108
    </module>
109
    <module name="RegexpHeader">
110
      <property name="headerFile" value="${checkstyle.header.file}" />
111
      <property name="fileExtensions" value="java" />
112
113
    </module>
    <module name="FileTabCharacter"/>
114
    <module name="NewlineAtEndOfFile">
115
116
      <property name="lineSeparator" value="LF_CR_CRLF"/>
    </module>
Luc Maisonobe's avatar
Luc Maisonobe committed
117
</module>