code pal for ABAP > Documentation > Empty IF Branches Check
The Empty IF Branches check searches for empty IF
statements and empty IF
branches.
Fill the IF
branch with code, remove it from the code or refactor the condition.
You can suppress Code Inspector findings generated by this check using the pseudo comment "#EC EMPTY_IF_BRANCH
. The pseudo comment has to be placed after the opening statement of the empty IF
branch. In case of nested IF
statements, the deepest within the branch.
IF name = ''.
IF address = ''. "#EC EMPTY_IF_BRANCH
ENDIF.
ENDIF.
IF name = ''. "#EC EMPTY_IF_BRANCH
ENDIF.
IF name = ''.
" Source Code.
ELSEIF name = ''. "#EC EMPTY_IF_BRANCH
ELSE.
" Source Code.
ENDIF.
IF name = ''.
" Source Code.
ELSE. "#EC EMPTY_IF_BRANCH
ENDIF.