Skip to content

Commit

Permalink
Fix checkstyle configuration (iotaledger#990)
Browse files Browse the repository at this point in the history
  • Loading branch information
legacycode authored and GalRogozinski committed Sep 17, 2018
1 parent b6c338e commit 0b039e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
IOTA checkstyle draft
Expand Down
13 changes: 10 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
<java-version>1.8</java-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<undertow.version>1.4.6.Final</undertow.version>
<!-- Setting the checkstyle.config.location here will make checkstyle use this file in every maven target.
This variable will be load by checkstyle plugin automatically. It is more global than setting the
configLocation attribute on every maven goal. -->
<checkstyle.config.location>checkstyle.xml</checkstyle.config.location>
</properties>

<repositories>
Expand Down Expand Up @@ -259,6 +263,8 @@
</execution>
</executions>
</plugin>
<!-- This checkstyle goal will only be invoked during the validate goal or by running "mvn validate"
manually. It indirectly calls "mvn checkstyle:check" -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
Expand All @@ -268,11 +274,10 @@
<id>validate</id>
<phase>validate</phase>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<configLocation>${checkstyle.config.location}</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<linkXRef>false</linkXRef>
</configuration>
<goals>
<goal>check</goal>
Expand Down Expand Up @@ -565,10 +570,12 @@
</profiles>
<reporting>
<plugins>
<!-- This checkstyle goal is indirectly called during report generation or by
running "mvn checkstyle:checkstyle" manually-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<version>3.0.0</version>
<reportSets>
<reportSet>
<reports>
Expand Down

0 comments on commit 0b039e9

Please sign in to comment.