1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 10:19:41 +02:00

Add more checkstyle tests

- Lines containing tab(s) after space
- Usage of printStackTrace
- Usage of println
- Add SupressionCommentFilter module

SuppressionCommentFilter can be enabled with
// CHECKSTYLE:OFF
and disabled with
// CHECKSTYLE:ON
This commit is contained in:
Florian Schmaus 2015-03-17 21:19:06 +01:00
parent 4f64bb1036
commit b2221d5483
59 changed files with 382 additions and 202 deletions

View file

@ -6,6 +6,7 @@
<module name="SuppressionFilter">
<property name="file" value="config/suppressions.xml"/>
</module>
<module name="SuppressionCommentFilter"/>
<module name="Header">
<property name="headerFile" value="config/header.txt"/>
<property name="ignoreLines" value="3"/>
@ -22,6 +23,10 @@
<property name="format" value="^\s+$"/>
<property name="message" value="Line containing only whitespace character(s)"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="^ +\t+"/>
<property name="message" value="Line containing tab(s) after space"/>
</module>
<!-- TODO enable this once eclilpse does no longer add javadoc with trailing whitespaces
<module name="RegexpSingleline">
<property name="format" value="^.*\S+\s+$"/>
@ -29,6 +34,7 @@
</module>
-->
<module name="TreeWalker">
<module name="FileContentsHolder"/>
<module name="UnusedImports">
<property name="processJavadoc" value="true"/>
</module>
@ -40,5 +46,15 @@
<module name="GenericWhitespace"/>
<module name="EmptyStatement"/>
<module name="PackageDeclaration"/>
<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>
</module>
</module>