You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think the description totally matches what it'd be validated. Maybe @jpsim can confirm, but I feel that rule would just validate that if it's a closure and it's the last parameter, trailing syntax should be used. Function references would always be valid for that rule.
@marcelofabri's last comment is spot on 👌. I would like a rule that can recommend using result.map(stripTrailingWhitespace) over result.map { stripTrailingWhitespace($0) } but in practice, that's challenging to build because you need to detect whether or not doing so would be ambiguous (e.g. cannot resolve between function overloads by the same name).
This is an exception to #54.
If the trailing closure is simple then prefer
instead of
reference:
exercism/swift#209 (comment)
The text was updated successfully, but these errors were encountered: