import java.io.File.separator
val s = "${separator} is a file separator"
upon formatting it should be
import java.io.File.separator
val s = "$separator is a file separator"
Observed Behavior
Instead, the import is deleted
val s = "$separator is a file separator"
Your Environment
Version of ktlint used: 1.2.1
Relevant parts of the .editorconfig settings: ktlint_code_style = intellij_idea
Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): repros with CLI ktlint as well as intelliJ plugin.
Work Around
Manually re-add imports or fix redundant braces before formatting.
Expected Behavior
Given
upon formatting it should be
Observed Behavior
Instead, the import is deleted
Your Environment
.editorconfig
settings:ktlint_code_style = intellij_idea
Work Around
Manually re-add imports or fix redundant braces before formatting.