Skip to content

Commit 84d5aa2

Browse files
author
André Behrens
committed
Merge pull request OfficeDev#438 from candrews/checkstyle
Add checkstyle as part of the Maven build to ensure coding standards compliance [ci skip]
2 parents 757bd4d + e10e0e7 commit 84d5aa2

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
<javadoc.doclint.param/>
8181

8282
<!-- Dependencies [BUILD]: -->
83+
<maven-checkstyle-plugin.version>2.16</maven-checkstyle-plugin.version>
8384
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
8485
<maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
8586
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
@@ -118,6 +119,34 @@
118119
<javadoc.doclint.param>-Xdoclint:none</javadoc.doclint.param>
119120
</properties>
120121
</profile>
122+
<profile>
123+
<!-- maven-checkstyle-plugin required Java 7 or later -->
124+
<id>java-7-or-later-profile</id>
125+
<activation>
126+
<jdk>[1.7,)</jdk>
127+
</activation>
128+
<build>
129+
<plugins>
130+
<plugin>
131+
<groupId>org.apache.maven.plugins</groupId>
132+
<artifactId>maven-checkstyle-plugin</artifactId>
133+
<version>${maven-checkstyle-plugin.version}</version>
134+
<configuration>
135+
<failsOnError>true</failsOnError>
136+
<configLocation>google_checks.xml</configLocation>
137+
</configuration>
138+
<executions>
139+
<execution>
140+
<phase>verify</phase>
141+
<goals>
142+
<goal>checkstyle</goal>
143+
</goals>
144+
</execution>
145+
</executions>
146+
</plugin>
147+
</plugins>
148+
</build>
149+
</profile>
121150
<profile>
122151
<id>release-sign-artifacts</id>
123152
<activation>

0 commit comments

Comments
 (0)