Closed acosmicflamingo closed 1 year ago
@acosmicflamingo this seems to be a new bug. The rule name hasn't changed.
@acosmicflamingo something like this should still work:
// swiftformat:disable redundantReturn
public func UIConfirmationDialogController<Action: Equatable>(
state: UIAlertState<Action>,
send: @escaping (Action?) -> Void
) -> UIAlertController {
return UIAlertController(state: state, send: send, preferredStyle: .actionSheet)
}
// swiftformat:enable redundantReturn
Fascinating. Your code snippet does work, but this does not:
public func UIConfirmationDialogController<Action: Equatable>(
state: UIAlertState<Action>,
send: @escaping (Action?) -> Void
) -> UIAlertController {
// swiftformat:disable redundantReturn
return UIAlertController(state: state, send: send, preferredStyle: .actionSheet)
// swiftformat:enable redundantReturn
}
Is there anything you want me to run on my end that can help with debugging?
@acosmicflamingo I just fixed it :-)
@nicklockwood yay! Thanks a bunch :D
@acosmicflamingo fix landed in 0.52.2
With the new SwiftFormat 0.52.1 release (was working in 0.52.0), I am noticing that applying
swiftformat
results in removingreturn
from a line where the following precedes it:// swiftformat:disable:next redundantReturn
. Has this rule been renamed?Here's an example: