Skip to content

Commit

Permalink
Add checkstyle rules to check usage of System.out System.err
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernard31 committed Jul 13, 2022
1 parent 893aff8 commit 168c045
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions eclipse/checkstyle.xml
Expand Up @@ -4,8 +4,22 @@
"https://checkstyle.org/dtds/configuration_1_3.dtd">

<module name="Checker">
<module name="TreeWalker">
<module name="RegexpSinglelineJava">
<property name="id" value="no_sys"/>
<property name="format" value="System\.(out|err)\.print(ln|f){0,1}\(.*\)"/>
<property name="ignoreComments" value="true"/>
<property name="message" value="No `sysout` or `syserr` allowed."/>
</module>
</module>
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="message" value="No trailing white space allowed."/>
</module>

<!-- Remove some rules for specifics classes -->
<module name="SuppressionSingleFilter">
<property name="id" value="no_sys"/>
<property name="files" value="FileLister.java"/>
</module>
</module>

0 comments on commit 168c045

Please sign in to comment.