Skip to content

Files

Latest commit

 

History

History
25 lines (16 loc) · 802 Bytes

SpaceAroundClosureArrow.md

File metadata and controls

25 lines (16 loc) · 802 Bytes

Pattern: Malformed space around ->

Issue: -

Description

Checks that there is at least one space (blank) or whitespace around each closure arrow (->) symbol.

Known limitations:

  • Does not catch violations if the closure arrow (->) is on a separate line from the start of the closure.

Example of violations:

def closure1 = {->}                             // violation
def closure2 = { ->}                            // violation
def closure3 = {-> }                            // violation
def closure4 = { count-> println 123 }          // violation
def closure5 = { count, name ->println 123 }    // violation

Further Reading