rspec/rules/S3923/apex/rule.adoc

36 lines
497 B
Plaintext
Raw Normal View History

2020-06-30 12:48:39 +02:00
include::../description.adoc[]
== Noncompliant Code Example
----
if (b == 0) { // Noncompliant
doOneMoreThing();
} else {
doOneMoreThing();
}
switch on i { // Noncompliant
when 1 {
doSomething();
}
when 2 {
doSomething();
}
when 3 {
doSomething();
}
when else {
doSomething();
}
}
----
include::../exceptions.adoc[]
ifdef::rspecator-view[]
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::rspecator-view[]