Skip to content

Files

Latest commit

 

History

History
39 lines (26 loc) · 687 Bytes

Layout-SpaceInLambdaLiteral.md

File metadata and controls

39 lines (26 loc) · 687 Bytes

Pattern: Malformed space in lambda literal

Issue: -

Description

This rule checks for spaces between -> and opening parameter brace in lambda literals.

Examples

EnforcedStyle: require_no_space (default)

  # bad
  a = -> (x, y) { x + y }

  # good
  a = ->(x, y) { x + y }
EnforcedStyle: require_space

  # bad
  a = ->(x, y) { x + y }

  # good
  a = -> (x, y) { x + y }

Default configuration

Attribute Value
EnforcedStyle require_no_space
SupportedStyles require_no_space, require_space

Further Reading