?
it feels terrible to go to all the projects of the company adding the exclude to the
.editorconfig
when it's an issue with the rule itself that doesn't work as the IDE
👍 2
t
tapchicoma
03/02/2020, 8:15 PM
there is open issue in Kotlin tracker regarding this: https://youtrack.jetbrains.com/issue/KT-10974
While kotlin styleguide does not say anything about import ordering, google one defines all imports should be sorted in alphabetical order: https://developer.android.com/kotlin/style-guide#import_statements
I see you point - it is really PITA when IDE autoformats imports not in the way you will expect and you don't use any git hook to autoformat code before do commit.
Though in the past we had this strange import order changes (especially in java), when IDEA had one layout for imports, but at some version changed that to another one. Having imports sorted alphabetically solved this issue.
c
cristiangm
03/04/2020, 9:22 PM
ktLint is amazing if you don't need to configure the rules, right now this rule means we are all forced to configure it (to disable the rule)
cristiangm
03/04/2020, 9:23 PM
Once the IDE does the same we can enable the rule again
cristiangm
03/04/2020, 10:33 PM
Currently I think I'll force an old version of Kotlin until this rule is removed (or the IDE order is fixed, which I don't think it's happening soon).