37 lines
524 B
Plaintext
37 lines
524 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
function myMethod() { // Noncompliant
|
|
if(something) { // Noncompliant
|
|
executeTask();
|
|
} else { //Noncompliant
|
|
doSomethingElse();
|
|
}
|
|
}
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
function myMethod()
|
|
{
|
|
if(something)
|
|
{
|
|
executeTask();
|
|
} else
|
|
{
|
|
doSomethingElse();
|
|
}
|
|
}
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|