Closed alexito4 closed 3 months ago
SwiftFormat cannot detect auto closure arguments automatically. You can fix this by manually specifying any async capturing functions in the SwiftFormat configuration with:
--asynccapturing unwrapa
You are right, I forgot about that option. Apologies, closing this ;)
When using autoclosures that have async expressions you need to use await inside the autoclosure. (Like Nimble async functions)
Running swiftformat (0.53.4 and 0.53.5) with
hoistAwait
moves the inner await outcausing a compiler error.
Using
// swiftformat:disable hoistAwait
in the file indeeds avoid the issue.