Closed victorBaro closed 1 month ago
@victorBaro I suspect this is the same issue as https://github.com/nicklockwood/SwiftFormat/issues/1688, in which case it's already fixed, but I'll verify that before the next release
@victorBaro fixed in 0.53.9
When using new swift conditional variable unwrapping definition (i.e.
let myOptional
instead oflet myOptional = myOptional
), swiftFormat treats it as an unused argument.Take the following code:
When using
--stripunusedargs closure-only
, it produces the following result, which results on a compiler error:Note that when using
guard let update = update
, swiftformat respects the variable and it does not replace it with _.Tested with swiftformat v 0.53.8