Use another formatter so that imports are also sorted

This commit is contained in:
Stephan Schroevers
2017-12-31 16:16:51 +01:00
parent 461754df83
commit cc1db9d3a4
6 changed files with 33 additions and 20 deletions

View File

@@ -281,6 +281,20 @@
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.1.0</version>
<executions>
<execution>
<id>format-sources</id>
<phase>process-sources</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.lewisd</groupId>
<artifactId>lint-maven-plugin</artifactId>
@@ -302,20 +316,6 @@
</rules>
</configuration>
</plugin>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>googleformatter-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<execution>
<id>format-sources</id>
<phase>process-sources</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
@@ -710,6 +710,19 @@
</plugins>
</build>
</profile>
<profile>
<!-- If explicitly enabled using `-Pformat` the source code is
formatted. -->
<id>format</id>
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- By default we verify various aspects of a module and the
artifact(s) it produces. We define these in checks in a profile

View File

@@ -26,8 +26,8 @@ import java.util.List;
import java.util.Optional;
import java.util.regex.Pattern;
// XXX: The special-casing of Throwable applies only to SLF4J 1.6.0+; see https://www.slf4j.org/faq.html#paramException.
// That should be documented.
// XXX: The special-casing of Throwable applies only to SLF4J 1.6.0+; see
// https://www.slf4j.org/faq.html#paramException. That should be documented.
// XXX: Also simplify `LOG.error(String.format("Something %s", arg), throwable)`.
// XXX: Write a similar checker for Spring RestTemplates, String.format and friends, Guava
// preconditions, ...

View File

@@ -1,8 +1,8 @@
package com.picnicinternational.errorprone.bugpatterns;
import com.google.errorprone.BugCheckerRefactoringTestHelper;
import com.google.errorprone.CompilationTestHelper;
import com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode;
import com.google.errorprone.CompilationTestHelper;
import java.io.IOException;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -2,8 +2,8 @@ package com.picnicinternational.errorprone.bugpatterns;
import com.google.common.collect.ImmutableList;
import com.google.errorprone.BugCheckerRefactoringTestHelper;
import com.google.errorprone.CompilationTestHelper;
import com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode;
import com.google.errorprone.CompilationTestHelper;
import java.io.IOException;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -2,8 +2,8 @@ package com.picnicinternational.errorprone.bugpatterns;
import com.google.common.collect.ImmutableList;
import com.google.errorprone.BugCheckerRefactoringTestHelper;
import com.google.errorprone.CompilationTestHelper;
import com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode;
import com.google.errorprone.CompilationTestHelper;
import java.io.IOException;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -1,8 +1,8 @@
package com.picnicinternational.errorprone.bugpatterns;
import com.google.errorprone.BugCheckerRefactoringTestHelper;
import com.google.errorprone.CompilationTestHelper;
import com.google.errorprone.BugCheckerRefactoringTestHelper.TestMode;
import com.google.errorprone.CompilationTestHelper;
import java.io.IOException;
import org.junit.Test;
import org.junit.runner.RunWith;