We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using trailing closures, one can add () after the method call, but that should be discouraged.
()
let x = [1, 2] // shouldn't trigger _ = x.map { $0 + 1 } // should trigger _ = x.map() { $0 + 1 }
Note that there are cases when parenthesis are allowed (when there're more than 1 parameter):
// shouldn't trigger _ = x.reduce(0) { $0 + $1 }
The text was updated successfully, but these errors were encountered:
EmptyParenthesesWithTrailingClosureRule. A bit verbose, but descriptive.
EmptyParenthesesWithTrailingClosureRule
Sorry, something went wrong.
No branches or pull requests
When using trailing closures, one can add
()
after the method call, but that should be discouraged.Note that there are cases when parenthesis are allowed (when there're more than 1 parameter):
The text was updated successfully, but these errors were encountered: