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.

checkstyle3.1.1-head 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <checkstyle-configurations file-format-version="1.0.0">
  3. <check-configuration name="head">
  4. <rule-configuration
  5. classname="com.puppycrawl.tools.checkstyle.checks.JavadocVariableCheck"
  6. severity="warning" comment="Protected scope">
  7. <config-properties>
  8. <config-property name="severity" value="warning"/>
  9. <config-property name="scope" value="protected"/>
  10. </config-properties>
  11. </rule-configuration>
  12. <rule-configuration
  13. classname="com.puppycrawl.tools.checkstyle.checks.JavadocTypeCheck"
  14. severity="warning" comment="Protected scope">
  15. <config-properties>
  16. <config-property name="severity" value="warning"/>
  17. <config-property name="tokens" value="CLASS_DEF, INTERFACE_DEF"/>
  18. <config-property name="authorFormat" value=""/>
  19. <config-property name="scope" value="protected"/>
  20. <config-property name="versionFormat" value=""/>
  21. </config-properties>
  22. </rule-configuration>
  23. <rule-configuration
  24. classname="com.puppycrawl.tools.checkstyle.checks.JavadocMethodCheck"
  25. severity="warning" comment="Protected scope">
  26. <config-properties>
  27. <config-property name="allowThrowsTagsForSubclasses" value="false"/>
  28. <config-property name="allowUndeclaredRTE" value="false"/>
  29. <config-property name="severity" value="warning"/>
  30. <config-property name="tokens" value="METHOD_DEF, CTOR_DEF"/>
  31. <config-property name="allowMissingParamTags" value="false"/>
  32. <config-property name="scope" value="protected"/>
  33. <config-property name="allowMissingReturnTag" value="false"/>
  34. <config-property name="allowMissingThrowsTags" value="false"/>
  35. </config-properties>
  36. </rule-configuration>
  37. <rule-configuration
  38. classname="com.puppycrawl.tools.checkstyle.checks.MemberNameCheck" severity="warning">
  39. <config-properties>
  40. <config-property name="severity" value="warning"/>
  41. <config-property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
  42. </config-properties>
  43. </rule-configuration>
  44. <rule-configuration
  45. classname="com.puppycrawl.tools.checkstyle.checks.LocalVariableNameCheck" severity="warning">
  46. <config-properties>
  47. <config-property name="severity" value="warning"/>
  48. <config-property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
  49. </config-properties>
  50. </rule-configuration>
  51. <rule-configuration
  52. classname="com.puppycrawl.tools.checkstyle.checks.LocalFinalVariableNameCheck" severity="warning">
  53. <config-properties>
  54. <config-property name="severity" value="warning"/>
  55. <config-property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
  56. </config-properties>
  57. </rule-configuration>
  58. <rule-configuration
  59. classname="com.puppycrawl.tools.checkstyle.checks.ConstantNameCheck" severity="warning">
  60. <config-properties>
  61. <config-property name="severity" value="warning"/>
  62. <config-property name="format" value="^[A-Z](_?[A-Z0-9]+)*$"/>
  63. </config-properties>
  64. </rule-configuration>
  65. <rule-configuration
  66. classname="com.puppycrawl.tools.checkstyle.checks.MethodNameCheck" severity="warning">
  67. <config-properties>
  68. <config-property name="severity" value="warning"/>
  69. <config-property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
  70. </config-properties>
  71. </rule-configuration>
  72. <rule-configuration
  73. classname="com.puppycrawl.tools.checkstyle.checks.PackageNameCheck" severity="warning">
  74. <config-properties>
  75. <config-property name="severity" value="warning"/>
  76. <config-property name="format" value="^[a-z]+(\.[a-zA-Z_][a-zA-Z0-9_]*)*$"/>
  77. </config-properties>
  78. </rule-configuration>
  79. <rule-configuration
  80. classname="com.puppycrawl.tools.checkstyle.checks.ParameterNameCheck" severity="warning">
  81. <config-properties>
  82. <config-property name="severity" value="warning"/>
  83. <config-property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
  84. </config-properties>
  85. </rule-configuration>
  86. <rule-configuration
  87. classname="com.puppycrawl.tools.checkstyle.checks.StaticVariableNameCheck" severity="warning">
  88. <config-properties>
  89. <config-property name="severity" value="warning"/>
  90. <config-property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
  91. </config-properties>
  92. </rule-configuration>
  93. <rule-configuration
  94. classname="com.puppycrawl.tools.checkstyle.checks.TypeNameCheck" severity="warning">
  95. <config-properties>
  96. <config-property name="tokens" value="CLASS_DEF, INTERFACE_DEF"/>
  97. <config-property name="severity" value="warning"/>
  98. <config-property name="format" value="^[A-Z][a-zA-Z0-9]*$"/>
  99. </config-properties>
  100. </rule-configuration>
  101. <rule-configuration
  102. classname="com.puppycrawl.tools.checkstyle.checks.FileLengthCheck" severity="warning">
  103. <config-properties>
  104. <config-property name="severity" value="warning"/>
  105. <config-property name="max" value="2000"/>
  106. </config-properties>
  107. </rule-configuration>
  108. <rule-configuration
  109. classname="com.puppycrawl.tools.checkstyle.checks.LineLengthCheck"
  110. severity="warning" comment="Set to 100 for HEAD">
  111. <config-properties>
  112. <config-property name="severity" value="warning"/>
  113. <config-property name="tabWidth" value="4"/>
  114. <config-property name="ignorePattern" value="^$"/>
  115. <config-property name="max" value="100"/>
  116. </config-properties>
  117. </rule-configuration>
  118. <rule-configuration
  119. classname="com.puppycrawl.tools.checkstyle.checks.MethodLengthCheck" severity="warning">
  120. <config-properties>
  121. <config-property name="tokens" value="METHOD_DEF, CTOR_DEF"/>
  122. <config-property name="severity" value="warning"/>
  123. <config-property name="max" value="150"/>
  124. </config-properties>
  125. </rule-configuration>
  126. <rule-configuration
  127. classname="com.puppycrawl.tools.checkstyle.checks.ParameterNumberCheck" severity="warning">
  128. <config-properties>
  129. <config-property name="tokens" value="METHOD_DEF, CTOR_DEF"/>
  130. <config-property name="severity" value="warning"/>
  131. <config-property name="max" value="7"/>
  132. </config-properties>
  133. </rule-configuration>
  134. <rule-configuration
  135. classname="com.puppycrawl.tools.checkstyle.checks.EmptyForIteratorPadCheck" severity="warning">
  136. <config-properties>
  137. <config-property name="option" value="nospace"/>
  138. <config-property name="severity" value="warning"/>
  139. </config-properties>
  140. </rule-configuration>
  141. <rule-configuration
  142. classname="com.puppycrawl.tools.checkstyle.checks.NoWhitespaceAfterCheck" severity="warning">
  143. <config-properties>
  144. <config-property name="allowLineBreaks" value="true"/>
  145. <config-property name="tokens" value="ARRAY_INIT, BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/>
  146. <config-property name="severity" value="warning"/>
  147. </config-properties>
  148. </rule-configuration>
  149. <rule-configuration
  150. classname="com.puppycrawl.tools.checkstyle.checks.NoWhitespaceBeforeCheck" severity="warning">
  151. <config-properties>
  152. <config-property name="allowLineBreaks" value="true"/>
  153. <config-property name="tokens" value="SEMI, POST_DEC, POST_INC"/>
  154. <config-property name="severity" value="warning"/>
  155. </config-properties>
  156. </rule-configuration>
  157. <rule-configuration
  158. classname="com.puppycrawl.tools.checkstyle.checks.TabCharacterCheck" severity="warning">
  159. <config-properties>
  160. <config-property name="severity" value="warning"/>
  161. </config-properties>
  162. </rule-configuration>
  163. <rule-configuration
  164. classname="com.puppycrawl.tools.checkstyle.checks.WhitespaceAroundCheck" severity="warning">
  165. <config-properties>
  166. <config-property name="severity" value="warning"/>
  167. <config-property name="tokens" value="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"/>
  168. </config-properties>
  169. </rule-configuration>
  170. <rule-configuration
  171. classname="com.puppycrawl.tools.checkstyle.checks.WhitespaceAfterCheck"
  172. severity="warning" comment="Excluding typecast">
  173. <config-properties>
  174. <config-property name="tokens" value="COMMA, SEMI"/>
  175. <config-property name="severity" value="warning"/>
  176. </config-properties>
  177. </rule-configuration>
  178. <rule-configuration
  179. classname="com.puppycrawl.tools.checkstyle.checks.OperatorWrapCheck"
  180. severity="warning" comment="Set all operator tokens.">
  181. <config-properties>
  182. <config-property name="option" value="nl"/>
  183. <config-property name="severity" value="warning"/>
  184. <config-property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN"/>
  185. </config-properties>
  186. </rule-configuration>
  187. <rule-configuration
  188. classname="com.puppycrawl.tools.checkstyle.checks.ModifierOrderCheck" severity="warning">
  189. <config-properties>
  190. <config-property name="severity" value="warning"/>
  191. </config-properties>
  192. </rule-configuration>
  193. <rule-configuration
  194. classname="com.puppycrawl.tools.checkstyle.checks.RedundantModifierCheck" severity="warning">
  195. <config-properties>
  196. <config-property name="tokens" value="METHOD_DEF, VARIABLE_DEF"/>
  197. <config-property name="severity" value="warning"/>
  198. </config-properties>
  199. </rule-configuration>
  200. <rule-configuration
  201. classname="com.puppycrawl.tools.checkstyle.checks.NeedBracesCheck" severity="warning">
  202. <config-properties>
  203. <config-property name="tokens" value="LITERAL_DO, LITERAL_ELSE, LITERAL_IF, LITERAL_FOR, LITERAL_WHILE"/>
  204. <config-property name="severity" value="warning"/>
  205. </config-properties>
  206. </rule-configuration>
  207. <rule-configuration
  208. classname="com.puppycrawl.tools.checkstyle.checks.RightCurlyCheck" severity="warning">
  209. <config-properties>
  210. <config-property name="option" value="same"/>
  211. <config-property name="tokens" value="LITERAL_CATCH, LITERAL_ELSE, LITERAL_TRY"/>
  212. <config-property name="severity" value="warning"/>
  213. </config-properties>
  214. </rule-configuration>
  215. <rule-configuration
  216. classname="com.puppycrawl.tools.checkstyle.checks.AvoidNestedBlocksCheck" severity="warning">
  217. <config-properties>
  218. <config-property name="severity" value="warning"/>
  219. </config-properties>
  220. </rule-configuration>
  221. <rule-configuration
  222. classname="com.puppycrawl.tools.checkstyle.checks.EmptyBlockCheck"
  223. severity="warning" comment="Any text required">
  224. <config-properties>
  225. <config-property name="option" value="text"/>
  226. <config-property name="severity" value="warning"/>
  227. <config-property name="tokens" value="LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_IF, LITERAL_FOR, LITERAL_TRY, LITERAL_WHILE, STATIC_INIT"/>
  228. </config-properties>
  229. </rule-configuration>
  230. <rule-configuration
  231. classname="com.puppycrawl.tools.checkstyle.checks.LeftCurlyCheck"
  232. severity="warning" comment="Apply new line on wrap">
  233. <config-properties>
  234. <config-property name="option" value="eol"/>
  235. <config-property name="severity" value="warning"/>
  236. <config-property name="tokens" value="CLASS_DEF, CTOR_DEF, INTERFACE_DEF, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, METHOD_DEF"/>
  237. <config-property name="maxLineLength" value="100"/>
  238. </config-properties>
  239. </rule-configuration>
  240. <rule-configuration
  241. classname="com.puppycrawl.tools.checkstyle.checks.DoubleCheckedLockingCheck" severity="warning">
  242. <config-properties>
  243. <config-property name="severity" value="warning"/>
  244. </config-properties>
  245. </rule-configuration>
  246. <rule-configuration
  247. classname="com.puppycrawl.tools.checkstyle.checks.EmptyStatementCheck" severity="warning">
  248. <config-properties>
  249. <config-property name="severity" value="warning"/>
  250. </config-properties>
  251. </rule-configuration>
  252. <rule-configuration
  253. classname="com.puppycrawl.tools.checkstyle.checks.EqualsHashCodeCheck" severity="warning">
  254. <config-properties>
  255. <config-property name="severity" value="warning"/>
  256. </config-properties>
  257. </rule-configuration>
  258. <rule-configuration
  259. classname="com.puppycrawl.tools.checkstyle.checks.HiddenFieldCheck" severity="warning">
  260. <config-properties>
  261. <config-property name="tokens" value="PARAMETER_DEF, VARIABLE_DEF"/>
  262. <config-property name="severity" value="warning"/>
  263. </config-properties>
  264. </rule-configuration>
  265. <rule-configuration
  266. classname="com.puppycrawl.tools.checkstyle.checks.InnerAssignmentCheck" severity="warning">
  267. <config-properties>
  268. <config-property name="tokens" value="ASSIGN, BAND_ASSIGN, BOR_ASSIGN, BSR_ASSIGN, BXOR_ASSIGN, DIV_ASSIGN, MINUS_ASSIGN, MOD_ASSIGN, PLUS_ASSIGN, SL_ASSIGN, SR_ASSIGN, STAR_ASSIGN"/>
  269. <config-property name="severity" value="warning"/>
  270. </config-properties>
  271. </rule-configuration>
  272. <rule-configuration
  273. classname="com.puppycrawl.tools.checkstyle.checks.MissingSwitchDefaultCheck" severity="warning">
  274. <config-properties>
  275. <config-property name="severity" value="warning"/>
  276. </config-properties>
  277. </rule-configuration>
  278. <rule-configuration
  279. classname="com.puppycrawl.tools.checkstyle.checks.RedundantThrowsCheck" severity="warning">
  280. <config-properties>
  281. <config-property name="allowSubclasses" value="false"/>
  282. <config-property name="allowUnchecked" value="false"/>
  283. <config-property name="severity" value="warning"/>
  284. </config-properties>
  285. </rule-configuration>
  286. <rule-configuration
  287. classname="com.puppycrawl.tools.checkstyle.checks.SimplifyBooleanExpressionCheck" severity="warning">
  288. <config-properties>
  289. <config-property name="severity" value="warning"/>
  290. </config-properties>
  291. </rule-configuration>
  292. <rule-configuration
  293. classname="com.puppycrawl.tools.checkstyle.checks.SimplifyBooleanReturnCheck" severity="warning">
  294. <config-properties>
  295. <config-property name="severity" value="warning"/>
  296. </config-properties>
  297. </rule-configuration>
  298. <rule-configuration
  299. classname="com.puppycrawl.tools.checkstyle.checks.HideUtilityClassConstructorCheck" severity="warning">
  300. <config-properties>
  301. <config-property name="severity" value="warning"/>
  302. </config-properties>
  303. </rule-configuration>
  304. <rule-configuration
  305. classname="com.puppycrawl.tools.checkstyle.checks.FinalClassCheck" severity="warning">
  306. <config-properties>
  307. <config-property name="severity" value="warning"/>
  308. </config-properties>
  309. </rule-configuration>
  310. <rule-configuration
  311. classname="com.puppycrawl.tools.checkstyle.checks.VisibilityModifierCheck"
  312. severity="warning" comment="Allow protected">
  313. <config-properties>
  314. <config-property name="packageAllowed" value="false"/>
  315. <config-property name="severity" value="warning"/>
  316. <config-property name="publicMemberPattern" value="^serialVersionUID"/>
  317. <config-property name="protectedAllowed" value="true"/>
  318. </config-properties>
  319. </rule-configuration>
  320. <rule-configuration
  321. classname="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck" severity="warning">
  322. <config-properties>
  323. <config-property name="severity" value="warning"/>
  324. </config-properties>
  325. </rule-configuration>
  326. <rule-configuration
  327. classname="com.puppycrawl.tools.checkstyle.checks.ArrayTypeStyleCheck" severity="warning">
  328. <config-properties>
  329. <config-property name="javaStyle" value="true"/>
  330. <config-property name="severity" value="warning"/>
  331. </config-properties>
  332. </rule-configuration>
  333. </check-configuration>
  334. </checkstyle-configurations>