Change IF to CASE

 home styleguide  single file   example  edit

change_if_to_case

Description

Finds IF constructs that can be changed to CASE

Extended Information

https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-case-to-else-if-for-multiple-alternative-conditions

If the first comparison is a boolean compare, no issue is reported.

Default Configuration

Hover to see descriptions, Ctrl+Space for suggestions

Examples