Skip to content

Files

Latest commit

 

History

History
17 lines (10 loc) · 486 Bytes

UnnecessaryParenthesesForMethodCallWithClosure.md

File metadata and controls

17 lines (10 loc) · 486 Bytes

Pattern: Unnecessary parentheses for method call

Issue: -

Description

If a method is called and the only parameter to that method is an inline closure then the parentheses of the method call can be omitted.

Example of violations:

[1,2,3].each() { println it }

Further Reading