Skip to content

Commit

Permalink
chore: prepares checkstyle checking for src/test/java (#2611)
Browse files Browse the repository at this point in the history
* up

* Commit by Martin Monperrus on 09 October 2018
  • Loading branch information
monperrus authored and surli committed Oct 17, 2018
1 parent c038222 commit ddf4040
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
21 changes: 21 additions & 0 deletions checkstyle-test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<!-- Checkstyle config for Spoon tests -->
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf"/>
</module>
<!-- Trailing spaces -->
<!-- <module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>-->

<!-- Checks for the new line format -->
<!-- <module name="RegexpMultiline">
<property name="format" value="\r\n"/>
<property name="message" value="Do not use Windows line endings"/>
</module>-->

<!-- our new rules, only for src/test/java -->
</module>
13 changes: 12 additions & 1 deletion chore/travis/travis-verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@
# it runs verify and site maven goals
# and to check documentation links

# fails if anything fails
set -e

source /opt/jdk_switcher/jdk_switcher.sh

pip install --user CommonMark==0.7.5 requests pygithub

jdk_switcher use oraclejdk9 && mvn -Djava.src.version=1.9 verify license:check site javadoc:jar install -DskipTests -DadditionalJOption=-Xdoclint:none && python ./chore/check-links-in-doc.py
jdk_switcher use oraclejdk9

mvn -Djava.src.version=1.9 verify license:check site javadoc:jar install -DskipTests -DadditionalJOption=-Xdoclint:none

# checkstyle in src/tests
mvn checkstyle:checkstyle -Pcheckstyle-test

python ./chore/check-links-in-doc.py
19 changes: 18 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,24 @@
</reporting>

<profiles>
<profile>
<profile>
<id>checkstyle-test</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<configuration>
<failsOnError>true</failsOnError>
<configLocation>checkstyle-test.xml</configLocation>
<consoleOutput>true</consoleOutput>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>coveralls</id>
<build>
<plugins>
Expand Down

0 comments on commit ddf4040

Please sign in to comment.