File: sun_checks.xml

package info (click to toggle)
apache-log4j1.2 1.2.17-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,860 kB
  • sloc: java: 35,182; xml: 4,813; cpp: 252; perl: 69; makefile: 15; sh: 14
file content (148 lines) | stat: -rw-r--r-- 4,378 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
    "-//Puppy Crawl//DTD Check Configuration 1.0//EN"
    "http://www.puppycrawl.com/dtds/configuration_1_0.dtd">
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

-->

<!--

  a Checkstyle configuration that checks the sun coding conventions from

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

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

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

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

  some best practices

-->

<module name="Checker">

  <module name="TreeWalker">

    <!--                         code conventions -->

    <!-- naming conventions -->
    <module name="ConstantName"/>
    <module name="MethodName"/>
    <module name="LocalFinalVariableName"/>
    <module name="LocalVariableName"/>
    <module name="MemberName"/>
    <module name="ParameterName"/>
    <module name="TypeName"/>
    <module name="StaticVariableName"/>
    <module name="PackageName"/>

    <!-- code layout -->
    <module name="RightCurly"/>
    <module name="LeftCurly"/>
    <module name="NeedBraces"/>
    <module name="OperatorWrap"/>

    <!-- standard whitespace settings -->
    <module name="ParenPad"/>
    <!--  default conflicts with jalopy configuration which
              places a space after the opening brace of an array initialization  -->
    <module name="NoWhitespaceAfter">
        <property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/>
    </module>
    <module name="NoWhitespaceBefore"/>
    <module name="WhitespaceAfter"/>
    <module name="WhitespaceAround"/>



    <!--                       JavaDoc guidelines -->
    <module name="JavadocMethod"/>
    <module name="JavadocType"/>
    <module name="JavadocVariable"/>


    <!--                                        JLS -->
    <!--    <module name="RedundantModifier"/> -->
    <module name="ModifierOrder"/>
    <module name="UpperEll"/>



    <!--                                    Api Doc -->

    <!-- override hashCode whenever you override equals() -->
    <module name="EqualsHashCode"/>

    <!-- don't create new instances of Boolean,
         use Boolean.TRUE/FALSE or Boolean.valueOf() instead -->
    <module name="IllegalInstantiation">
      <property name="classes" value="java.lang.Boolean"/>
    </module>



    <!--                             best practices -->

    <!-- don't allow empty blocks (in particular catch blocks) -->
    <module name="EmptyBlock"/>

    <!-- avoid inner assignments -->
    <module name="InnerAssignment"/>

    <!-- don't allow imports from the sun.* package hierarchy -->
    <module name="IllegalImport"/>

    <!-- don't allow public members -->
    <module name="VisibilityModifier">
      <property name="protectedAllowed" value="true"/>
      <property name="packageAllowed" value="true"/>
    </module>


    <!-- simplify your code -->
    <!-- <module name="RedundantImport"/> -->
    <module name="UnusedImports"/>
    <module name="SimplifyBooleanExpression"/>
    <module name="SimplifyBooleanReturn"/>
    <module name="AvoidStarImport"/>

    <!-- flag reminder comments -->
    <module name="TodoComment"/>

    <!-- enforce default length limits -->
    <!--
    <module name="LineLength"/>
    <module name="MethodLength"/>
    <module name="FileLength"/>
    -->

    <!-- don't allow tabs -->
    <module name="TabCharacter"/>

  </module>

  <!-- enforce package documentation -->
  <module name="PackageHtml"/>

</module>