Skip to content

Commit

Permalink
Check style only on Travis CI (#287)
Browse files Browse the repository at this point in the history
* Check style only on Travis CI

* Update pom.xml

* Update pom.xml

* update indent
  • Loading branch information
Eskibear authored Aug 7, 2019
1 parent 5860855 commit 08127a0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ os:

script:
- ./mvnw clean verify
- ./mvnw checkstyle:check

cache:
directories:
Expand Down
4 changes: 2 additions & 2 deletions check_style.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<property name="fileExtensions" value="java, properties, xml"/>
<module name="RegexpHeader">
<property name="headerFile" value="${basedir}/microsoft.header"/>
<property name="headerFile" value="microsoft.header"/>
</module>
<!-- Checks for whitespace
See http://checkstyle.sf.net/config_whitespace.html -->
Expand Down Expand Up @@ -289,4 +289,4 @@
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
</module>
</module>
</module>
26 changes: 15 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<base.name>Java Debug Server for Visual Studio Code</base.name>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tycho-version>1.2.0</tycho-version>
<checkstyleDir>${basedir}</checkstyleDir>
</properties>

<licenses>
Expand Down Expand Up @@ -113,15 +114,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
Expand All @@ -135,8 +127,7 @@
</dependency>
</dependencies>
<configuration>
<configLocation>${project.parent.basedir}/check_style.xml</configLocation>
<propertyExpansion>basedir=${project.parent.basedir}</propertyExpansion>
<configLocation>${checkstyleDir}/check_style.xml</configLocation>
<failOnViolation>true</failOnViolation>
</configuration>
</plugin>
Expand All @@ -148,6 +139,19 @@
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>activate-in-module</id>
<activation>
<file>
<exists>${basedir}/../check_style.xml</exists>
</file>
</activation>
<properties>
<checkstyleDir>${basedir}/..</checkstyleDir>
</properties>
</profile>
</profiles>
<repositories>
<repository>
<id>photon</id>
Expand Down

0 comments on commit 08127a0

Please sign in to comment.