netty-demo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

218 lines
8.2 KiB

13 years ago
13 years ago
13 years ago
  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. <!DOCTYPE module PUBLIC
  20. "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
  21. "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
  22. <!--
  23. Checkstyle configuration that checks the sun coding conventions from:
  24. - the Java Language Specification at
  25. http://java.sun.com/docs/books/jls/second_edition/html/index.html
  26. - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
  27. - the Javadoc guidelines at
  28. http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
  29. - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
  30. - some best practices
  31. Checkstyle is very configurable. Be sure to read the documentation at
  32. http://checkstyle.sf.net (or in your downloaded distribution).
  33. Most Checks are configurable, be sure to consult the documentation.
  34. To completely disable a check, just comment it out or delete it from the file.
  35. Finally, it is worth reading the documentation.
  36. -->
  37. <module name="Checker">
  38. <!-- Checks whether files end with a new line. -->
  39. <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
  40. <!-- module name="NewlineAtEndOfFile"/-->
  41. <!-- Checks that property files contain the same keys. -->
  42. <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
  43. <module name="Translation"/>
  44. <module name="FileLength"/>
  45. <module name="FileTabCharacter">
  46. <property name="eachLine" value="true"/>
  47. </module>
  48. <module name="TreeWalker">
  49. <property name="cacheFile" value="${checkstyle.cache.file}"/>
  50. <!-- Checks for Naming Conventions. -->
  51. <!-- See http://checkstyle.sf.net/config_naming.html -->
  52. <module name="ConstantName">
  53. <property name="format" value="^([A-Z_][A-Z0-9]*(_[A-Z0-9]+)*|_log)$"/>
  54. </module>
  55. <module name="LocalFinalVariableName"/>
  56. <module name="LocalVariableName"/>
  57. <module name="MemberName"/>
  58. <module name="MethodName"/>
  59. <module name="PackageName"/>
  60. <module name="ParameterName"/>
  61. <module name="StaticVariableName"/>
  62. <module name="TypeName"/>
  63. <!-- Checks for Headers -->
  64. <!-- See http://checkstyle.sf.net/config_header.html -->
  65. <!-- <module name="Header"> -->
  66. <!-- The follow property value demonstrates the ability -->
  67. <!-- to have access to ANT properties. In this case it uses -->
  68. <!-- the ${basedir} property to allow Checkstyle to be run -->
  69. <!-- from any directory within a project. See property -->
  70. <!-- expansion, -->
  71. <!-- http://checkstyle.sf.net/config.html#properties -->
  72. <!-- <property -->
  73. <!-- name="headerFile" -->
  74. <!-- value="${basedir}/java.header"/> -->
  75. <!-- </module> -->
  76. <!-- Following interprets the header file as regular expressions. -->
  77. <!-- <module name="RegexpHeader"/> -->
  78. <!-- Checks for imports -->
  79. <!-- See http://checkstyle.sf.net/config_import.html -->
  80. <!--module name="AvoidStarImport"/-->
  81. <module name="IllegalImport"/>
  82. <!-- defaults to sun.* packages -->
  83. <module name="RedundantImport"/>
  84. <module name="UnusedImports"/>
  85. <!-- Checks for Size Violations. -->
  86. <!-- See http://checkstyle.sf.net/config_sizes.html -->
  87. <module name="LineLength">
  88. <property name="max" value="110"/>
  89. </module>
  90. <module name="MethodLength"/>
  91. <module name="ParameterNumber">
  92. <property name="max" value="5"/>
  93. </module>
  94. <!-- Checks for whitespace -->
  95. <!-- See http://checkstyle.sf.net/config_whitespace.html -->
  96. <module name="EmptyForIteratorPad"/>
  97. <module name="MethodParamPad"/>
  98. <module name="NoWhitespaceAfter"/>
  99. <module name="NoWhitespaceBefore"/>
  100. <module name="OperatorWrap"/>
  101. <module name="ParenPad"/>
  102. <module name="TypecastParenPad"/>
  103. <module name="WhitespaceAfter"/>
  104. <!--module name="WhitespaceAround"/-->
  105. <!-- Modifier Checks -->
  106. <!-- See http://checkstyle.sf.net/config_modifiers.html -->
  107. <module name="ModifierOrder"/>
  108. <module name="RedundantModifier"/>
  109. <!-- Checks for blocks. You know, those {}'s -->
  110. <!-- See http://checkstyle.sf.net/config_blocks.html -->
  111. <module name="AvoidNestedBlocks">
  112. <property name="allowInSwitchCase" value="true"/>
  113. </module>
  114. <module name="EmptyBlock"/>
  115. <module name="LeftCurly"/>
  116. <module name="NeedBraces"/>
  117. <module name="RightCurly"/>
  118. <!-- Checks for common coding problems -->
  119. <!-- See http://checkstyle.sf.net/config_coding.html -->
  120. <!--module name="AvoidInlineConditionals"/-->
  121. <module name="DoubleCheckedLocking"/>
  122. <!-- MY FAVOURITE -->
  123. <module name="EmptyStatement"/>
  124. <module name="EqualsHashCode"/>
  125. <!--module name="HiddenField"/-->
  126. <module name="IllegalInstantiation"/>
  127. <module name="InnerAssignment"/>
  128. <!--module name="MagicNumber"/-->
  129. <module name="RedundantThrows">
  130. <property name="allowUnchecked" value="true"/>
  131. </module>
  132. <module name="SimplifyBooleanExpression"/>
  133. <module name="SimplifyBooleanReturn"/>
  134. <module name="StringLiteralEquality"/>
  135. <module name="NestedIfDepth"/>
  136. <module name="NestedTryDepth"/>
  137. <module name="SuperClone"/>
  138. <module name="IllegalCatch">
  139. <property name="illegalClassNames" value=" java.lang.Throwable, java.lang.RuntimeException"/>
  140. </module>
  141. <!--module name="IllegalThrows"/-->
  142. <module name="FallThrough"/>
  143. <module name="UnnecessaryParentheses"/>
  144. <!--module name="FinalLocalVariable"/-->
  145. <!-- Checks for class design -->
  146. <!-- See http://checkstyle.sf.net/config_design.html -->
  147. <!--module name="DesignForExtension"/-->
  148. <module name="FinalClass"/>
  149. <!--module name="HideUtilityClassConstructor"/-->
  150. <module name="InterfaceIsType"/>
  151. <module name="VisibilityModifier"/>
  152. <!-- Miscellaneous other checks. -->
  153. <!-- See http://checkstyle.sf.net/config_misc.html -->
  154. <module name="ArrayTypeStyle"/>
  155. <module name="Regexp">
  156. <property name="format" value="System\.(out)|(err)\.print(ln)?\("/>
  157. <property name="illegalPattern" value="true"/>
  158. </module>
  159. <module name="Regexp">
  160. <property name="format" value="System\.exit"/>
  161. <property name="illegalPattern" value="true"/>
  162. </module>
  163. <module name="Regexp">
  164. <property name="format" value="\.printStacktrace"/>
  165. <property name="illegalPattern" value="true"/>
  166. </module>
  167. <!--module name="FinalParameters"/-->
  168. <!--module name="GenericIllegalRegexp">
  169. <property name="format" value="\s+$"/>
  170. <property name="message" value="Line has trailing spaces."/>
  171. </module-->
  172. <!--module name="TodoComment"/-->
  173. <module name="UpperEll"/>
  174. </module>
  175. </module>