When I run detekt-formatting, Indentation formats differently from Intellij in this case
Indentation after if block has disappeared
Before formatting
if (holder.type == TYPE_FLAG)
(holder as HolderA).functionA()
else
(holder as HolderB).functionB()
After formatting
if (holder.type == TYPE_FLAG)
(holder as HolderA).functionA()
else
(holder as HolderB).functionB()
Doesn't match Intellij, so diff keeps happening
I confirmed that this works fine with MultiLineIfElse, Unfortunately, my team has decided not to use MultiLineIfElse.
This is part of my config.yml
formatting:
NoWildcardImports:
active: false
ImportOrdering:
active: false
NoConsecutiveBlankLines:
active: false
MultiLineIfElse:
active: false
Hey @zmunm! Thanks for reporting this.
detekt-formatting wraps ktlint's ruleset. Can you please try this out with plain ktlint?
If this issue occurs with standalone ktlint, may I ask you to please report this to their main repository, since there's nothing detekt can do about.
Thank you for your quick response. I will try it
Thanks for checking this in plain ktlint. I will close this for now, since this issue is already tracked in the main ktlint repo.
Most helpful comment
Thanks for checking this in plain ktlint. I will close this for now, since this issue is already tracked in the main ktlint repo.