Mercurial > dive4elements > river
comparison checkstyle.xml @ 8859:0862ea5d66ba 3.2.x
Add Checkstyle configuration.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 18 Jan 2018 20:54:03 +0100 |
parents | |
children | de423c2a3c1b |
comparison
equal
deleted
inserted
replaced
8858:a805211690f7 | 8859:0862ea5d66ba |
---|---|
1 <?xml version="1.0"?> | |
2 <!DOCTYPE module PUBLIC | |
3 "-//Puppy Crawl//DTD Check Configuration 1.2//EN" | |
4 "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> | |
5 | |
6 <module name="Checker"> | |
7 | |
8 <!-- Checks whether files end with a new line. --> | |
9 <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> | |
10 <module name="NewlineAtEndOfFile"/> | |
11 | |
12 <!-- Checks that property files contain the same keys. --> | |
13 <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> | |
14 <module name="Translation"/> | |
15 | |
16 <module name="FileLength"/> | |
17 | |
18 <!-- Following interprets the header file as regular expressions. --> | |
19 <module name="RegexpHeader"> | |
20 <property name="headerFile" value="../java.header"/> | |
21 <property name="fileExtensions" value="java"/> | |
22 </module> | |
23 | |
24 <module name="FileTabCharacter"> | |
25 <property name="eachLine" value="true"/> | |
26 </module> | |
27 | |
28 <module name="RegexpSingleline"> | |
29 <!-- \s matches whitespace character, $ matches end of line. --> | |
30 <property name="format" value="\s+$"/> | |
31 <property name="message" value="Line has trailing spaces."/> | |
32 </module> | |
33 | |
34 <module name="TreeWalker"> | |
35 | |
36 <property name="cacheFile" value="${checkstyle.cache.file}"/> | |
37 | |
38 <!-- required for SuppressWarningsFilter (and other Suppress* rules not used here) --> | |
39 <!-- see http://checkstyle.sourceforge.net/config_annotation.html#SuppressWarningsHolder --> | |
40 <module name="SuppressWarningsHolder"/> | |
41 | |
42 <!-- Checks for Naming Conventions. --> | |
43 <!-- See http://checkstyle.sf.net/config_naming.html --> | |
44 <!--<module name="ConstantName"> | |
45 <property name="format" value="log|^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"/> | |
46 </module> | |
47 <module name="LocalFinalVariableName"/> | |
48 <module name="LocalVariableName"> | |
49 <property name="format" value="^[a-z][_a-zA-Z0-9]*$"/> | |
50 </module> | |
51 <module name="MemberName"> | |
52 <property name="format" value="^[a-zA-Z][_a-zA-Z0-9]*$"/> | |
53 </module> | |
54 <module name="MethodName"/> | |
55 <module name="PackageName"/> | |
56 <module name="ParameterName"> | |
57 <property name="format" value="^[a-zA-Z][_a-zA-Z0-9]*$"/> | |
58 </module> | |
59 <module name="StaticVariableName"/> | |
60 <module name="TypeName"/>--> | |
61 | |
62 | |
63 <!-- Checks for imports --> | |
64 <!-- See http://checkstyle.sf.net/config_import.html --> | |
65 <module name="AvoidStarImport"/> | |
66 <module name="IllegalImport"/> <!-- defaults to sun.* packages --> | |
67 <module name="RedundantImport"/> | |
68 <module name="UnusedImports"/> | |
69 | |
70 | |
71 <!-- Checks for Size Violations. --> | |
72 <!-- See http://checkstyle.sf.net/config_sizes.html --> | |
73 <module name="LineLength"> | |
74 <property name="ignorePattern" value="^ *\$wnd.*$"/> | |
75 </module> | |
76 | |
77 | |
78 <!-- Checks for whitespace --> | |
79 <!-- See http://checkstyle.sf.net/config_whitespace.html --> | |
80 <!--<module name="EmptyForIteratorPad"/> | |
81 <module name="MethodParamPad"> | |
82 <property name="tokens" | |
83 value="CTOR_DEF, LITERAL_NEW, METHOD_CALL, METHOD_DEF, SUPER_CTOR_CALL"/> | |
84 </module> | |
85 <module name="NoWhitespaceAfter"> | |
86 <property name="tokens" | |
87 value="INC,DEC,UNARY_MINUS,UNARY_PLUS,BNOT,LNOT,DOT,INDEX_OP"/> | |
88 </module> | |
89 <module name="NoWhitespaceBefore"/> | |
90 <module name="OperatorWrap"/> | |
91 <module name="ParenPad"> | |
92 <property name="tokens" | |
93 value="ANNOTATION, ANNOTATION_FIELD_DEF, CTOR_CALL, CTOR_DEF, EXPR, LITERAL_CATCH, LITERAL_DO, LITERAL_FOR, LITERAL_IF, LITERAL_NEW, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_WHILE, METHOD_CALL, METHOD_DEF, QUESTION, RESOURCE_SPECIFICATION, SUPER_CTOR_CALL"/> | |
94 </module> | |
95 <module name="TypecastParenPad"/> | |
96 <module name="WhitespaceAfter"> | |
97 <property name="tokens" value="COMMA, SEMI"/> | |
98 </module> | |
99 <module name="WhitespaceAround"> | |
100 <property name="tokens" | |
101 value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV_ASSIGN, DO_WHILE, EQUAL, LAMBDA, LAND, LCURLY, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, MINUS_ASSIGN, MOD_ASSIGN, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND"/> | |
102 </module>--> | |
103 | |
104 | |
105 <!-- Modifier Checks --> | |
106 <!-- See http://checkstyle.sf.net/config_modifiers.html --> | |
107 <!--<module name="ModifierOrder"/>--> | |
108 <!--<module name="RedundantModifier"/>--> | |
109 | |
110 | |
111 <!-- Checks for blocks. You know, those {}'s --> | |
112 <!-- See http://checkstyle.sf.net/config_blocks.html --> | |
113 <!--<module name="AvoidNestedBlocks"/>--> | |
114 <!--<module name="EmptyBlock"/>--> | |
115 <!--<module name="LeftCurly"/>--> | |
116 <!--<module name="NeedBraces"/>--> | |
117 <!--<module name="RightCurly"/>--> | |
118 | |
119 | |
120 <!-- Checks for common coding problems --> | |
121 <!-- See http://checkstyle.sf.net/config_coding.html --> | |
122 <!-- module name="EmptyStatement"/ --> | |
123 <!--<module name="EqualsHashCode"/>--> | |
124 <!--<module name="HiddenField"> | |
125 <property name="ignoreConstructorParameter" value="true"/> | |
126 <property name="ignoreSetter" value="true"/> | |
127 </module>--> | |
128 <module name="IllegalInstantiation"/> | |
129 <!--<module name="InnerAssignment"/>--> | |
130 <!--<module name="MagicNumber"/>--> | |
131 <!--<module name="MissingSwitchDefault"/>--> | |
132 <!--<module name="SimplifyBooleanExpression"/>--> | |
133 <!--<module name="SimplifyBooleanReturn"/>--> | |
134 | |
135 <!-- Checks for class design --> | |
136 <!-- See http://checkstyle.sf.net/config_design.html --> | |
137 <!--<module name="HideUtilityClassConstructor"/>--> | |
138 <!--<module name="InterfaceIsType"/>--> | |
139 | |
140 | |
141 <!-- Miscellaneous other checks. --> | |
142 <!-- See http://checkstyle.sf.net/config_misc.html --> | |
143 <!--<module name="ArrayTypeStyle"/>--> | |
144 <!-- Uncomment this if you want to track open TODOs. | |
145 <module name="TodoComment"/> | |
146 --> | |
147 <module name="UpperEll"/> | |
148 | |
149 </module> | |
150 | |
151 <!-- Support @SuppressWarnings (added in Checkstyle 5.7) --> | |
152 <!-- see http://checkstyle.sourceforge.net/config.html#SuppressWarningsFilter --> | |
153 <module name="SuppressWarningsFilter"/> | |
154 | |
155 <!-- Checks properties file for a duplicated properties. --> | |
156 <!-- See http://checkstyle.sourceforge.net/config_misc.html#UniqueProperties --> | |
157 <module name="UniqueProperties"/> | |
158 | |
159 </module> |