Vince
10/19/2021, 11:39 PMimport-ordering
rule between ktlint and ktlint-gradle (gradle wrapper). Specifically around the ordering of java/javax/kotlin and aliases:
ktlint 0.42.1
Imports must be ordered in lexicographic order without any empty lines in-between with "java", "javax", "kotlin" and aliases in the end
JLLeitschuh/ktlint-gradle wrapper 10.2.0 using ktlint 0.42.1
Imports must be ordered in lexicographic order without any empty lines in-between (import-ordering)
Any idea what could be causing this discrepancy? The gradle wrapper `ktlintCheck`/`ktlintFormat` tasks aren't respecting the latter part of the rule around java/javax/kotlin + alias imports going at the end. Seems to have been added into ktlint around 0.42 based on some closed issues in the repo.Sha Sha Chu
10/20/2021, 12:16 AMVince
10/20/2021, 12:30 AM.editorconfig
file, so I assume it would just use a default one provided from ktlint?romtsn
10/20/2021, 1:57 PMandroid = true
in the ktlint-gradle configuration? if so, then this is default behavior - android codestyle requires just alphabetical orderingVince
10/20/2021, 4:58 PMandroid = true
). Thanks Roman! and shasha as well 🙂