Closed gabrielittner closed 5 years ago
ktlint has ktlint-ruleset-standard/src/main/kotlin/com/github/shyiko/ktlint/ruleset/standard/ImportOrderingRule.kt (test) but it's disabled as it's incompatible with the way AS orders imports (not with the actual Android Koltin Style Guide, though). At least that was the case when I wrote the rule.
Is there a way to manually enable the rule?
Other than copy&pasting ImportOrderingRule to your own ruleset, not at the moment (unfortunately).
@shyiko Can you describe the incompatibility you mentioned?
This may be offtopic but I do not find a way to specify an import order :( - I can live without alphabetical order until there is some proposal how to fix it.
@shyiko would it make sense to include disabled ImportOrderingRule
into --experimental
flag rules? So those who need it can use it.
@Tapchicoma That seems totally reasonable.
Currently imports aren't sorted at all and single empty lines within the imports aren't removed.
See https://android.github.io/kotlin-guides/style.html#import-statements