Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
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.

243 lines
12 KiB

  1. <?xml version="1.0"?>
  2. <!DOCTYPE module PUBLIC
  3. "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
  4. "https://checkstyle.org/dtds/configuration_1_3.dtd">
  5. <module name = "Checker">
  6. <property name="charset" value="UTF-8"/>
  7. <property name="severity" value="warning"/>
  8. <property name="fileExtensions" value="java, properties, xml"/>
  9. <!-- Checks for whitespace -->
  10. <!-- See http://checkstyle.sf.net/config_whitespace.html -->
  11. <module name="FileTabCharacter">
  12. <property name="eachLine" value="true"/>
  13. </module>
  14. <module name="TreeWalker">
  15. <module name="OuterTypeFilename"/>
  16. <module name="IllegalTokenText">
  17. <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
  18. <property name="format"
  19. value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
  20. <property name="message"
  21. value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
  22. </module>
  23. <module name="AvoidEscapedUnicodeCharacters">
  24. <property name="allowEscapesForControlCharacters" value="true"/>
  25. <property name="allowByTailComment" value="true"/>
  26. <property name="allowNonPrintableEscapes" value="true"/>
  27. </module>
  28. <module name="LineLength">
  29. <property name="max" value="100"/>
  30. <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
  31. </module>
  32. <module name="AvoidStarImport"/>
  33. <module name="OneTopLevelClass"/>
  34. <module name="NoLineWrap"/>
  35. <module name="EmptyBlock">
  36. <property name="option" value="TEXT"/>
  37. <property name="tokens"
  38. value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
  39. </module>
  40. <module name="NeedBraces"/>
  41. <module name="LeftCurly"/>
  42. <module name="RightCurly">
  43. <property name="id" value="RightCurlySame"/>
  44. <property name="tokens"
  45. value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
  46. LITERAL_DO"/>
  47. </module>
  48. <module name="RightCurly">
  49. <property name="id" value="RightCurlyAlone"/>
  50. <property name="option" value="alone"/>
  51. <property name="tokens"
  52. value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
  53. INSTANCE_INIT"/>
  54. </module>
  55. <module name="WhitespaceAround">
  56. <property name="allowEmptyConstructors" value="true"/>
  57. <property name="allowEmptyMethods" value="true"/>
  58. <property name="allowEmptyTypes" value="true"/>
  59. <property name="allowEmptyLoops" value="true"/>
  60. <message key="ws.notFollowed"
  61. value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
  62. <message key="ws.notPreceded"
  63. value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
  64. </module>
  65. <module name="OneStatementPerLine"/>
  66. <module name="MultipleVariableDeclarations"/>
  67. <module name="ArrayTypeStyle"/>
  68. <module name="MissingSwitchDefault"/>
  69. <module name="FallThrough"/>
  70. <module name="UpperEll"/>
  71. <module name="ModifierOrder"/>
  72. <module name="EmptyLineSeparator">
  73. <property name="allowNoEmptyLineBetweenFields" value="true"/>
  74. </module>
  75. <module name="SeparatorWrap">
  76. <property name="id" value="SeparatorWrapDot"/>
  77. <property name="tokens" value="DOT"/>
  78. <property name="option" value="nl"/>
  79. </module>
  80. <module name="SeparatorWrap">
  81. <property name="id" value="SeparatorWrapComma"/>
  82. <property name="tokens" value="COMMA"/>
  83. <property name="option" value="EOL"/>
  84. </module>
  85. <module name="SeparatorWrap">
  86. <!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/258 -->
  87. <property name="id" value="SeparatorWrapEllipsis"/>
  88. <property name="tokens" value="ELLIPSIS"/>
  89. <property name="option" value="EOL"/>
  90. </module>
  91. <module name="SeparatorWrap">
  92. <!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/259 -->
  93. <property name="id" value="SeparatorWrapArrayDeclarator"/>
  94. <property name="tokens" value="ARRAY_DECLARATOR"/>
  95. <property name="option" value="EOL"/>
  96. </module>
  97. <module name="SeparatorWrap">
  98. <property name="id" value="SeparatorWrapMethodRef"/>
  99. <property name="tokens" value="METHOD_REF"/>
  100. <property name="option" value="nl"/>
  101. </module>
  102. <module name="PackageName">
  103. <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
  104. <message key="name.invalidPattern"
  105. value="Package name ''{0}'' must match pattern ''{1}''."/>
  106. </module>
  107. <module name="TypeName">
  108. <message key="name.invalidPattern"
  109. value="Type name ''{0}'' must match pattern ''{1}''."/>
  110. </module>
  111. <module name="MemberName">
  112. <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
  113. <message key="name.invalidPattern"
  114. value="Member name ''{0}'' must match pattern ''{1}''."/>
  115. </module>
  116. <module name="ParameterName">
  117. <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
  118. <message key="name.invalidPattern"
  119. value="Parameter name ''{0}'' must match pattern ''{1}''."/>
  120. </module>
  121. <module name="LambdaParameterName">
  122. <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
  123. <message key="name.invalidPattern"
  124. value="Lambda parameter name ''{0}'' must match pattern ''{1}''."/>
  125. </module>
  126. <module name="CatchParameterName">
  127. <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
  128. <message key="name.invalidPattern"
  129. value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
  130. </module>
  131. <module name="LocalVariableName">
  132. <property name="tokens" value="VARIABLE_DEF"/>
  133. <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
  134. <message key="name.invalidPattern"
  135. value="Local variable name ''{0}'' must match pattern ''{1}''."/>
  136. </module>
  137. <module name="ClassTypeParameterName">
  138. <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
  139. <message key="name.invalidPattern"
  140. value="Class type name ''{0}'' must match pattern ''{1}''."/>
  141. </module>
  142. <module name="MethodTypeParameterName">
  143. <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
  144. <message key="name.invalidPattern"
  145. value="Method type name ''{0}'' must match pattern ''{1}''."/>
  146. </module>
  147. <module name="InterfaceTypeParameterName">
  148. <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
  149. <message key="name.invalidPattern"
  150. value="Interface type name ''{0}'' must match pattern ''{1}''."/>
  151. </module>
  152. <module name="NoFinalizer"/>
  153. <module name="GenericWhitespace">
  154. <message key="ws.followed"
  155. value="GenericWhitespace ''{0}'' is followed by whitespace."/>
  156. <message key="ws.preceded"
  157. value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
  158. <message key="ws.illegalFollow"
  159. value="GenericWhitespace ''{0}'' should followed by whitespace."/>
  160. <message key="ws.notPreceded"
  161. value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
  162. </module>
  163. <module name="Indentation">
  164. <property name="basicOffset" value="2"/>
  165. <property name="braceAdjustment" value="0"/>
  166. <property name="caseIndent" value="2"/>
  167. <property name="throwsIndent" value="4"/>
  168. <property name="lineWrappingIndentation" value="4"/>
  169. <property name="arrayInitIndent" value="2"/>
  170. </module>
  171. <module name="AbbreviationAsWordInName">
  172. <property name="ignoreFinal" value="false"/>
  173. <property name="allowedAbbreviationLength" value="1"/>
  174. </module>
  175. <module name="OverloadMethodsDeclarationOrder"/>
  176. <module name="VariableDeclarationUsageDistance"/>
  177. <module name="CustomImportOrder">
  178. <property name="sortImportsInGroupAlphabetically" value="true"/>
  179. <property name="separateLineBetweenGroups" value="true"/>
  180. <property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE"/>
  181. </module>
  182. <module name="MethodParamPad"/>
  183. <module name="NoWhitespaceBefore">
  184. <property name="tokens"
  185. value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
  186. <property name="allowLineBreaks" value="true"/>
  187. </module>
  188. <module name="ParenPad"/>
  189. <module name="OperatorWrap">
  190. <property name="option" value="NL"/>
  191. <property name="tokens"
  192. value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
  193. LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
  194. </module>
  195. <module name="AnnotationLocation">
  196. <property name="id" value="AnnotationLocationMostCases"/>
  197. <property name="tokens"
  198. value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
  199. </module>
  200. <module name="AnnotationLocation">
  201. <property name="id" value="AnnotationLocationVariables"/>
  202. <property name="tokens" value="VARIABLE_DEF"/>
  203. <property name="allowSamelineMultipleAnnotations" value="true"/>
  204. </module>
  205. <module name="NonEmptyAtclauseDescription"/>
  206. <module name="JavadocTagContinuationIndentation"/>
  207. <module name="SummaryJavadoc">
  208. <property name="forbiddenSummaryFragments"
  209. value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
  210. </module>
  211. <module name="JavadocParagraph"/>
  212. <module name="AtclauseOrder">
  213. <property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
  214. <property name="target"
  215. value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
  216. </module>
  217. <module name="JavadocMethod">
  218. <property name="scope" value="public"/>
  219. <property name="allowMissingParamTags" value="true"/>
  220. <property name="allowMissingThrowsTags" value="true"/>
  221. <property name="allowMissingReturnTag" value="true"/>
  222. <property name="minLineCount" value="2"/>
  223. <property name="allowedAnnotations" value="Override, Test"/>
  224. <property name="allowThrowsTagsForSubclasses" value="true"/>
  225. </module>
  226. <module name="MethodName">
  227. <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
  228. <message key="name.invalidPattern"
  229. value="Method name ''{0}'' must match pattern ''{1}''."/>
  230. </module>
  231. <module name="SingleLineJavadoc">
  232. <property name="ignoreInlineTags" value="false"/>
  233. </module>
  234. <module name="EmptyCatchBlock">
  235. <property name="exceptionVariableName" value="expected"/>
  236. </module>
  237. <module name="CommentsIndentation"/>
  238. </module>
  239. </module>