rspec/rules/S2960/swift/rule.adoc
2022-02-04 16:28:24 +00:00

34 lines
647 B
Plaintext

Surrounding your operators with whitespace in operator declarations will help maintainers derive meaning from what might otherwise look like a meaningless jumble of punctuation.
== Noncompliant Code Example
[source,swift]
----
func <*>(a: MyClass, b: MyClass) -> Boolean { // Noncompliant
----
== Compliant Solution
[source,swift]
----
func <*> (a: MyClass, b: MyClass) -> Boolean {
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]