Hmmm. ktfmt erroneously detects an import as unus...
# ktfmt
c
Hmmm. ktfmt erroneously detects an import as unused and removes it. Gradle 8.x introduced new assignment operator for
Property
instances, allowing
=
(delegating to
.set()
). IntelliJ 2023.2 fixed its erroneous detection of
org.gradle.kotlin.dsl.assign
as unused. ktfmt removes
org.gradle.kotlin.dsl.assign
resulting in a compilation failure, though not even getting there on CI as it first checks if anything needs to be formatted and fails on this erroneous change. Doesn’t appear to be a way to workaround this. Ticket.
🐞 1
n
Thanks for reporting this, this is likely that this assign operator name is not part of the this list here https://github.com/facebook/ktfmt/blob/58777b2e386128f15042de5c2698511ef0771352/co[…]/main/java/com/facebook/ktfmt/format/RedundantImportDetector.kt Feel free to submit a PR if you want/need a more speedy change.