Skip to content

Files

Latest commit

 

History

History
57 lines (32 loc) · 692 Bytes

File metadata and controls

57 lines (32 loc) · 692 Bytes

Pattern: Malformed spacing around ,

Issue: -

Description

There should be no space before and one after any comma.

Examples of correct code:

func abc(a: String, b: String) { }


abc(a: "string", b: "string"


enum a { case a, b, c }


func abc(
  a: String,  // comment
  bcd: String // comment
) {
}


func abc(
  a: String,
  bcd: String
) {
}


#imageLiteral(resourceName: "foo,bar,baz")

Examples of incorrect code:

func abc(a: String ,b: String) { }


func abc(a: String,b: String,c: String,d: String) { }


abc(a: "string",b: "string"


enum a { case a↓ ,b }


let result = plus(
    first: 3 , // #683
    second: 4
)