-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Import ordering rule removing used imports #766
Comments
I'm still having issues with import aliases. This is my
This file triggers
running |
@Zayankovsky sorry, apparently I'm having a hard time properly distinguish imports :D |
@Zayankovsky @josephlbarnett could you please check with the 0.38.0-SNAPSHOT version if your issues are gone? We'd like to release a patch version, but want to make sure there are no issues with imports anymore |
@romtsn the issues are gone with the 0.38.0-SNAPSHOT version, thanks. |
our issues were fixed with 0.37.1, checking 0.38.0-SNAPSHOT shows that version working as well |
With the fix for #527 released in 0.37.0, looked to turn the import ordering rule on for our projects with idea format, and found the following:
Expected Behavior
With import ordering rule turned on (to idea format) via
.editorconfig
, runningktlint -F
version 0.37.0 against https://github.com/trib3/leakycauldron/blob/master/json/src/test/kotlin/com/trib3/json/ObjectMapperTest.kt should not reformat the file.Observed Behavior // Steps to reproduce
With import ordering rule turned on (to idea format) via
.editorconfig
, runningktlint -F
version 0.37.0 against https://github.com/trib3/leakycauldron/blob/master/json/src/test/kotlin/com/trib3/json/ObjectMapperTest.kt results inassertk
imports other thanassertk.all
being removed, which then makes the file fail to compile due to the missing imports.With import ordering rule turned on via
.editorconfig
, runningktlint -F
version 0.36.0 (no idea format exists in this version) against https://github.com/trib3/leakycauldron/blob/master/json/src/test/kotlin/com/trib3/json/ObjectMapperTest.kt results in the java/kotlin imports being moved up from the end into lexicographic order (as expected)Your Environment
The text was updated successfully, but these errors were encountered: