I tried out 0.50.0 and got a violation of the `sta...
# ktlint
e
I tried out 0.50.0 and got a violation of the
standard:wrapping
rule saying
Missing newline after "{"
for this code:
Copy code
supportingText = supportingText?.let {
  { Text(supportingText) }
},
where the type of
supportingText
is
@Composable (() -> Unit)?
I think it's nice to keep that lambda on one line; the way ktlint wants it doesn't seem as nice to me:
Copy code
supportingText = supportingText?.let {
  {
    Text(supportingText)
  }
}
is this something that can be configurable, or is this ktlint's opinion and it will stay this way?
e
not an answer, but honestly I feel that
{ { } }
is pretty ugly and would more likely write
Copy code
supportingText = supportingText?.let {
    @Composable
    fun() = Text(it)
}
e
Oh interesting, didn't realize that was possible
p
I was out for a couple of day. I do consider the formatting of the sample code incorrect. I have created https://github.com/pinterest/ktlint/issues/2106 for it and working on a fix.