Skip to content

Commit 2008ca8

Browse files
committed
Format code automatically during compile using google-java-format
There's lot of inconsistent uses of tabs vs spaces throughout the project, and this is leading to some weird diffs. I submit the project should just enforce formatting during compile time and just remove any doubt. This way contributors won't need to update their Eclipse configuration to match, as long as they run mvn compile, it'll format correctly.
1 parent 3ec7264 commit 2008ca8

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

pom.xml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,18 @@
116116

117117
<build>
118118
<plugins>
119+
<plugin>
120+
<groupId>com.coveo</groupId>
121+
<artifactId>fmt-maven-plugin</artifactId>
122+
<version>2.6.0</version>
123+
<executions>
124+
<execution>
125+
<goals>
126+
<goal>format</goal>
127+
</goals>
128+
</execution>
129+
</executions>
130+
</plugin>
119131
<plugin>
120132
<groupId>org.apache.maven.plugins</groupId>
121133
<artifactId>maven-compiler-plugin</artifactId>
@@ -272,19 +284,19 @@
272284
<profile>
273285
<id>ossrh</id>
274286
<properties>
275-
<gpg.executable>gpg</gpg.executable>
276-
<gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
277-
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
278-
<gpg.defaultKeyring>false</gpg.defaultKeyring>
279-
<gpg.publicKeyring>deploy/pubring.gpg</gpg.publicKeyring>
280-
<gpg.secretKeyring>deploy/secring.gpg</gpg.secretKeyring>
281-
</properties>
287+
<gpg.executable>gpg</gpg.executable>
288+
<gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
289+
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
290+
<gpg.defaultKeyring>false</gpg.defaultKeyring>
291+
<gpg.publicKeyring>deploy/pubring.gpg</gpg.publicKeyring>
292+
<gpg.secretKeyring>deploy/secring.gpg</gpg.secretKeyring>
293+
</properties>
282294
<activation>
283-
<property>
284-
<name>performRelease</name>
285-
<value>true</value>
286-
</property>
287-
</activation>
295+
<property>
296+
<name>performRelease</name>
297+
<value>true</value>
298+
</property>
299+
</activation>
288300
<build>
289301
<plugins>
290302
<plugin>

0 commit comments

Comments
 (0)