2014-02-14 18:13:51 +01:00
<?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE module PUBLIC
2014-02-17 18:57:38 +01:00
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
2014-02-14 18:13:51 +01:00
<module name= "Checker" >
2014-02-17 18:57:38 +01:00
<module name= "SuppressionFilter" >
2019-07-20 09:36:14 +02:00
<property name= "file" value= "${config_loc}/suppressions.xml" />
2014-02-17 18:57:38 +01:00
</module>
2019-04-15 09:46:43 +02:00
<module name= "SuppressWithPlainTextCommentFilter" >
<property name= "offCommentFormat" value= "CHECKSTYLE\:OFF\:(\w+)" />
<property name= "onCommentFormat" value= "CHECKSTYLE\:ON\:(\w+)" />
<property name= "checkFormat" value= "$1" />
</module>
2014-02-17 18:57:38 +01:00
<module name= "Header" >
2019-07-20 09:36:14 +02:00
<property name= "headerFile" value= "${config_loc}/${checkstyleLicenseHeader}.txt" />
2014-02-17 18:57:38 +01:00
<property name= "ignoreLines" value= "3" />
<property name= "fileExtensions" value= "java" />
</module>
2014-02-17 23:58:40 +01:00
<module name= "NewlineAtEndOfFile" >
<property name= "lineSeparator" value= "lf" />
</module>
2014-02-20 13:38:12 +01:00
<module name= "RegexpSingleline" >
<property name= "format" value= "MXParser" />
<property name= "message" value= "Must not use MXParser, use XmlPullParserFactory instead" />
</module>
2015-07-21 08:19:15 +02:00
<module name= "RegexpSingleline" >
<!--
Matches StringBuilder.append(String) calls where the
argument is a String of length one. Those should be replaced
with append(char) for performance reasons.
TODO: This could be more advanced in order to match also
- .append("\u1234")
-->
<property name= "format" value= "\.append\("(.|\\.)"\)" />
<property name= "message" value= "Don't use StringBuilder.append(String) when you can use StringBuilder.append(char). Solution: Replace double quotes of append's argument with single quotes." />
</module>
2019-05-08 13:50:30 +02:00
<module name= "FileTabCharacter" />
2015-03-17 11:40:58 +01:00
<module name= "RegexpSingleline" >
2015-03-18 21:01:49 +01:00
<!--
Explaining the following Regex
2018-05-09 23:06:12 +02:00
\s+ $
| +- End of Line (2)
+- At least one whitespace (1)
2015-03-18 21:01:49 +01:00
Rationale:
2018-05-09 23:06:12 +02:00
Matches trailing whitespace (2) in lines containing at least one (1) non-whitespace character
2015-03-18 21:01:49 +01:00
-->
2018-05-09 23:06:12 +02:00
<property name= "format" value= "\s+$" />
2015-03-17 11:40:58 +01:00
<property name= "message" value= "Line containing trailing whitespace character(s)" />
</module>
2018-05-09 23:06:12 +02:00
<!-- <module name="RegexpSingleline"> -->
<!-- <property name="format" value="fqdn"/> -->
<!-- </module> -->
2017-11-20 08:53:19 +01:00
<module name= "RegexpSingleline" >
<property name= "format" value= "^\s*//[^\s]" />
2017-11-20 16:16:55 +01:00
<property name= "message" value= "Comment start ('//') followed by non-space character. You would not continue after a punctuation without a space, would you?" />
2017-11-20 08:53:19 +01:00
</module>
2019-04-15 09:46:43 +02:00
<!-- Check for synchronized keyword on Manager's static
getInstanceFor() method. Note that if XMPPConnection is every
replaced with something else, then we need to change it here
too. -->
<module name= "RegexpSingleline" >
<property name= "format" value= "^\s*public(?!.*synchronized).*getInstanceFor\(XMPPConnection.*$" />
<property name= "message" value= "getInstanceFor() should be synchronized" />
</module>
2015-04-04 17:16:47 +02:00
<module name= "JavadocPackage" />
2014-02-14 18:13:51 +01:00
<module name= "TreeWalker" >
2018-03-28 14:09:44 +02:00
<module name= "SuppressionCommentFilter" />
2015-04-06 10:45:12 +02:00
<module name= "FinalClass" />
2014-02-17 18:57:38 +01:00
<module name= "UnusedImports" >
<property name= "processJavadoc" value= "true" />
</module>
<module name= "AvoidStarImport" />
<module name= "IllegalImport" />
<module name= "RedundantImport" />
2018-03-28 14:02:21 +02:00
<module name= "RedundantModifier" />
2018-03-29 12:35:11 +02:00
<module name= "ModifierOrder" />
2014-02-17 18:57:38 +01:00
<module name= "UpperEll" />
<module name= "ArrayTypeStyle" />
<module name= "GenericWhitespace" />
<module name= "EmptyStatement" />
<module name= "PackageDeclaration" />
2018-04-06 10:21:46 +02:00
<module name= "LeftCurly" />
2015-03-17 21:19:06 +01:00
<module name= "RegexpSinglelineJava" >
<property name= "format" value= "printStackTrace" />
<property name= "message" value= "Usage of printStackTrace" />
<property name= "ignoreComments" value= "true" />
</module>
<module name= "RegexpSinglelineJava" >
<property name= "format" value= "println" />
<property name= "message" value= "Usage of println" />
<property name= "ignoreComments" value= "true" />
</module>
2018-11-29 22:38:11 +01:00
<module name= "RegexpSinglelineJava" >
<property name= "format" value= "Boolean\.valueOf\(" />
<property name= "message" value= "Usage Boolean.valueOf(), consider using ParserUtils.parseXmlBoolean() instead (if you want to parse xs:boolean values)" />
<property name= "ignoreComments" value= "true" />
</module>
2017-02-07 22:02:40 +01:00
<module name= "RegexpSinglelineJava" >
<property name= "format" value= "^\t+" />
<property name= "message" value= "Indent must not use tab characters. Use space instead." />
</module>
2015-03-29 12:15:32 +02:00
<module name= "JavadocMethod" >
<!-- TODO stricten those checks -->
2024-10-22 16:09:33 +02:00
<property name= "accessModifiers" value= "public,protected" />
2015-03-29 12:15:32 +02:00
</module>
<module name= "JavadocStyle" >
<property name= "scope" value= "public" />
<property name= "checkEmptyJavadoc" value= "true" />
<property name= "checkHtml" value= "false" />
</module>
2016-11-29 12:01:41 +01:00
<module name= "ParenPad" >
</module>
<module name= "NoWhitespaceAfter" >
<property name= "tokens" value= "INC
, DEC
, UNARY_MINUS
, UNARY_PLUS
, BNOT, LNOT
, DOT
, ARRAY_DECLARATOR
, INDEX_OP
"/>
</module>
2017-05-23 16:45:04 +02:00
<module name= "WhitespaceAfter" >
<property name= "tokens" value= "TYPECAST
, LITERAL_IF
, LITERAL_ELSE
, LITERAL_WHILE
, LITERAL_DO
, LITERAL_FOR
, DO_WHILE
2019-05-17 21:56:46 +02:00
, COMMA
2017-05-23 16:45:04 +02:00
"/>
</module>
<module name= "WhitespaceAround" >
<property
name="ignoreEnhancedForColon"
value="false"
/>
<!-- Currently disabled tokens: LCURLY, RCURLY, WILDCARD_TYPE, GENERIC_START, GENERIC_END -->
<property
name="tokens"
value="ASSIGN
, ARRAY_INIT
, BAND
, BAND_ASSIGN
, BOR
, BOR_ASSIGN
, BSR
, BSR_ASSIGN
, BXOR
, BXOR_ASSIGN
, COLON
, DIV
, DIV_ASSIGN
, DO_WHILE
, EQUAL
, GE
, GT
, LAMBDA
, LAND
, LE
, LITERAL_CATCH
, LITERAL_DO
, LITERAL_ELSE
, LITERAL_FINALLY
, LITERAL_FOR
, LITERAL_IF
, LITERAL_RETURN
, LITERAL_SWITCH
, LITERAL_SYNCHRONIZED
, LITERAL_TRY
, LITERAL_WHILE
, LOR
, LT
, MINUS
, MINUS_ASSIGN
, MOD
, MOD_ASSIGN
, NOT_EQUAL
, PLUS
, PLUS_ASSIGN
, QUESTION
, SL
, SLIST
, SL_ASSIGN
, SR
, SR_ASSIGN
, STAR
, STAR_ASSIGN
, LITERAL_ASSERT
, TYPE_EXTENSION_AND
"/>
</module>
2024-10-22 16:09:33 +02:00
<module name= "ImportOrder" >
<property name= "groups" value= "/^java\./,/^javax\./,/^org\.jivesoftware\.smack\./,/^org\.jivesoftware\.smackx\./,/^org\.igniterealtime\.smack\./,/^org\.igniterealtime\.smackx\./" />
<property name= "separated" value= "true" />
<property name= "option" value= "top" />
2017-06-14 17:12:43 +02:00
</module>
2019-07-24 09:18:39 +02:00
<module name= "MissingJavadocPackage" />
2024-10-22 16:09:33 +02:00
<!-- this seems to cause false positives with checkstyle 10.18.2
2019-07-24 09:18:39 +02:00
<module name= "UnnecessaryParentheses" />
2024-10-22 16:09:33 +02:00
-->
2019-07-24 09:18:39 +02:00
<module name= "UnnecessarySemicolonInEnumeration" />
<module name= "UnnecessarySemicolonInTryWithResources" />
2014-02-14 18:13:51 +01:00
</module>
</module>