-
Notifications
You must be signed in to change notification settings - Fork 885
SortImports option is ignored #42
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
Comments
Seems like the |
Yep, currently import ordering only works with the cli. It's work in progress. Adding it to the methods in the api that return strings would be easy, but some details need to be sorted out for the methods that do partial formatting or return replacement ranges. |
Look forward to seeing this in a release, so I can also plug it into my https://github.com/talios/googleformatter-maven-plugin Maven plugin. |
The same goes for the |
Do you have a repro? |
I wouldn't expect the text to change in any way in the example below. Or is this not how it works?
|
The implementation makes a distinction between normalizing leading Part of the reason that the configuration is rough around the edges is that non-configurability is a stated goal of the formatter. Javadoc formatting and import sorting are off by default because they're work in progress. Once they're done, they'll be on by default. |
Ah okay, I didn't know that. And the style option also works as expected 😉 |
There's an update on import sorting in #37. I'm still not sure how it should look in the API, let me know if you have ideas. And the javadoc formatting is now more polished, and has been enabled by default. |
No matter which
SortImports
option I set (ONLY
,ALSO
orNO
), the imports are never sorted and it always returns the same result. Am I missing something here?The text was updated successfully, but these errors were encountered: