Skip to content

Commit 93a99c3

Browse files
committed
Example import orders now include an empty group, so that unspecified imports will be lumped together at the end. Issue #18 shows that the current example is confusing.
1 parent 7ef7c50 commit 93a99c3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ spotless {
9393
licenseHeaderFile 'spotless.license.java' // License header file
9494
// Obviously, you can't specify both licenseHeader and licenseHeaderFile at the same time
9595
96-
importOrder ['java', 'javax', 'org', 'com', 'com.diffplug'] // An array of package names
97-
importOrderFile 'spotless.importorder' // An import ordering file, exported from Eclipse
96+
importOrder ['java', 'javax', 'org', 'com', 'com.diffplug', ''] // An array of package names
97+
importOrderFile 'spotless.importorder' // An import ordering file, exported from Eclipse
9898
// As before, you can't specify both importOrder and importOrderFile at the same time
99+
// You probably want an empty string at the end - all of the imports you didn't specify
100+
// explicitly will go there.
99101
100102
eclipseFormatFile 'spotless.eclipseformat.xml' // XML file dumped out by the Eclipse formatter
101103
// If you have an older Eclipse properties file, you can use that too.

spotless.importorder

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#Organize Import Order
22
#Fri Apr 24 02:36:28 PDT 2015
3+
5=
34
4=com.diffplug
45
3=com
56
2=org

0 commit comments

Comments
 (0)