From 4d5baf46b6dca28487ff2937cb7f101a3bd3f2d0 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Fri, 7 May 2021 13:04:58 -0700 Subject: [PATCH] Ensure there are no unused imports with Spotless rather than Checkstyle (#5457) --- CONTRIBUTING.md | 2 +- pom.xml | 26 ++++++++++++++++++- ...toryPageFilterCaseSensitiveSearchTest.java | 1 - 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 260c3b0d34..96ed33f717 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,7 +33,7 @@ You can read a description of the [building and debugging process here]. If you want simply to build the `jenkins.war` file as fast as possible without tests, run: ```sh -mvn -am -pl war,bom -DskipTests -Dspotbugs.skip clean install +mvn -am -pl war,bom -DskipTests -Dspotbugs.skip -Dspotless.check.skip clean install ``` The WAR file will be created in `war/target/jenkins.war`. diff --git a/pom.xml b/pom.xml index 961e2951b0..97b583aecf 100644 --- a/pom.xml +++ b/pom.xml @@ -113,6 +113,7 @@ THE SOFTWARE. 1.21 5.7.1 2.0.9 + 2.10.3 @@ -515,6 +515,25 @@ THE SOFTWARE. + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + + + + + check + + + + @@ -612,6 +631,11 @@ THE SOFTWARE. maven-checkstyle-plugin + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + diff --git a/test/src/test/java/jenkins/widgets/HistoryPageFilterCaseSensitiveSearchTest.java b/test/src/test/java/jenkins/widgets/HistoryPageFilterCaseSensitiveSearchTest.java index c3cb57a2a6..ce7621dc4a 100644 --- a/test/src/test/java/jenkins/widgets/HistoryPageFilterCaseSensitiveSearchTest.java +++ b/test/src/test/java/jenkins/widgets/HistoryPageFilterCaseSensitiveSearchTest.java @@ -3,7 +3,6 @@ package jenkins.widgets; import java.io.IOException; import java.util.Arrays; import java.util.Collections; -import java.util.List; import org.junit.Assert; import org.junit.Rule;