Closed ncooke3 closed 2 years ago
@ncooke3 thanks for reporting this. Disabling the redundantClosure
rule should fix it for now.
cc: @calda
Interesting! This rule probably need to filter out closures that include throw
. Should be a quick fix, will take a look.
@calda don't worry, I have a fix already.
Great, thanks!
@ncooke3 fixed in 0.49.5
Using latest SwiftFormat 0.49.4 version.
SwiftFormat accidentally breaks builds when trying to style a statement that combines
try
and??
.Consider the below snippet:
The returning one-liner is a bit funky, but is supposed to read like:
Formatting the above swift snippet results in the following diff.
The new diff breaks fails to compile with the following error:
I have a repo with instructions here: https://github.com/ncooke3/repros/tree/main/swiftformat-1142