rspec/rules/S122/go/rule.adoc

43 lines
602 B
Plaintext
Raw Normal View History

2020-06-30 10:16:44 +02:00
include::../description.adoc[]
== Noncompliant Code Example
2022-02-04 17:28:24 +01:00
[source,go]
2020-06-30 10:16:44 +02:00
----
foo(); bar() // Noncompliant
----
== Compliant Solution
2022-02-04 17:28:24 +01:00
[source,go]
2020-06-30 10:16:44 +02:00
----
foo()
bar()
----
== Exceptions
Control flow statements with a single nested statement are ignored.
2021-02-02 15:02:10 +01:00
2020-06-30 10:16:44 +02:00
----
if condition { doSomething() } // Compliant
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../highlighting.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]