IF in IF

 home quick fix styleguide  single file   example  edit

if_in_if

Description

Detects nested ifs which can be refactored.

Extended Information

Directly nested IFs without ELSE can be refactored to a single condition using AND.

ELSE condtions with directly nested IF refactored to ELSEIF, quickfixes are suggested for this case.

https://docs.abapopenchecks.org/checks/01/
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low

Default Configuration

Hover to see descriptions, Ctrl+Space for suggestions

Examples