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
Love swift-format, but one thing that really bugs me is for the life of me, I can't get it to not touch my ternary formatting. For instance, this is how my team and I like them to appear...
letmessage= someCondition
? "The condition was true":"The condition was false"
To us, it's clear because the condition is up by the assignment (as that's what's driving it), and the true and false parts are each on their own line making it dead-simple to grep, even when speed-reading through code.
But what swift-format keeps doing is moving the condition to its own line entirely! Why?! And that dangling equals sign just makes it that much more annoying.
letmessage=
someCondition
? "The condition was true":"The condition was false"
Now even if this is something that is deemed not worthy of inclusion in the source code proper, I'd still love to be able to make that change in our own copy of swift-format, but I'm not sure where to begin.
The text was updated successfully, but these errors were encountered:
Love swift-format, but one thing that really bugs me is for the life of me, I can't get it to not touch my ternary formatting. For instance, this is how my team and I like them to appear...
To us, it's clear because the condition is up by the assignment (as that's what's driving it), and the true and false parts are each on their own line making it dead-simple to grep, even when speed-reading through code.
But what swift-format keeps doing is moving the condition to its own line entirely! Why?! And that dangling equals sign just makes it that much more annoying.
Now even if this is something that is deemed not worthy of inclusion in the source code proper, I'd still love to be able to make that change in our own copy of swift-format, but I'm not sure where to begin.
The text was updated successfully, but these errors were encountered: