Skip to content

Commit 6cb2fb3

Browse files
authored
Merge pull request #484 from Pieter12345/checkstyle2
Checkstyle update
2 parents b4993e8 + baa509a commit 6cb2fb3

3 files changed

Lines changed: 27 additions & 11 deletions

File tree

checkstyle.xml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,40 @@
88
-->
99
<module name="Checker">
1010
<property name="severity" value="error"/>
11+
12+
<!-- Supression filter to disable specified modules/checks for specified files -->
13+
<module name="SuppressionFilter">
14+
<property name="file" value="checkstyle_suppressions.xml"/>
15+
<property name="optional" value="false"/>
16+
</module>
17+
1118
<module name="TreeWalker">
1219

13-
<!-- Line length <= 120 characters. -->
20+
<!-- Line length <= 120 characters -->
1421
<module name="LineLength">
15-
<property name="severity" value="ignore"/> <!-- TODO: Change to "error" once the >7000 violations have been resolved. -->
22+
<property name="severity" value="ignore"/> <!-- TODO: Change to "error" once the >7000 violations have been resolved -->
1623
<property name="max" value="120"/>
1724
</module>
1825

19-
<!-- Indent must use tab characters. -->
26+
<!-- Indent must use tab characters -->
2027
<module name="RegexpSinglelineJava">
21-
<property name="format" value="^\t* ([^\*]|$)"/> <!-- Javadoc and multiline comments have a single leading whitespace, so allow " *". -->
28+
<property name="format" value="^\t* ([^\*]|$)"/> <!-- Javadoc and multiline comments have a single leading whitespace, so allow " *" -->
2229
<property name="message" value="Indent must use tab characters"/>
2330
<property name="ignoreComments" value="false"/>
2431
</module>
2532

26-
<!-- Disallow package.* imports. -->
33+
<!-- Disallow package.* imports -->
2734
<module name="AvoidStarImport"/>
2835

29-
<!-- Disallow whitespaces after '(' and before ')'. -->
36+
<!-- Disallow whitespaces after '(' and before ')' -->
3037
<module name="ParenPad"/>
3138

3239
</module>
3340

34-
<!-- Disallow trailing whitespaces/tabs. -->
41+
<!-- Disallow trailing whitespaces/tabs -->
3542
<module name="RegexpSingleline">
3643
<property name="severity" value="error"/>
37-
<property name="format" value="(?&lt;! \*)\s+$"/> <!-- Empty javadoc and multiline comment lines have a single trailing whitespace, so allow " * ". -->
44+
<property name="format" value="(?&lt;! \*)\s+$"/> <!-- Empty javadoc and multiline comment lines have a single trailing whitespace, so allow " * " -->
3845
<property name="message" value="Line has trailing whitespaces/tabs."/>
3946
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
4047
</module>

checkstyle_suppressions.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
3+
4+
<suppressions>
5+
6+
<!-- Allow star imports in "...Test.java" files -->
7+
<suppress checks="AvoidStarImport" files=".*Test\.java$"/>
8+
9+
</suppressions>

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154

155155
<repository>
156156
<id>Plugin Metrics</id>
157-
<url>http://repo.mcstats.org/content/repositories/public</url>
157+
<url>http://repo.mcstats.org/content/repositories/public/</url>
158158
</repository>
159159

160160
<!-- Java Mail -->
@@ -922,8 +922,8 @@
922922
<version>3.0.0</version>
923923
<executions>
924924
<execution>
925-
<id>validate</id>
926-
<phase>validate</phase>
925+
<id>checkstyle</id>
926+
<phase>test</phase>
927927
<configuration>
928928
<sourceDirectories>${project.compileSourceRoots}</sourceDirectories>
929929
<testSourceDirectories>${project.testCompileSourceRoots}</testSourceDirectories>

0 commit comments

Comments
 (0)