Limit One Statement per Source Code Line (No Inline Colon Chains)
WarningMetrics & Complexity Limits#EC MAX_ONE_STMTRemote Enabled
Overview
Max One Statement Per Line.
ATC Finding Message:
Only one statement is allowed per line
Rationale
Placing multiple statements on a single line (either via semicolons, colons, or simple chaining like a = 1. b = 2.) compromises readability, impairs debugger single-stepping, and destroys Git line-by-line diff precision. When a runtime error occurs, the debugger stops on the line without clarifying which of the statements failed.
Clean ABAP Guideline: Write exactly one ABAP statement per source code line.
Non-Compliant
abap
" Anti-pattern: Multiple statements on one line
lv_status = 'OPEN'. lv_count = 0. CLEAR ls_header.Compliant
abap
" Clean ABAP: Dedicated line for each statement
lv_status = 'OPEN'.
lv_count = 0.
CLEAR ls_header.Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC MAX_ONE_STMT
" SAP CI_ prefix format:
... "#EC CI_MAX_ONE_STMTRelated Rules
- Limit Source Code Line Length (Avoid Horizontal Scrolling) —
#EC MAX_LINE_LEN - Limit Method Parameter Count and Require Multi-Line Signatures —
#EC MAX_PARAMS_COUNT - Limit Multiple Return Statements per Method Body —
#EC MAX_RETURNS
Technical Details
- Native ATC Class:
ZCL_SKYLINT_MAX_ONE_STMT - Implementation File: zcl_skylint_max_one_stmt.clas.abap