
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
24 lines
280 B
Plaintext
24 lines
280 B
Plaintext
[source,apex]
|
|
----
|
|
if (b == 0) { // Noncompliant
|
|
doOneMoreThing();
|
|
} else {
|
|
doOneMoreThing();
|
|
}
|
|
|
|
switch on i { // Noncompliant
|
|
when 1 {
|
|
doSomething();
|
|
}
|
|
when 2 {
|
|
doSomething();
|
|
}
|
|
when 3 {
|
|
doSomething();
|
|
}
|
|
when else {
|
|
doSomething();
|
|
}
|
|
}
|
|
----
|