No Space in Method Call
Don’t add a space between the method name and the parentheses
- Identifier:
no_space_in_method_call
- Enabled by default: Yes
- Supports autocorrection: Yes
- Kind: style
- Analyzer rule: No
- Minimum Swift compiler version: 5.0.0
- Default configuration:
Key Value severity warning
Non Triggering Examples
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))
Button {
print("Button tapped")
} label: {
Text("Button")
}
Triggering Examples
foo↓ ()
object.foo↓ ()
object.foo↓ (1)
object.foo↓ (value: 1)
object.foo↓ () {}
object.foo↓ ()
object.foo↓ (value: 1) { x in print(x) }