Skip to content

Commit

Permalink
ARROW-208: Add checkstyle policy to java project
Browse files Browse the repository at this point in the history
  • Loading branch information
oza committed Mar 19, 2017
1 parent 4c5f79c commit 40ee6a3
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<forkCount>2</forkCount>
<jackson.version>2.7.1</jackson.version>
<hadoop.version>2.7.1</hadoop.version>
<checkstyle.failOnViolation>false</checkstyle.failOnViolation>
</properties>

<scm>
Expand Down Expand Up @@ -269,6 +270,47 @@
</gitDescribe>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>6.15</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${dep.guava.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<configLocation>google_checks.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>${checkstyle.failOnViolation}</failsOnError>
<failOnViolation>${checkstyle.failOnViolation}</failOnViolation>
<violationSeverity>warning</violationSeverity>
<format>xml</format>
<format>html</format>
<outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile>
<linkXRef>false</linkXRef>
</configuration>
</plugin>


</plugins>
<pluginManagement>

Expand Down Expand Up @@ -382,6 +424,19 @@
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<versionRange>[0,)</versionRange>
<goals>
<goal>check</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
Expand Down

0 comments on commit 40ee6a3

Please sign in to comment.