Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / org.gvsig.image.extension / target / org.gvsig.maven.base.tools / checkstyle / checkstyle_gvsig.xml @ 32321

History | View | Annotate | Download (8.38 KB)

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
<!--
7

8
  Checkstyle configuration that checks the sun coding conventions from:
9

10
    - the Java Language Specification at
11
      http://java.sun.com/docs/books/jls/second_edition/html/index.html
12

13
    - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
14

15
    - the Javadoc guidelines at
16
      http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
17

18
    - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
19

20
    - some best practices
21

22
  Checkstyle is very configurable. Be sure to read the documentation at
23
  http://checkstyle.sf.net (or in your downloaded distribution).
24

25
  Most Checks are configurable, be sure to consult the documentation.
26

27
  To completely disable a check, just comment it out or delete it from the file.
28

29
  Finally, it is worth reading the documentation.
30

31
-->
32

    
33
<module name="Checker">
34

    
35
    <!-- Checks that a package.html file exists for each package.     -->
36
    <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
37
    <module name="PackageHtml"/>
38

    
39
    <!-- Checks whether files end with a new line.                        -->
40
    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
41
    <!--module name="NewlineAtEndOfFile"/-->
42

    
43
    <!-- Checks that property files contain the same keys.         -->
44
    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
45
    <!--module name="Translation"/-->
46

    
47
    <module name="TreeWalker">
48

    
49
            <property name="charset" value="UTF-8"/>
50

    
51
        <!-- Checks for Javadoc comments.                     -->
52
        <!-- See http://checkstyle.sf.net/config_javadoc.html -->
53
        <!-- gvSIG: All protected or public classes must have a Javadoc
54
             comment with the @author tag included -->
55
        <module name="JavadocType">
56
            <property name="scope" value="protected"/>
57
                        <property name="authorFormat" value="\S"/>
58
        </module>
59
        <!-- gvSIG: All protected or public classes must have a Javadoc
60
             comments, except getters and setters -->
61
        <module name="JavadocMethod">
62
            <property name="scope" value="protected"/>
63
                <property name="allowMissingPropertyJavadoc" value="true"/>
64
        </module>
65
        <!-- gvSIG: Check correctly formatted Javadoc -->
66
        <module name="JavadocStyle">
67
            <property name="scope" value="protected"/>
68
        </module>
69
        <!--
70
        <module name="JavadocVariable"/>
71
                 -->
72

    
73
        <!-- Checks for Naming Conventions.                  -->
74
        <!-- See http://checkstyle.sf.net/config_naming.html -->
75
        <!-- gvSIG: All packages must begin with org.gvsig.  -->
76
        <module name="PackageName">
77
                        <property name="format"
78
                      value="^org\.gvsig(\.[a-z][a-z0-9]*)+$"/>
79
        </module>
80
        <!-- gvSIG: Abstract class names must begin with Abstract. -->
81
        <module name="AbstractClassName"/>
82
        <!--
83
        <module name="ConstantName"/>
84
        <module name="LocalFinalVariableName"/>
85
        <module name="LocalVariableName"/>
86
        <module name="MemberName"/>
87
        <module name="MethodName"/>
88
        <module name="ParameterName"/>
89
        <module name="StaticVariableName"/>
90
        <module name="TypeName"/>
91
                 -->
92

    
93
        <!-- Checks for Headers                                -->
94
        <!-- See http://checkstyle.sf.net/config_header.html   -->
95
        <!-- gvSIG: Files must have the gvSIG header. -->
96

    
97
   <module name="RegexpHeader">                  
98
            <!-- The follow property value demonstrates the ability     -->
99
            <!-- to have access to ANT properties. In this case it uses -->
100
            <!-- the ${basedir} property to allow Checkstyle to be run  -->
101
            <!-- from any directory within a project. See property      -->
102
            <!-- expansion,                                             -->
103
            <!-- http://checkstyle.sf.net/config.html#properties        -->
104
            <!-- <property                                              -->
105
            <!--     name="headerFile"                                  -->
106
            <!--     value="${basedir}/build/java.header"/>                   -->
107
                           
108
                                                   
109
                          <property name="headerFile" value="${checkstyle.header.file}"/>
110
           
111
        </module> 
112
        
113

    
114
        <!-- Following interprets the header file as regular expressions. -->
115
       <!-- <module name="RegexpHeader"/>    -->                             
