rspec/rules/S122/csharp/rule.adoc

44 lines
746 B
Plaintext
Raw Normal View History

2020-06-30 10:16:44 +02:00
include::../description.adoc[]
== Noncompliant Code Example
----
if(someCondition) DoSomething();
----
== Compliant Solution
----
if(someCondition)
{
DoSomething();
}
----
== Exceptions
Anonymous functions containing a single statement are ignored. Block statements are not considered either.
2021-02-02 15:02:10 +01:00
2020-06-30 10:16:44 +02:00
----
Func<object, bool> item1 = o => { return true; }; // Compliant
Func<object, bool> item1 = o => { var r = false; return r; }; // Noncompliant
----
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[]