checkstyle.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE module PUBLIC
  3. "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
  4. "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
  5. <!--
  6. // Copyright 2015 Confluent Inc.
  7. //
  8. // Licensed under the Apache License, Version 2.0 (the "License");
  9. // you may not use this file except in compliance with the License.
  10. // You may obtain a copy of the License at
  11. //
  12. // http://www.apache.org/licenses/LICENSE-2.0
  13. //
  14. // Unless required by applicable law or agreed to in writing, software
  15. // distributed under the License is distributed on an "AS IS" BASIS,
  16. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. // See the License for the specific language governing permissions and
  18. // limitations under the License.
  19. -->
  20. <module name="Checker">
  21. <property name="localeLanguage" value="en"/>
  22. <module name="FileTabCharacter"/>
  23. <module name="TreeWalker">
  24. <!-- code cleanup -->
  25. <module name="UnusedImports"/>
  26. <module name="RedundantImport"/>
  27. <module name="IllegalImport" />
  28. <module name="EqualsHashCode"/>
  29. <module name="SimplifyBooleanExpression"/>
  30. <module name="OneStatementPerLine"/>
  31. <module name="SimplifyBooleanReturn"/>
  32. <!-- style -->
  33. <module name="DefaultComesLast"/>
  34. <module name="EmptyStatement"/>
  35. <module name="ArrayTypeStyle"/>
  36. <module name="UpperEll"/>
  37. <module name="LeftCurly"/>
  38. <module name="RightCurly"/>
  39. <module name="EmptyStatement"/>
  40. <module name="ConstantName">
  41. <property name="format" value="(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)|(^log$)"/>
  42. </module>
  43. <module name="LocalVariableName"/>
  44. <module name="LocalFinalVariableName"/>
  45. <module name="MemberName"/>
  46. <module name="ClassTypeParameterName">
  47. <property name="format" value="^[A-Z0-9]*$"/>
  48. </module>
  49. <module name="MethodTypeParameterName">
  50. <property name="format" value="^[A-Z0-9]*$"/>
  51. </module>
  52. <module name="PackageName"/>
  53. <module name="ParameterName"/>
  54. <module name="StaticVariableName"/>
  55. <module name="TypeName"/>
  56. <module name="AvoidStarImport"/>
  57. <!-- whitespace -->
  58. <module name="GenericWhitespace"/>
  59. <module name="NoWhitespaceBefore"/>
  60. <module name="WhitespaceAfter" />
  61. <module name="NoWhitespaceAfter"/>
  62. <module name="WhitespaceAround">
  63. <property name="allowEmptyConstructors" value="true"/>
  64. <property name="allowEmptyMethods" value="true"/>
  65. </module>
  66. <module name="Indentation">
  67. <property name="basicOffset" value="2"/>
  68. <property name="caseIndent" value="2"/>
  69. </module>
  70. <module name="MethodParamPad"/>
  71. <module name="ParenPad"/>
  72. <module name="TypecastParenPad"/>
  73. </module>
  74. </module>