Skip to content

Remove redundant parentheses ​

WarningAnti-Patterns & Bad PracticesQuickFix Ready#EC MANY_PARENSRemote Enabled

Overview ​

Remove redundant parentheses.

ATC Finding Message: Parentheses wrap a complete expression and can be removed

Rationale ​

Parentheses that wrap an entire condition or arithmetic expression do not change evaluation order but add visual noise. They often remain after refactoring and make expressions look more complex than they are. Remove redundant outer parentheses and keep only those needed for precedence.

Non-Compliant ​

abap
IF ( lv_status = 'A' ).
  process_a( ).
ENDIF.

Compliant ​

abap
IF lv_status = 'A'.
  process_a( ).
ENDIF.

Automated QuickFix ​

This rule provides an automated QuickFix directly in Eclipse ABAP Development Tools (ADT):

  1. Position the cursor on the flagged statement.
  2. Press Ctrl + 1 (Quick Assist).
  3. Select the automated refactoring to apply the clean syntax immediately.

Suppression ​

To suppress findings for this rule, append the pseudo-comment to the statement:

abap
" Standard pseudo-comment:
... "#EC MANY_PARENS

" SAP CI_ prefix format:
... "#EC CI_MANY_PARENS

Technical Details ​

Released under the MIT License.