aboutsummaryrefslogtreecommitdiff
path: root/checkstyle.xml
diff options
context:
space:
mode:
authorJesse Wilson <jesse@swank.ca>2017-05-06 15:59:35 -0400
committerGitHub <noreply@github.com>2017-05-06 15:59:35 -0400
commit48378f7b2b491e1b6fed8c0a4eb25f331b71a6b1 (patch)
tree9ca24e5e557425b282c76ccdcaebe03ed7ccfb4d /checkstyle.xml
parente11279525524d12f8eb4687b1f4e926d75bf1371 (diff)
downloadjavapoet-48378f7b2b491e1b6fed8c0a4eb25f331b71a6b1.tar.gz
Upgrade to Checkstyle 7.7. (#556)
Diffstat (limited to 'checkstyle.xml')
-rw-r--r--checkstyle.xml30
1 files changed, 27 insertions, 3 deletions
diff --git a/checkstyle.xml b/checkstyle.xml
index 1e14f78..52f6dbc 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -1,9 +1,10 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
- "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
- "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
+ <module name="SuppressWarningsFilter"/>
<module name="NewlineAtEndOfFile"/>
<module name="FileLength"/>
<module name="FileTabCharacter"/>
@@ -14,6 +15,18 @@
<property name="message" value="Line has trailing spaces."/>
</module>
+ <!-- Space after 'for' and 'if' -->
+ <module name="RegexpSingleline">
+ <property name="format" value="^\s*(for|if)\b[^ ]"/>
+ <property name="message" value="Space needed before opening parenthesis."/>
+ </module>
+
+ <!-- For each spacing -->
+ <module name="RegexpSingleline">
+ <property name="format" value="^\s*for \(.*?([^ ]:|:[^ ])"/>
+ <property name="message" value="Space needed around ':' character."/>
+ </module>
+
<module name="TreeWalker">
<property name="cacheFile" value="${checkstyle.cache.file}"/>
@@ -71,7 +84,15 @@
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
- <module name="WhitespaceAround"/>
+ <module name="WhitespaceAround">
+ <property name="tokens"
+ value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN,
+ COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAND, LCURLY, 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>
<!-- Modifier Checks -->
@@ -120,5 +141,8 @@
<!--module name="FinalParameters"/-->
<module name="TodoComment"/>
<module name="UpperEll"/>
+
+ <!-- Make the @SuppressWarnings annotations available to Checkstyle -->
+ <module name="SuppressWarningsHolder"/>
</module>
</module>