rspec/rules/S2960/swift/rule.adoc

41 lines
755 B
Plaintext
Raw Normal View History

== Why is this an issue?
2021-04-28 16:49:39 +02:00
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
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,swift]
2021-04-28 16:49:39 +02:00
----
func <*>(a: MyClass, b: MyClass) -> Boolean { // Noncompliant
----
=== Compliant solution
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,swift]
2021-04-28 16:49:39 +02:00
----
func <*> (a: MyClass, b: MyClass) -> Boolean {
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Add whitespace around "x".
'''
== Comments And Links
(visible only on this page)
=== on 21 May 2015, 11:53:00 Ann Campbell wrote:
\[~elena.vilchik] further tweak to title. Okay?
endif::env-github,rspecator-view[]