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" >
<property name= "file" value= "config/suppressions.xml" />
</module>
<module name= "Header" >
2017-06-02 12:26:37 +02:00
<property name= "headerFile" value= "config/${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>
2015-03-17 11:33:02 +01:00
<module name= "RegexpSingleline" >
<property name= "format" value= "^\s+$" />
<property name= "message" value= "Line containing only whitespace character(s)" />
</module>
2015-03-18 21:51:25 +01:00
<module name= "RegexpSingleline" >
<!-- We use {2,} instead of + here to address the typical case where a file was written
with tabs but javadoc is causing '\t *' -->
<property name= "format" value= "^\t+ {2,}" />
<property name= "message" value= "Line containing space(s) after tab(s)" />
</module>
2015-03-17 11:40:58 +01:00
<module name= "RegexpSingleline" >
2015-03-18 21:01:49 +01:00
<!--
Explaining the following Regex
^ \s* [\S & & [^ \*/]]+ \s+ $
| | | | | +- End of Line (6)
| | | | +- At least one whitespace (5)
| | | +- At least one or more of the previous character class (4)
| | +- All non-whitespace characters except '*' and '/' (to exclude javadoc) (3)
| +- Zero or more space characters (2)
+- Start of Line (1)
Rationale:
Matches trailing whitespace (5) in lines containing at least one (4) non-whitespace character
that is not one of the characters used by javadoc (3).
-->
<property name= "format" value= "^\s*[\S&&[^\*/]]+\s+$" />
2015-03-17 11:40:58 +01:00
<property name= "message" value= "Line containing trailing whitespace character(s)" />
</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>
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>
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 -->
<property name= "scope" value= "public" />
<property name= "allowUndeclaredRTE" value= "true" />
<property name= "allowMissingParamTags" value= "true" />
<property name= "allowMissingThrowsTags" value= "true" />
<property name= "allowMissingReturnTag" value= "true" />
<property name= "allowMissingJavadoc" value= "true" />
<property name= "suppressLoadErrors" value= "true" />
</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
"/>
</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>
2017-06-14 17:12:43 +02:00
<module name= "CustomImportOrder" >
<property name= "customImportOrderRules"
value="STATIC###STANDARD_JAVA_PACKAGE###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE"/>
<property name= "specialImportsRegExp" value= "^org\.jivesoftware\.smack" />
<property name= "sortImportsInGroupAlphabetically" value= "true" />
<property name= "separateLineBetweenGroups" value= "true" />
</module>
2014-02-14 18:13:51 +01:00
</module>
</module>