You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
context: detekt/detekt#2964
Even if written without curly braces, indentation should be preserved
Observed Behavior
If block start with a parenthesis after the if, the indentation disappears.
Steps to Reproduce
Before formatting
if (true)
(1).toString()
else2.toString()
After formatting
if (true)
(1).toString() // indentation disappearedelse2.toString()
Your Environment
Version of ktlint used: 0.37.2
Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): standard gradle dsl task from ktlint README
Version of Gradle used (if applicable): 5.6.4
The text was updated successfully, but these errors were encountered:
zmunm
changed the title
Beginning with parentheses after if, the indentation disappears
If you start with a parenthesis after the if, the indentation disappears.
Aug 14, 2020
zmunm
changed the title
If you start with a parenthesis after the if, the indentation disappears.
If block start with a parenthesis after the if, the indentation disappears.
Aug 14, 2020
Expected Behavior
context: detekt/detekt#2964
Even if written without curly braces, indentation should be preserved
Observed Behavior
If block start with a parenthesis after the
if
, the indentation disappears.Steps to Reproduce
Before formatting
After formatting
Your Environment
The text was updated successfully, but these errors were encountered: