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

checkstyle-config 4.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
  3. <!--
  4. Licensed to the Apache Software Foundation (ASF) under one or more
  5. contributor license agreements. See the NOTICE file distributed with
  6. this work for additional information regarding copyright ownership.
  7. The ASF licenses this file to You under the Apache License, Version 2.0
  8. (the "License"); you may not use this file except in compliance with
  9. the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing, software
  12. distributed under the License is distributed on an "AS IS" BASIS,
  13. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. See the License for the specific language governing permissions and
  15. limitations under the License.
  16. -->
  17. <module name="Checker">
  18. <!-- required licence file -->
  19. <module name="Header">
  20. <property name="headerFile" value="${config.dir}/RequiredHeader.txt"/>
  21. <property name="ignoreLines" value="2"/>
  22. </module>
  23. <!-- size limits -->
  24. <module name="FileLength"/>
  25. <module name="FileTabCharacter"/>
  26. <module name="TreeWalker">
  27. <!-- Javadoc requirements -->
  28. <module name="JavadocType">
  29. <property name="scope" value="protected"/>
  30. </module>
  31. <module name="JavadocMethod">
  32. <property name="scope" value="protected"/>
  33. <property name="allowUndeclaredRTE" value="true"/>
  34. </module>
  35. <module name="JavadocVariable">
  36. <property name="scope" value="public"/>
  37. </module>
  38. <!-- element naming -->
  39. <module name="PackageName"/>
  40. <module name="TypeName"/>
  41. <module name="ConstantName"/>
  42. <module name="LocalFinalVariableName"/>
  43. <module name="LocalVariableName"/>
  44. <module name="MemberName"/>
  45. <module name="MethodName"/>
  46. <module name="ParameterName"/>
  47. <module name="StaticVariableName"/>
  48. <!-- Import conventions -->
  49. <module name="AvoidStarImport"/>
  50. <module name="IllegalImport"/>
  51. <module name="RedundantImport"/>
  52. <module name="UnusedImports"/>
  53. <!-- size limits -->
  54. <module name="LineLength">
  55. <property name="max" value="100"/>
  56. <property name="ignorePattern" value="^ *\* *[^ ]+$"/>
  57. <property name="tabWidth" value="4"/>
  58. </module>
  59. <module name="MethodLength"/>
  60. <module name="ParameterNumber"/>
  61. <!-- whitespace checks -->
  62. <module name="EmptyForIteratorPad"/>
  63. <module name="NoWhitespaceAfter"/>
  64. <module name="NoWhitespaceBefore"/>
  65. <module name="OperatorWrap"/>
  66. <module name="ParenPad"/>
  67. <module name="WhitespaceAfter"/>
  68. <module name="WhitespaceAround"/>
  69. <!-- Modifier Checks -->
  70. <module name="ModifierOrder"/>
  71. <module name="RedundantModifier"/>
  72. <!-- Checks for blocks -->
  73. <module name="AvoidNestedBlocks"/>
  74. <module name="EmptyBlock">
  75. <property name="option" value="text"/>
  76. </module>
  77. <module name="LeftCurly"/>
  78. <module name="NeedBraces"/>
  79. <module name="RightCurly"/>
  80. <!-- Checks for common coding problems -->
  81. <!--<module name="AvoidInlineConditionals"/> -->
  82. <module name="EmptyStatement"/>
  83. <module name="EqualsHashCode"/>
  84. <module name="IllegalInstantiation">
  85. <property name="classes" value="java.lang.Boolean"/>
  86. </module>
  87. <!-- <module name="InnerAssignment"/> -->
  88. <!-- <module name="MagicNumber"/> -->
  89. <module name="MissingSwitchDefault"/>
  90. <!-- Allow redundant throw declarations for doc purposes
  91. <module name="RedundantThrows">
  92. <property name="allowUnchecked" value="true"/>
  93. </module>
  94. -->
  95. <module name="SimplifyBooleanExpression"/>
  96. <module name="SimplifyBooleanReturn"/>
  97. <!-- Checks for class design -->
  98. <!-- <module name="DesignForExtension"/> -->
  99. <module name="FinalClass"/>
  100. <module name="HideUtilityClassConstructor"/>
  101. <module name="InterfaceIsType"/>
  102. <module name="VisibilityModifier"/>
  103. <!-- Miscellaneous other checks. -->
  104. <module name="ArrayTypeStyle"/>
  105. <!-- <module name="TodoComment"/> -->
  106. <module name="UpperEll"/>
  107. <!-- allow comment suppression of checks -->
  108. <module name="FileContentsHolder"/>
  109. </module>
  110. <module name="RegexpSingleline">
  111. <!-- \s matches whitespace character, $ matches end of line. -->
  112. <property name="format" value="\s+$"/>
  113. </module>
  114. <!-- <module name="au.com.redhillconsulting.simian.SimianCheck"/> -->
  115. <module name="SuppressionCommentFilter">
  116. <property name="offCommentFormat" value="CheckStyle\:([\w\|]+) *OFF"/>
  117. <property name="onCommentFormat" value="CheckStyle\:([\w\|]+) *ON"/>
  118. <property name="checkFormat" value="$1"/>
  119. </module>
  120. </module>