operator_whitespace - ApplebaumIan/BitbucketAPI GitHub Wiki

Operator Function Whitespace

Operators should be surrounded by a single whitespace when defining them.

  • Identifier: operator_whitespace
  • Enabled by default: Enabled
  • Supports autocorrection: No
  • Kind: style
  • Analyzer rule: No
  • Minimum Swift compiler version: 3.0.0
  • Default configuration: warning

Non Triggering Examples

func <| (lhs: Int, rhs: Int) -> Int {}
func <|< <A>(lhs: A, rhs: A) -> A {}
func abc(lhs: Int, rhs: Int) -> Int {}

Triggering Examples

func <|(lhs: Int, rhs: Int) -> Int {}
func <|<<A>(lhs: A, rhs: A) -> A {}
func <|  (lhs: Int, rhs: Int) -> Int {}
func <|<  <A>(lhs: A, rhs: A) -> A {}
func  <| (lhs: Int, rhs: Int) -> Int {}
func  <|< <A>(lhs: A, rhs: A) -> A {}
⚠️ **GitHub.com Fallback** ⚠️