Limit Consecutive Blank Lines
WarningClean ABAP & Modern Syntax#EC MAX_BLANK_LINESRemote Enabled
Overview
No Excessive Consecutive Empty Lines.
ATC Finding Message:
Too many consecutive empty lines - collapse them
Rationale
Multiple consecutive empty lines scatter related code and suggest removed or unfinished logic. Keep source files compact with a single blank line to separate logical sections. The check measures the empty lines between consecutive statements in a procedure. Note: comment-only lines are not visible to the parser and are counted as empty space; configure MAX_BLANKS to your team standard.
Non-Compliant
abap
lv_total = 1.
lv_total = lv_total + 2.Compliant
abap
lv_total = 1.
lv_total = lv_total + 2.Configuration & Thresholds
This check can be fine-tuned directly in the ATC Check Variant Editor (CHKV) in Eclipse ADT:
| Parameter Name | Data Type | Default Value | Description & Guidance |
|---|---|---|---|
MAX_BLANKS | Integer | 1 | Maximum number of consecutive blank lines allowed between statements (default: 1) |
Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC MAX_BLANK_LINES
" SAP CI_ prefix format:
... "#EC CI_MAX_BLANK_LINESRelated Rules
- Limit Source Code Line Length (Avoid Horizontal Scrolling) —
#EC MAX_LINE_LEN - Limit Method and Constructor Statement Length —
#EC MAX_METHOD_LEN - Limit One Statement per Source Code Line (No Inline Colon Chains) —
#EC MAX_ONE_STMT
Technical Details
- Native ATC Class:
ZCL_SKYLINT_MAX_BLANK_LINES - Implementation File: zcl_skylint_max_blank_lines.clas.abap