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
Put this snippet of (sanitized and mostly-reduced) kotlin code into a file:
class SomeClass {
private fun someFunction(
) {
ListAssert(blah)
.blahBlahBlah(
"abcdefghijklmnopqurstuvw",
"alsdkf jlasjf lkasjdlsadfjl" // A long comment that gets wrapped and then reformatted again after running ktfmt twice, what!!!!
).isEqualTo(someOtherThing)
}
}
Download the ktfmt CLI tool per the instructions on the web page:
class SomeClass {
private fun someFunction() {
ListAssert(blah)
.blahBlahBlah(
"abcdefghijklmnopqurstuvw",
"alsdkf jlasjf lkasjdlsadfjl", // A long comment that gets wrapped and then reformatted again
// after running ktfmt twice, what!!!!
)
.isEqualTo(someOtherThing)
}
}
I would expect that running it a second time would do nothing, but instead it moves that wrapped comment line so the file looks like this:
class SomeClass {
private fun someFunction() {
ListAssert(blah)
.blahBlahBlah(
"abcdefghijklmnopqurstuvw",
"alsdkf jlasjf lkasjdlsadfjl", // A long comment that gets wrapped and then reformatted again
// after running ktfmt twice, what!!!!
)
.isEqualTo(someOtherThing)
}
}
After this running ktfmt again on the file does nothing and it seems to be "stable". However the fact that the first invocation produces a result that is not "fully formatted" seems unexpected and possibly a bug.
The text was updated successfully, but these errors were encountered:
Put this snippet of (sanitized and mostly-reduced) kotlin code into a file:
Download the ktfmt CLI tool per the instructions on the web page:
And run it on the file:
This formats the file so it looks like this:
Now run it a second time:
I would expect that running it a second time would do nothing, but instead it moves that wrapped comment line so the file looks like this:
After this running ktfmt again on the file does nothing and it seems to be "stable". However the fact that the first invocation produces a result that is not "fully formatted" seems unexpected and possibly a bug.
The text was updated successfully, but these errors were encountered: