Closed ScottPierce closed 4 years ago
I just found something new in the documentation:
disabled_rules=no-wildcard-imports,experimental:annotation,my-custom-ruleset:my-custom-rule
Seems like this is already implemented.
Thanks!
Now after version 0.49.0 of ktlint it might be:
ktlint_standard_no-wildcard-imports = disabled
https://stackoverflow.com/questions/61124868/ktlint-doesnt-allow-wildcard-import-using-intellij-auto-import-feature
I realize this is an odd request given the Android Style Guidelines explicit disaproval of no wildcard imports, but I've recently encountered an issue with the kotlinx.coroutines library where the API wasn't working as intended because I didn't have star imports enabled for kotlinx.coroutines (i.e. the
Flow#consume
call requires wildcard imports to work, and doesn't suggest an auto import if you don't have it enabled). When I brought this up in slack, Roman Elizarov, the Kotlin library team lead, had this to say:It seems there isn't going to be a consensus from the Android style perspective, but given that certain official jetbrains APIs are designed with the expectation of star imports, it seems reasonable to allow opting into something to disable the ktlint requirement of no star imports in the
.editorconfig
.