nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.67k stars 623 forks source link

Fix issue where redundantClosure rule could break build if redundantReturn rule was disabled #1567

Closed calda closed 8 months ago

calda commented 8 months ago

This PR fixes an issue where the redundantClosure rule could break the build if the redundantReturn rule was disabled, by leaving in return keywords that would no longer be valid outside of a closure context.

Fixes #1565.

calda commented 8 months ago

Closing given https://github.com/nicklockwood/SwiftFormat/issues/1565#issuecomment-1793515768