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):
- Position the cursor on the flagged statement.
- Press Ctrl + 1 (Quick Assist).
- 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_PARENSTechnical Details
- Native ATC Class:
ZCL_SKYLINT_NO_MANY_PARENS - Implementation File: zcl_skylint_no_many_parens.clas.abap