val y = 5
val x =
"""
$y
""".trimIndent()
ktlint --experimental --format is a no-op after at most one invocation.
ktlint always adds 6 additional space characters in front of $y, i.e. running ktlint n times will prepend 6*n spaces to $y.
I can confirm this bug.
I tried to disable the rule for the whole file by putting
/* ktlint-disable experimental:indent */
at the start of the file where I use raw strings since the IndentationRule docs state
"all or nothing" (currently, rule can only be disabled for an entire file)
But no luck. Ktlint still complains. How can I disable this rule for a file then? .)
It seems this bug made it into non-experimental mode as part of 0.37.0. We use raw strings often and it inhibits our ability to upgrade.
Thanks. We're targeting a 0.37.1 release ASAP to fix this and possibly 1 or 2 more bugs in 0.37.0.
Most helpful comment
Thanks. We're targeting a 0.37.1 release ASAP to fix this and possibly 1 or 2 more bugs in 0.37.0.