ktfmt icon indicating copy to clipboard operation
ktfmt copied to clipboard

Incorrect detection of unused import in Gradle Kotlin DSLs using new assignment operator

Open cloudshiftchris opened this issue 2 years ago • 1 comments

Gradle 8.2 stabilized a new assignment operator (import org.gradle.kotlin.dsl.assign) that allows for setting Gradle Property values using = (delegates to .set()).

This was an issue for IntelliJ until recently-released 2023.2.

ktfmt erroneously identifies the import as unused and removes it, resulting in compilation errors

cloudshiftchris avatar Jul 29 '23 21:07 cloudshiftchris

This seems like a bit of an edge case, but I don't see why we could not add this exception to the list here.

Feel free to submit a PR

hick209 avatar Aug 24 '23 14:08 hick209