Skip to content

Commit b4993e8

Browse files
authored
Merge pull request #483 from Pieter12345/checkstyle
Checkstyle
2 parents 95670d2 + 7961255 commit b4993e8

111 files changed

Lines changed: 4663 additions & 4250 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

checkstyle.xml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
3+
4+
<!--
5+
Checkstyle-Configuration: CommandHelper
6+
Description: A checkstyle configuration for CommandHelper.
7+
Author: P.J.S. Kools
8+
-->
9+
<module name="Checker">
10+
<property name="severity" value="error"/>
11+
<module name="TreeWalker">
12+
13+
<!-- Line length <= 120 characters. -->
14+
<module name="LineLength">
15+
<property name="severity" value="ignore"/> <!-- TODO: Change to "error" once the >7000 violations have been resolved. -->
16+
<property name="max" value="120"/>
17+
</module>
18+
19+
<!-- Indent must use tab characters. -->
20+
<module name="RegexpSinglelineJava">
21+
<property name="format" value="^\t* ([^\*]|$)"/> <!-- Javadoc and multiline comments have a single leading whitespace, so allow " *". -->
22+
<property name="message" value="Indent must use tab characters"/>
23+
<property name="ignoreComments" value="false"/>
24+
</module>
25+
26+
<!-- Disallow package.* imports. -->
27+
<module name="AvoidStarImport"/>
28+
29+
<!-- Disallow whitespaces after '(' and before ')'. -->
30+
<module name="ParenPad"/>
31+
32+
</module>
33+
34+
<!-- Disallow trailing whitespaces/tabs. -->
35+
<module name="RegexpSingleline">
36+
<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 " * ". -->
38+
<property name="message" value="Line has trailing whitespaces/tabs."/>
39+
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
40+
</module>
41+
</module>

pom.xml

Lines changed: 59 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,14 @@
198198
</dependency>
199199

200200
<!-- Used for IRC hooks -->
201-
<!--<dependency> NOT READY YET
202-
<groupId>org.jibble</groupId>
203-
<artifactId>pircbot</artifactId>
204-
<version>1.5.0</version>
205-
<scope>compile</scope>
206-
</dependency>-->
201+
<!-- NOT READY YET
202+
<dependency>
203+
<groupId>org.jibble</groupId>
204+
<artifactId>pircbot</artifactId>
205+
<version>1.5.0</version>
206+
<scope>compile</scope>
207+
</dependency>
208+
-->
207209

208210
<!-- Profiling library -->
209211
<dependency>
@@ -278,17 +280,17 @@
278280

279281
<!-- Evil-y things (currently not used) -->
280282
<!--<dependency>
281-
<groupId>cglib</groupId>
282-
<artifactId>cglib</artifactId>
283-
<version>2.2.2</version>
284-
<scope>compile</scope>
285-
<type>jar</type>
283+
<groupId>cglib</groupId>
284+
<artifactId>cglib</artifactId>
285+
<version>2.2.2</version>
286+
<scope>compile</scope>
287+
<type>jar</type>
286288
</dependency>
287289
<dependency>
288-
<groupId>org.javassist</groupId>
289-
<artifactId>javassist</artifactId>
290-
<version>3.15.0-GA</version>
291-
<type>jar</type>
290+
<groupId>org.javassist</groupId>
291+
<artifactId>javassist</artifactId>
292+
<version>3.15.0-GA</version>
293+
<type>jar</type>
292294
</dependency>-->
293295
<!-- Embedded SSH Client -->
294296
<dependency>
@@ -305,13 +307,13 @@
305307
<artifactId>jchardet</artifactId>
306308
<version>1.0</version>
307309
</dependency>
308-
<!-- https://mvnrepository.com/artifact/org.apache.oltu.oauth2/org.apache.oltu.oauth2.client -->
309-
<dependency>
310-
<!-- Apache License 2.0 -->
311-
<groupId>org.apache.oltu.oauth2</groupId>
312-
<artifactId>org.apache.oltu.oauth2.client</artifactId>
313-
<version>1.0.2</version>
314-
</dependency>
310+
<!-- https://mvnrepository.com/artifact/org.apache.oltu.oauth2/org.apache.oltu.oauth2.client -->
311+
<dependency>
312+
<!-- Apache License 2.0 -->
313+
<groupId>org.apache.oltu.oauth2</groupId>
314+
<artifactId>org.apache.oltu.oauth2.client</artifactId>
315+
<version>1.0.2</version>
316+
</dependency>
315317
<!-- Test libraries -->
316318
<!-- Hamcrest must come before powermock -->
317319
<dependency>
@@ -488,7 +490,7 @@
488490
</manifestEntries>
489491
</archive>
490492
</configuration>
491-
</plugin>
493+
</plugin>
492494

493495
<!-- Shade plugin -->
494496
<plugin>
@@ -503,13 +505,13 @@
503505
<goal>shade</goal>
504506
</goals>
505507
<configuration>
506-
<shadedArtifactAttached>true</shadedArtifactAttached>
507-
<shadedClassifierName>full</shadedClassifierName>
508-
<minimizeJar>false</minimizeJar>
509-
<!-- To add a new shaded dependency, there are three steps.
510-
1. Add a reference to the artifact set
511-
2. Add a relocation tag (usually recommended, though not always)
512-
3. Add it to the filter list
508+
<shadedArtifactAttached>true</shadedArtifactAttached>
509+
<shadedClassifierName>full</shadedClassifierName>
510+
<minimizeJar>false</minimizeJar>
511+
<!-- To add a new shaded dependency, there are three steps.
512+
1. Add a reference to the artifact set
513+
2. Add a relocation tag (usually recommended, though not always)
514+
3. Add it to the filter list
513515
514516
You can copy existing structures over, and change the parameters on them.
515517
-->
@@ -912,6 +914,33 @@
912914
</execution>
913915
</executions>
914916
</plugin>
917+
918+
<!-- Checkstyle plugin -->
919+
<plugin>
920+
<groupId>org.apache.maven.plugins</groupId>
921+
<artifactId>maven-checkstyle-plugin</artifactId>
922+
<version>3.0.0</version>
923+
<executions>
924+
<execution>
925+
<id>validate</id>
926+
<phase>validate</phase>
927+
<configuration>
928+
<sourceDirectories>${project.compileSourceRoots}</sourceDirectories>
929+
<testSourceDirectories>${project.testCompileSourceRoots}</testSourceDirectories>
930+
<includeTestSourceDirectory>true</includeTestSourceDirectory>
931+
<configLocation>${basedir}/checkstyle.xml</configLocation>
932+
<encoding>UTF-8</encoding>
933+
<consoleOutput>true</consoleOutput>
934+
<failsOnError>true</failsOnError>
935+
<linkXRef>false</linkXRef>
936+
</configuration>
937+
<goals>
938+
<goal>check</goal>
939+
</goals>
940+
</execution>
941+
</executions>
942+
</plugin>
943+
915944
</plugins>
916945
</build>
917946
<profiles>

0 commit comments

Comments
 (0)