Skip to content

Instantly share code, notes, and snippets.

@michael-simons
Created September 14, 2022 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michael-simons/b4207d81381153482d12615489675af8 to your computer and use it in GitHub Desktop.
Save michael-simons/b4207d81381153482d12615489675af8 to your computer and use it in GitHub Desktop.
Checkstyle config enforcing tabs but allowing leading spaces in text blocks.
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="SuppressWithPlainTextCommentFilter">
<property name="offCommentFormat" value='=\s+"""'/>
<property name="onCommentFormat" value='^\s+.*""";'/>
</module>
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
<module name="SuppressWarningsHolder" />
<module name="RegexpSinglelineJava">
<property name="format" value="^\t* "/>
<property name="message" value="Indent must use tab characters"/>
<property name="ignoreComments" value="true"/>
</module>
</module>
</module>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment