We have a class with a init function that take a closure as parameter
class Promise {
public init(_ f: (something) -> Void))
}
when I call it
Promise() {
// doing something here
}
the rule empty_parentheses_with_trailing_closure will give a warning even if the call is totally ok.
Actually, the rule enforces exactly this. You should use:
Promise { _ in
print("foo")
}
(Or disable the rule if you don't agree with this style)
ok, thank you.
Most helpful comment
Actually, the rule enforces exactly this. You should use:
(Or disable the rule if you don't agree with this style)