Skip to content

Files

Latest commit

 

History

History
58 lines (25 loc) · 641 Bytes

no_space_in_method_call.md

File metadata and controls

58 lines (25 loc) · 641 Bytes

Pattern: Space between method name and ()

Issue: -

Description

Don't add a space between the method name and the parentheses.

Examples of correct code:

foo()


object.foo()


object.foo(1)


object.foo(value: 1)


object.foo { print($0 }


list.sorted { $0.0 < $1.0 }.map { $0.value }


self.init(rgb: (Int) (colorInt))

Examples of incorrect code:

foo ()


object.foo ()


object.foo (1)


object.foo (value: 1)


object.foo () {}


object.foo     ()

Further Reading