116
         
117
        <!-- Checks for imports                              -->
118
        <!-- See http://checkstyle.sf.net/config_import.html -->
119
        <!-- gvSIG: Add warnings for redundant and unused imports -->
120
        <module name="RedundantImport">
121
                <property name="severity" value="warning"/>
122
        </module>
123
        <module name="UnusedImports">
124
                <property name="severity" value="warning"/>
125
        </module>
126
        <!--
127
        <module name="AvoidStarImport"/>
128
        <module name="IllegalImport"/> <!-#- defaults to sun.* packages -#->
129
                 -->
130

    
131
        <!-- Checks for Size Violations.                    -->
132
        <!-- See http://checkstyle.sf.net/config_sizes.html -->
133
        <!--
134
        <module name="FileLength"/>
135
        <module name="LineLength"/>
136
        <module name="MethodLength"/>
137
        <module name="ParameterNumber"/>
138
                 -->
139

    
140
        <!-- Checks for whitespace                               -->
141
        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
142
        <!--
143
        <module name="EmptyForIteratorPad"/>
144
        <module name="MethodParamPad"/>
145
        <module name="NoWhitespaceAfter"/>
146
        <module name="NoWhitespaceBefore"/>
147
        <module name="OperatorWrap"/>
148
        <module name="ParenPad"/>
149
        <module name="TypecastParenPad"/>
150
        <module name="TabCharacter"/>
151
        <module name="WhitespaceAfter"/>
152
        <module name="WhitespaceAround"/>
153
                 -->
154

    
155
        <!-- Modifier Checks                                    -->
156
        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
157
        <!--
158
        <module name="ModifierOrder"/>
159
        <module name="RedundantModifier"/>
160
                 -->
161

    
162
        <!-- Checks for blocks. You know, those {}'s         -->
163
        <!-- See http://checkstyle.sf.net/config_blocks.html -->
164
        <!--
165
        <module name="AvoidNestedBlocks"/>
166
        <module name="EmptyBlock"/>
167
        <module name="LeftCurly"/>
168
        <module name="NeedBraces"/>
169
        <module name="RightCurly"/>
170
                 -->
171

    
172
        <!-- Checks for common coding problems               -->
173
        <!-- See http://checkstyle.sf.net/config_coding.html -->
174
        <!-- gvSIG: Check for some common programming errors -->
175
        <module name="DoubleCheckedLocking"/>
176
        <module name="CovariantEquals"/>
177
        <module name="EqualsHashCode"/>
178
        <module name="IllegalInstantiation">
179
                    <property name="classes" value="java.lang.Boolean"/>
180
                </module>
181
                <module name="StringLiteralEquality"/>
182
        <!--
183
        <module name="AvoidInlineConditionals"/>
184
        <module name="EmptyStatement"/>
185
        <module name="HiddenField"/>
186
        <module name="InnerAssignment"/>
187
        <module name="MagicNumber"/>
188
        <module name="MissingSwitchDefault"/>
189
        <module name="RedundantThrows"/>
190
        <module name="SimplifyBooleanExpression"/>
191
        <module name="SimplifyBooleanReturn"/>
192
                 -->
193

    
194
        <!-- Checks for class design                         -->
195
        <!-- See http://checkstyle.sf.net/config_design.html -->
196
        <!--
197
        <module name="DesignForExtension"/>
198
        <module name="FinalClass"/>
199
        <module name="HideUtilityClassConstructor"/>
200
        <module name="InterfaceIsType"/>
201
        <module name="VisibilityModifier"/>
202
                 -->
203

    
204
        <!-- Miscellaneous other checks.                   -->
205
        <!-- See http://checkstyle.sf.net/config_misc.html -->
206
                <!-- gvSIG: Get the author from the Javadoc -->
207
        <!--
208
                   <module name="WriteTag">
209
            <property name="tag" value="@author"/>
210
            <property name="tagFormat" value="\S"/>
211
        </module>
212
        <module name="ArrayTypeStyle"/>
213
        <module name="FinalParameters"/>
214
        <module name="GenericIllegalRegexp">
215
            <property name="format" value="\s+$"/>
216
            <property name="message" value="Line has trailing spaces."/>
217
        </module>
218
        <module name="TodoComment"/>
219
        <module name="UpperEll"/>
220
                 -->
221

    
222
    </module>
223

    
224
</module>