imports for Kotlin files on Android Studio (IntelliJ) when sorting / optimizing imports? For Java files there is a “Preferences - Code Style - Java - Imports - Import Layout” where I can remove the special handling of
java.*
but for Kotlin I haven’t found a way to do it so I am continuously having issues with not properly sorted java imports when checking official Kotlin code style with ktlint.
Thanks for the issues. I will watch those for changes, seems the problem is known from long ago but nothing has been done. The current behavior seems like a pretty special case / preference which likely should not be a default or at least there should be an option to opt out of special handling of
java.*
. I was also wondering if there may be a way to disable that even if no UI exists for it, like by changing some configuration file.
a
Adam Bovill
09/17/2019, 9:52 AM
We've run into the same issue. I'd be OK with a non-UI mechanism too for now. We'll have to disable our ktlint checks, but would love to have them in sync.
Adam Bovill
09/17/2019, 9:55 AM
It seems like the second question is whether this formatting is the "desired" ordering?