The following triggers a operator_whitespace warning.
warning: Operator Function Whitespace Violation: Operators should be surrounded by a single whitespace when defining them. (operator_whitespace)
func ==(lhs: Foo, rhs: Foo) -> Bool {
return lhs.name == rhs.name
}
I don't know what the desired behavior is. I kind of like the extra space in this case.
The operator whitespace warning expects a single space on _both_ sides of the operator, e.g.
func == (lhs: Foo, rhs: Foo) -> Bool {
return lhs.name == rhs.name
}
I understand that. It was more "does this conflict with function naming that requires no space between the function name and the lparen".
Most helpful comment
The operator whitespace warning expects a single space on _both_ sides of the operator, e.g.