28 lines
534 B
Plaintext
28 lines
534 B
Plaintext
![]() |
[source,abap,diff-id=1,diff-type=noncompliant]
|
||
|
----
|
||
|
IF a >= 0 AND a < 10.
|
||
|
doFirst.
|
||
|
doTheThing.
|
||
|
ELSEIF a >= 10 AND a < 20.
|
||
|
doTheOtherThing.
|
||
|
ELSEIF a >= 20 AND a < 50.
|
||
|
doFirst. // Noncompliant; duplicates first condition
|
||
|
doTheThing.
|
||
|
ENDIF.
|
||
|
----
|
||
|
|
||
|
[source,abap,diff-id=2,diff-type=noncompliant]
|
||
|
----
|
||
|
CASE i.
|
||
|
WHEN 1.
|
||
|
doFirst.
|
||
|
doSomething.
|
||
|
WHEN 2.
|
||
|
doSomethingDifferent.
|
||
|
WHEN 3. // Noncompliant; duplicates case 1's implementation
|
||
|
doFirst.
|
||
|
doSomething.
|
||
|
WHEN OTHERS.
|
||
|
doTheRest.
|
||
|
ENDCASE.
|
||
|
----
|