rspec/rules/S122/go/rule.adoc

32 lines
560 B
Plaintext
Raw Normal View History

2023-06-16 15:38:45 +02:00
:noncompliant: go/noncompliant.adoc
:compliant: go/compliant.adoc
2020-06-30 10:16:44 +02:00
include::../description.adoc[]
=== Exceptions
2020-06-30 10:16:44 +02:00
2023-06-16 15:38:45 +02:00
The rule ignores control flow statements with a single nested statement.
2021-02-02 15:02:10 +01:00
[source,go]
2020-06-30 10:16:44 +02:00
----
2023-06-16 15:38:45 +02:00
if condition { doSomething() } // Compliant by exception
2020-06-30 10:16:44 +02:00
----
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[]