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.

dmdirc_checks.xml 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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="PackageHtml"/>
  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="TreeWalker">
  16. <module name="ImportOrder">
  17. <property name="groups" value="com.dmdirc,java,javax"/>
  18. <property name="ordered" value="true"/>
  19. <property name="separated" value="true"/>
  20. </module>
  21. <module name="Header">
  22. <property name="headerFile" value="checkstyle/dmdirc.license"/>
  23. <property name="ignoreLines" value="2, 21"/>
  24. </module>
  25. <!-- Checks for Javadoc comments. -->
  26. <!-- See http://checkstyle.sf.net/config_javadoc.html -->
  27. <module name="JavadocMethod"/>
  28. <module name="JavadocType"/>
  29. <module name="JavadocVariable"/>
  30. <module name="JavadocStyle"/>
  31. <!-- Checks for Naming Conventions. -->
  32. <!-- See http://checkstyle.sf.net/config_naming.html -->
  33. <module name="ConstantName"/>
  34. <module name="LocalFinalVariableName"/>
  35. <module name="LocalVariableName"/>
  36. <module name="MemberName"/>
  37. <module name="MethodName"/>
  38. <module name="PackageName"/>
  39. <module name="ParameterName"/>
  40. <module name="StaticVariableName"/>
  41. <module name="TypeName"/>
  42. <!-- Checks for Headers -->
  43. <!-- See http://checkstyle.sf.net/config_header.html -->
  44. <!-- <module name="Header"> -->
  45. <!-- The follow property value demonstrates the ability -->
  46. <!-- to have access to ANT properties. In this case it uses -->
  47. <!-- the ${basedir} property to allow Checkstyle to be run -->
  48. <!-- from any directory within a project. See property -->
  49. <!-- expansion, -->
  50. <!-- http://checkstyle.sf.net/config.html#properties -->
  51. <!-- <property -->
  52. <!-- name="headerFile" -->
  53. <!-- value="${basedir}/java.header"/> -->
  54. <!-- </module> -->
  55. <!-- Following interprets the header file as regular expressions. -->
  56. <!-- <module name="RegexpHeader"/> -->
  57. <!-- Checks for imports -->
  58. <!-- See http://checkstyle.sf.net/config_import.html -->
  59. <module name="AvoidStarImport"/>
  60. <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
  61. <module name="RedundantImport"/>
  62. <module name="UnusedImports"/>
  63. <!-- Checks for Size Violations. -->
  64. <!-- See http://checkstyle.sf.net/config_sizes.html -->
  65. <module name="FileLength"/>
  66. <module name="MethodLength"/>
  67. <module name="ParameterNumber"/>
  68. <!-- Checks for whitespace -->
  69. <!-- See http://checkstyle.sf.net/config_whitespace.html -->
  70. <module name="EmptyForIteratorPad"/>
  71. <module name="MethodParamPad"/>
  72. <module name="NoWhitespaceAfter"/>
  73. <module name="NoWhitespaceBefore"/>
  74. <module name="OperatorWrap"/>
  75. <module name="ParenPad"/>
  76. <module name="TypecastParenPad"/>
  77. <module name="WhitespaceAfter"/>
  78. <module name="WhitespaceAround">
  79. <property name="tokens" value="
  80. 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" />
  81. </module>
  82. <!-- Modifier Checks -->
  83. <!-- See http://checkstyle.sf.net/config_modifiers.html -->
  84. <module name="ModifierOrder"/>
  85. <module name="RedundantModifier"/>
  86. <!-- Checks for blocks. You know, those {}'s -->
  87. <!-- See http://checkstyle.sf.net/config_blocks.html -->
  88. <module name="AvoidNestedBlocks"/>
  89. <module name="EmptyBlock"/>
  90. <module name="LeftCurly"/>
  91. <module name="NeedBraces"/>
  92. <module name="RightCurly"/>
  93. <!-- Checks for common coding problems -->
  94. <!-- See http://checkstyle.sf.net/config_coding.html -->
  95. <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE -->
  96. <module name="EmptyStatement"/>
  97. <module name="EqualsHashCode"/>
  98. <module name="HiddenField">
  99. <property name="ignoreConstructorParameter" value="true"/>
  100. <property name="ignoreSetter" value="true"/>
  101. <property name="ignoreAbstractMethods" value="true"/>
  102. </module>
  103. <module name="IllegalInstantiation"/>
  104. <module name="InnerAssignment"/>
  105. <module name="MissingSwitchDefault"/>
  106. <module name="RedundantThrows"/>
  107. <module name="SimplifyBooleanExpression"/>
  108. <module name="SimplifyBooleanReturn"/>
  109. <module name="ArrayTrailingComma"/>
  110. <module name="CovariantEquals"/>
  111. <module name="FinalLocalVariable"/>
  112. <module name="ModifiedControlVariable"/>
  113. <module name="StringLiteralEquality"/>
  114. <module name="NestedIfDepth">
  115. <property name="max" value="4"/>
  116. </module>
  117. <module name="NestedTryDepth"/>
  118. <module name="IllegalCatch"/>
  119. <module name="IllegalThrows"/>
  120. <module name="PackageDeclaration"/>
  121. <module name="DeclarationOrder"/>
  122. <module name="ParameterAssignment"/>
  123. <module name="ExplicitInitialization"/>
  124. <module name="DefaultComesLast"/>
  125. <module name="MissingCtor"/>
  126. <module name="FallThrough"/>
  127. <module name="UnnecessaryParentheses"/>
  128. <!-- Checks for class design -->
  129. <!-- See http://checkstyle.sf.net/config_design.html -->
  130. <module name="DesignForExtension"/>
  131. <module name="FinalClass"/>
  132. <module name="HideUtilityClassConstructor"/>
  133. <module name="InterfaceIsType"/>
  134. <module name="VisibilityModifier"/>
  135. <module name="MutableException"/>
  136. <module name="ThrowsCount">
  137. <property name="max" value="2"/>
  138. </module>
  139. <!-- Miscellaneous other checks. -->
  140. <!-- See http://checkstyle.sf.net/config_misc.html -->
  141. <module name="ArrayTypeStyle"/>
  142. <module name="FinalParameters"/>
  143. <module name="UpperEll"/>
  144. </module>
  145. </module>