您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

dmdirc_checks.xml 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. <module name="Checker">
  6. <!-- Checks that a package.html file exists for each package. -->
  7. <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
  8. <module name="JavadocPackage"/>
  9. <!-- Checks whether files end with a new line. -->
  10. <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
  11. <module name="NewlineAtEndOfFile"/>
  12. <!-- Checks that property files contain the same keys. -->
  13. <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
  14. <module name="Translation"/>
  15. <module name="Header">
  16. <property name="headerFile" value="checkstyle/dmdirc.license"/>
  17. <property name="ignoreLines" value="2, 21"/>
  18. </module>
  19. <module name="FileLength"/>
  20. <module name="TreeWalker">
  21. <module name="ImportOrder">
  22. <property name="groups" value="com.dmdirc,java,javax"/>
  23. <property name="ordered" value="true"/>
  24. <property name="separated" value="true"/>
  25. </module>
  26. <!-- Checks for Javadoc comments. -->
  27. <!-- See http://checkstyle.sf.net/config_javadoc.html -->
  28. <module name="JavadocMethod"/>
  29. <module name="JavadocType"/>
  30. <module name="JavadocVariable"/>
  31. <module name="JavadocStyle"/>
  32. <!-- Checks for Naming Conventions. -->
  33. <!-- See http://checkstyle.sf.net/config_naming.html -->
  34. <module name="ConstantName"/>
  35. <module name="LocalFinalVariableName"/>
  36. <module name="LocalVariableName"/>
  37. <module name="MemberName"/>
  38. <module name="MethodName"/>
  39. <module name="PackageName"/>
  40. <module name="ParameterName"/>
  41. <module name="StaticVariableName"/>
  42. <module name="TypeName"/>
  43. <!-- Following interprets the header file as regular expressions. -->
  44. <!-- <module name="RegexpHeader"/> -->
  45. <!-- Checks for imports -->
  46. <!-- See http://checkstyle.sf.net/config_import.html -->
  47. <module name="AvoidStarImport"/>
  48. <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
  49. <module name="RedundantImport"/>
  50. <module name="UnusedImports"/>
  51. <!-- Checks for Size Violations. -->
  52. <!-- See http://checkstyle.sf.net/config_sizes.html -->
  53. <module name="MethodLength"/>
  54. <module name="ParameterNumber"/>
  55. <!-- Checks for whitespace -->
  56. <!-- See http://checkstyle.sf.net/config_whitespace.html -->
  57. <module name="EmptyForIteratorPad"/>
  58. <module name="MethodParamPad"/>
  59. <module name="NoWhitespaceAfter"/>
  60. <module name="NoWhitespaceBefore"/>
  61. <module name="OperatorWrap"/>
  62. <module name="ParenPad"/>
  63. <module name="TypecastParenPad"/>
  64. <module name="WhitespaceAfter"/>
  65. <module name="WhitespaceAround">
  66. <property name="tokens" value="
  67. ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND, WILDCARD_TYPE" />
  68. </module>
  69. <!-- Modifier Checks -->
  70. <!-- See http://checkstyle.sf.net/config_modifiers.html -->
  71. <module name="ModifierOrder"/>
  72. <module name="RedundantModifier"/>
  73. <!-- Checks for blocks. You know, those {}'s -->
  74. <!-- See http://checkstyle.sf.net/config_blocks.html -->
  75. <module name="AvoidNestedBlocks"/>
  76. <module name="EmptyBlock"/>
  77. <module name="LeftCurly"/>
  78. <module name="NeedBraces"/>
  79. <module name="RightCurly"/>
  80. <!-- Checks for common coding problems -->
  81. <!-- See http://checkstyle.sf.net/config_coding.html -->
  82. <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE -->
  83. <module name="EmptyStatement"/>
  84. <module name="EqualsHashCode"/>
  85. <module name="HiddenField">
  86. <property name="ignoreConstructorParameter" value="true"/>
  87. <property name="ignoreSetter" value="true"/>
  88. <property name="ignoreAbstractMethods" value="true"/>
  89. </module>
  90. <module name="IllegalInstantiation"/>
  91. <module name="InnerAssignment"/>
  92. <module name="MissingSwitchDefault"/>
  93. <module name="RedundantThrows"/>
  94. <module name="SimplifyBooleanExpression"/>
  95. <module name="SimplifyBooleanReturn"/>
  96. <module name="ArrayTrailingComma"/>
  97. <module name="CovariantEquals"/>
  98. <module name="FinalLocalVariable"/>
  99. <module name="ModifiedControlVariable"/>
  100. <module name="StringLiteralEquality"/>
  101. <module name="NestedIfDepth">
  102. <property name="max" value="4"/>
  103. </module>
  104. <module name="NestedTryDepth"/>
  105. <module name="IllegalCatch"/>
  106. <module name="IllegalThrows"/>
  107. <module name="PackageDeclaration"/>
  108. <module name="DeclarationOrder"/>
  109. <module name="ParameterAssignment"/>
  110. <module name="ExplicitInitialization"/>
  111. <module name="DefaultComesLast"/>
  112. <module name="MissingCtor"/>
  113. <module name="FallThrough"/>
  114. <module name="UnnecessaryParentheses"/>
  115. <!-- Checks for class design -->
  116. <!-- See http://checkstyle.sf.net/config_design.html -->
  117. <!-- <module name="DesignForExtension"/> -->
  118. <module name="FinalClass"/>
  119. <module name="HideUtilityClassConstructor"/>
  120. <module name="InterfaceIsType"/>
  121. <module name="VisibilityModifier"/>
  122. <module name="MutableException"/>
  123. <module name="ThrowsCount">
  124. <property name="max" value="2"/>
  125. </module>
  126. <!-- Miscellaneous other checks. -->
  127. <!-- See http://checkstyle.sf.net/config_misc.html -->
  128. <module name="ArrayTypeStyle"/>
  129. <module name="FinalParameters"/>
  130. <module name="UpperEll"/>
  131. </module>
  132. </module>