Pattern: Unneeded parentheses in closure argument
Issue: -
Parentheses are not needed when declaring closure arguments.
Examples of correct code:
let foo = { (bar: Int) in }
let foo = { bar in }
let foo = { bar -> Bool in return true }
Examples of incorrect code:
call(arg: { ↓(bar) in })
let foo = { ↓(bar) -> Bool in return true }
foo.map { ($0, $0) }.forEach { ↓(x, y) in }
foo.bar { [weak self] ↓(x, y) in }