aboutsummaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2018-04-23 02:46:40 +0200
committerTharre <tharre3@gmail.com>2018-04-27 00:24:09 +0200
commit96a4b8c279940c22b5db62b88d7987ec6cadef51 (patch)
tree65f631400b5b00fd7efecc00e733f6ad816312fb /pom.xml
parent875319524d220e10564d6c3e19783d298f09d5c4 (diff)
downloadsepm-groupproject-96a4b8c279940c22b5db62b88d7987ec6cadef51.tar.gz
sepm-groupproject-96a4b8c279940c22b5db62b88d7987ec6cadef51.tar.xz
sepm-groupproject-96a4b8c279940c22b5db62b88d7987ec6cadef51.zip
Add pre-commit hook that checks code formatting
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml22
1 files changed, 22 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index 172ff4f..c0587cc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,9 +23,11 @@
<!-- test dependencies -->
<junit.version>4.12</junit.version>
<mockito.version>2.18.0</mockito.version>
+ <google-java-format.version>1.5</google-java-format.version>
<!-- plugins -->
<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
<maven-shade-plugin.version>3.1.1</maven-shade-plugin.version>
+ <fmt-maven-plugin.version>2.4.0</fmt-maven-plugin.version>
</properties>
<dependencies>
@@ -83,6 +85,11 @@
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.google.googlejavaformat</groupId>
+ <artifactId>google-java-format</artifactId>
+ <version>${google-java-format.version}</version>
+ </dependency>
</dependencies>
<build>
@@ -131,6 +138,21 @@
</transformers>
</configuration>
</plugin>
+ <plugin>
+ <groupId>com.coveo</groupId>
+ <artifactId>fmt-maven-plugin</artifactId>
+ <version>${fmt-maven-plugin.version}</version>
+ <configuration>
+ <style>aosp</style>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>format</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>