Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.

Commit 17b1847

Browse files
committed
Begin to refactor checkstyle rules.
1 parent 3783458 commit 17b1847

3 files changed

Lines changed: 84 additions & 188 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/******************************************************************************
2+
* jWebUnit project (http://jwebunit.sourceforge.net) *
3+
* Distributed open-source, see full license under LICENCE.txt *
4+
******************************************************************************/
Lines changed: 80 additions & 184 deletions
Original file line numberDiff line numberDiff line change
@@ -1,194 +1,90 @@
1-
<?xml version="1.0"?>
2-
<!--
3-
/*
4-
* Copyright 2001-2004 The Apache Software Foundation.
5-
*
6-
* Licensed under the Apache License, Version 2.0 (the "License");
7-
* you may not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing, software
13-
* distributed under the License is distributed on an "AS IS" BASIS,
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
* See the License for the specific language governing permissions and
16-
* limitations under the License.
17-
*/
18-
-->
19-
20-
<!DOCTYPE module PUBLIC
21-
"-//Puppy Crawl//DTD Check Configuration 1.1//EN"
22-
"http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
23-
1+
<?xml version="1.0" encoding="UTF-8"?>
242
<!--
25-
26-
Checkstyle configuration that checks the sun coding conventions from:
27-
28-
- the Java Language Specification at
29-
http://java.sun.com/docs/books/jls/second_edition/html/index.html
30-
31-
- the Sun Code Conventions at http://java.sun.com/docs/codeconv/
32-
33-
- the Javadoc guidelines at
34-
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
35-
36-
- the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
37-
38-
- some best practices
39-
40-
Checkstyle is very configurable. Be sure to read the documentation at
41-
http://checkstyle.sf.net (or in your downloaded distribution).
42-
43-
Most Checks are configurable, be sure to consult the documentation.
44-
45-
To completely disable a check, just comment it out or delete it from the file.
46-
47-
Finally, it is worth reading the documentation.
48-
3+
This configuration file was written by the eclipse-cs plugin configuration editor
494
-->
50-
5+
<!--
6+
Checkstyle-Configuration: jWebUnit
7+
Description:
8+
-->
9+
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
5110
<module name="Checker">
52-
53-
<!-- Checks that a package.html file exists for each package. -->
54-
<!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
55-
<module name="PackageHtml"/>
56-
57-
<!-- Checks whether files end with a new line. -->
58-
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
59-
<module name="NewlineAtEndOfFile"/>
60-
61-
<!-- Checks that property files contain the same keys. -->
62-
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
63-
<module name="Translation"/>
64-
65-
11+
<property name="severity" value="warning" />
6612
<module name="TreeWalker">
67-
68-
<property name="cacheFile" value="${checkstyle.cache.file}"/>
69-
70-
<!-- Checks for Javadoc comments. -->
71-
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
72-
<module name="JavadocMethod"/>
73-
<module name="JavadocType"/>
74-
<module name="JavadocVariable"/>
75-
<module name="JavadocStyle"/>
76-
77-
78-
<!-- Checks for Naming Conventions. -->
79-
<!-- See http://checkstyle.sf.net/config_naming.html -->
80-
<module name="ConstantName"/>
81-
<module name="LocalFinalVariableName"/>
82-
<module name="LocalVariableName"/>
83-
<module name="MemberName"/>
84-
<module name="MethodName"/>
85-
<module name="PackageName"/>
86-
<module name="ParameterName"/>
87-
<module name="StaticVariableName"/>
88-
<module name="TypeName"/>
89-
90-
91-
<!-- Checks for Headers -->
92-
<!-- See http://checkstyle.sf.net/config_header.html -->
13+
<module name="JavadocMethod" />
14+
<module name="JavadocType" />
15+
<module name="JavadocVariable">
16+
<property name="severity" value="info" />
17+
</module>
18+
<module name="JavadocStyle" />
19+
<module name="ConstantName" />
20+
<module name="LocalFinalVariableName" />
21+
<module name="LocalVariableName" />
22+
<module name="MemberName" />
23+
<module name="MethodName" />
24+
<module name="PackageName" />
25+
<module name="ParameterName" />
26+
<module name="StaticVariableName" />
27+
<module name="TypeName" />
9328
<module name="Header">
94-
<!-- The follow property value demonstrates the ability -->
95-
<!-- to have access to ANT properties. In this case it uses -->
96-
<!-- the ${basedir} property to allow Checkstyle to be run -->
97-
<!-- from any directory within a project. See property -->
98-
<!-- expansion, -->
99-
<!-- http://checkstyle.sf.net/config.html#properties -->
100-
<!-- <property -->
101-
<!-- name="headerFile" -->
102-
<!-- value="${basedir}/java.header"/> -->
103-
<property name="headerFile" value="${checkstyle.header.file}"/>
29+
<property name="headerFile"
30+
value="${checkstyle.header.file}" />
10431
</module>
105-
106-
<!-- Following interprets the header file as regular expressions. -->
107-
<!-- <module name="RegexpHeader"/> -->
108-
109-
110-
<!-- Checks for imports -->
111-
<!-- See http://checkstyle.sf.net/config_import.html -->
112-
<module name="AvoidStarImport"/>
113-
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
114-
<module name="RedundantImport"/>
115-
<module name="UnusedImports"/>
116-
117-
118-
<!-- Checks for Size Violations. -->
119-
<!-- See http://checkstyle.sf.net/config_sizes.html -->
120-
<module name="FileLength"/>
32+
<module name="AvoidStarImport" />
33+
<module name="IllegalImport" />
34+
<module name="RedundantImport" />
35+
<module name="UnusedImports" />
36+
<module name="FileLength" />
12137
<module name="LineLength">
122-
<property name="ignorePattern" value="^/\**$"/>
123-
</module>
124-
<module name="MethodLength"/>
125-
<module name="ParameterNumber"/>
126-
127-
128-
<!-- Checks for whitespace -->
129-
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
130-
<module name="EmptyForIteratorPad"/>
131-
<module name="NoWhitespaceAfter"/>
132-
<module name="NoWhitespaceBefore"/>
133-
<module name="OperatorWrap"/>
134-
<module name="ParenPad"/>
135-
<module name="TypecastParenPad"/>
136-
<module name="TabCharacter"/>
137-
<module name="WhitespaceAfter"/>
138-
<module name="WhitespaceAround"/>
139-
140-
141-
<!-- Modifier Checks -->
142-
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
143-
<module name="ModifierOrder"/>
144-
<module name="RedundantModifier"/>
145-
146-
147-
<!-- Checks for blocks. You know, those {}'s -->
148-
<!-- See http://checkstyle.sf.net/config_blocks.html -->
149-
<module name="AvoidNestedBlocks"/>
150-
<module name="EmptyBlock"/>
151-
<module name="LeftCurly"/>
152-
<module name="NeedBraces"/>
153-
<module name="RightCurly"/>
154-
155-
156-
<!-- Checks for common coding problems -->
157-
<!-- See http://checkstyle.sf.net/config_coding.html -->
158-
<module name="AvoidInlineConditionals"/>
159-
<module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE -->
160-
<module name="EmptyStatement"/>
161-
<module name="EqualsHashCode"/>
162-
<module name="HiddenField"/>
163-
<module name="IllegalInstantiation"/>
164-
<module name="InnerAssignment"/>
165-
<module name="MagicNumber"/>
166-
<module name="MissingSwitchDefault"/>
167-
<module name="RedundantThrows"/>
168-
<module name="SimplifyBooleanExpression"/>
169-
<module name="SimplifyBooleanReturn"/>
170-
171-
<!-- Checks for class design -->
172-
<!-- See http://checkstyle.sf.net/config_design.html -->
173-
<module name="DesignForExtension"/>
174-
<module name="FinalClass"/>
175-
<module name="HideUtilityClassConstructor"/>
176-
<module name="InterfaceIsType"/>
177-
<module name="VisibilityModifier"/>
178-
179-
180-
<!-- Miscellaneous other checks. -->
181-
<!-- See http://checkstyle.sf.net/config_misc.html -->
182-
<module name="ArrayTypeStyle"/>
183-
<!-- <module name="FinalParameters"/> -->
184-
<!-- <module name="GenericIllegalRegexp">
185-
<property name="format" value="\s+$"/>
186-
<property name="message" value="Line has trailing spaces."/>
38+
<property name="ignorePattern" value="^/\**$" />
18739
</module>
188-
-->
189-
<module name="TodoComment"/>
190-
<module name="UpperEll"/>
191-
40+
<module name="MethodLength" />
41+
<module name="ParameterNumber" />
42+
<module name="EmptyForIteratorPad" />
43+
<module name="NoWhitespaceAfter" />
44+
<module name="NoWhitespaceBefore" />
45+
<module name="OperatorWrap" />
46+
<module name="ParenPad" />
47+
<module name="TypecastParenPad" />
48+
<module name="TabCharacter" />
49+
<module name="WhitespaceAfter" />
50+
<module name="WhitespaceAround" />
51+
<module name="ModifierOrder" />
52+
<module name="RedundantModifier" />
53+
<module name="AvoidNestedBlocks" />
54+
<module name="EmptyBlock" />
55+
<module name="LeftCurly" />
56+
<module name="NeedBraces" />
57+
<module name="RightCurly" />
58+
<module name="AvoidInlineConditionals" />
59+
<module name="DoubleCheckedLocking" />
60+
<module name="EmptyStatement" />
61+
<module name="EqualsHashCode" />
62+
<module name="HiddenField">
63+
<property name="severity" value="info" />
64+
</module>
65+
<module name="IllegalInstantiation" />
66+
<module name="InnerAssignment" />
67+
<module name="MagicNumber">
68+
<property name="severity" value="info" />
69+
</module>
70+
<module name="MissingSwitchDefault" />
71+
<module name="RedundantThrows" />
72+
<module name="SimplifyBooleanExpression" />
73+
<module name="SimplifyBooleanReturn" />
74+
<module name="DesignForExtension">
75+
<property name="severity" value="ignore" />
76+
</module>
77+
<module name="FinalClass" />
78+
<module name="HideUtilityClassConstructor" />
79+
<module name="InterfaceIsType" />
80+
<module name="VisibilityModifier" />
81+
<module name="ArrayTypeStyle" />
82+
<module name="TodoComment" />
83+
<module name="UpperEll" />
84+
<module name="AbstractClassName" />
85+
<module name="ImportOrder" />
19286
</module>
193-
87+
<module name="PackageHtml" />
88+
<module name="NewlineAtEndOfFile" />
89+
<module name="Translation" />
19490
</module>

src/checkstyle/license-checkstyle.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)