forked from diffplug/spotless
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Java importOrder support for sorting wildcards last
Adds support for sorting wildcards after non-wildcards in the import list. Gradle config like so: ``` importOrder('java', 'javax', 'com.acme', '').wildcardsLast() ``` Not implemented here: Maven plugin support Fixes diffplug#879.
- Loading branch information
Showing
10 changed files
with
141 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
testlib/src/main/resources/java/importsorter/JavaCodeSortedImports.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
import java.awt.*; | ||
import java.lang.Runnable; | ||
import java.lang.Thread; | ||
import java.util.*; | ||
import java.util.List; | ||
|
||
import org.dooda.Didoo; | ||
|
||
import static java.lang.Exception.*; | ||
import static java.lang.Runnable.*; | ||
import static org.hamcrest.Matchers.*; | ||
|
||
import static com.foo.Bar; | ||
import static com.github.tomakehurst.wiremock.client.WireMock.*; | ||
import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; |
6 changes: 6 additions & 0 deletions
6
testlib/src/main/resources/java/importsorter/JavaCodeSortedImportsDefault.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import static com.foo.Bar; | ||
import static com.github.tomakehurst.wiremock.client.WireMock.*; | ||
import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; | ||
import static java.lang.Exception.*; | ||
import static java.lang.Runnable.*; | ||
import static org.hamcrest.Matchers.*; | ||
|
||
import java.awt.*; | ||
import java.lang.Runnable; | ||
import java.lang.Thread; | ||
import java.util.*; | ||
import java.util.List; | ||
import org.dooda.Didoo; |
13 changes: 13 additions & 0 deletions
13
testlib/src/main/resources/java/importsorter/JavaCodeSortedImportsWildcardsLast.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import static com.foo.Bar; | ||
import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; | ||
import static com.github.tomakehurst.wiremock.client.WireMock.*; | ||
import static java.lang.Exception.*; | ||
import static java.lang.Runnable.*; | ||
import static org.hamcrest.Matchers.*; | ||
|
||
import java.awt.*; | ||
import java.lang.Runnable; | ||
import java.lang.Thread; | ||
import java.util.List; | ||
import java.util.*; | ||
import org.dooda.Didoo; |
6 changes: 6 additions & 0 deletions
6
testlib/src/main/resources/java/importsorter/JavaCodeUnsortedImports.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import static java.lang.Exception.*; | ||
import static com.github.tomakehurst.wiremock.client.WireMock.*; | ||
import org.dooda.Didoo; | ||
import java.util.List; | ||
import java.lang.Thread; | ||
import java.util.*; | ||
import java.lang.Runnable; | ||
import static org.hamcrest.Matchers.*; | ||
|
||
import static java.lang.Runnable.*; | ||
import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; | ||
import static com.foo.Bar | ||
import java.awt.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters