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