Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importOrderFile fails on "all unmatched type imports" group #2

Closed
benjaminhawkeslewis opened this issue Aug 24, 2015 · 2 comments
Closed

Comments

@benjaminhawkeslewis
Copy link

If you create an Eclipse import order including an "all unmatched type imports" group and attempt to use it with Spotless, Spotless errors.

Example import order file matching the Google Java style guide:

#Organize Import Order
#Sat Aug 22 12:43:31 BST 2015
4=javax
3=java
2=
1=com.google
0=\#

Note that "all unmatched type imports" (as the Eclipse UI phrases it) is represented by an empty string (number 2).

I think the error is produced in

where it is assumed that splitting the line on = will produce two strings.

@nedtwigg
Copy link
Member

Good find! There's a test harness for the import ordering here, which should make it easy to test a fix.

I should be able to look into a fix by Wednesday. If you'd like to do it yourself before then, I'd be happy to help in the gitter chat and merge the PR.

@nedtwigg
Copy link
Member

Implemented in 1.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants