Avoid Empty Procedures
WarningClean ABAP & Modern Syntax#EC NO_EMPTY_PROCRemote Enabled
Overview
Avoid empty procedures (methods, forms, functions).
ATC Finding Message:
Procedure is empty; implement logic or remove procedure
Rationale
Methods, form routines, and function modules should not be empty. Implement required logic or remove superfluous empty procedures.
Non-Compliant
abap
METHOD do_work.
ENDMETHOD.Compliant
abap
METHOD do_work.
DATA lv_val TYPE i.
lv_val = 1.
ENDMETHOD.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 |
|---|---|---|---|
CHECK_METHODS | Boolean | true | Check methods (defaults to true) |
CHECK_FORMS | Boolean | true | Check form routines (defaults to true) |
CHECK_FUNCS | Boolean | true | Check function modules (defaults to true) |
Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC NO_EMPTY_PROC
" SAP CI_ prefix format:
... "#EC CI_NO_EMPTY_PROCRelated Rules
- Avoid Empty Control Blocks —
#EC NO_EMPTY_BLOCK - Avoid Dead Code with Constant Conditions —
#EC NO_DEAD_CODE
Technical Details
- Native ATC Class:
ZCL_SKYLINT_NO_EMPTY_PROC - Implementation File: zcl_skylint_no_empty_proc.clas.abap