https://kotlinlang.org logo
#detekt
Title
# detekt
r

rocketraman

03/03/2022, 5:57 PM
Are the indentation rules for multi-line round brackets weird, or am I doing something wrong in my configuration? Code formats like this:
Copy code
return (
 foo
  ) as Something
which looks ugly compared to:
Copy code
return (
 foo
) as Something
b

Brais Gabin

03/03/2022, 6:03 PM
That seems like an issue to me. But probably that's an issue on ktlint. Could you check if you can reproduce it with ktlint? If so I recommend to open an issue there.
b

Big Chungus

03/03/2022, 6:35 PM
You can run ktlint on a file directly without gradle. Alternatively there might even be a ktlint docker image somewhere out there
👍 1
r

rocketraman

03/05/2022, 12:28 AM
To close the loop: upstream reports that this is the default behavior of the IJ formatter, and so the behavior of ktlint is intentional to match.
6 Views