Method Call Parameter Naming Style (Omit or Require)
WarningClean ABAP & Modern SyntaxQuickFix Ready#EC PREF_PARAM_NAMELocal Only
Overview
Method Call Parameter Naming Style.
ATC Finding Messages:
Omit explicit parameter name in single parameter method callAdd explicit parameter name to positional method call
Rationale
Methods with a single importing parameter can be invoked positionally without naming the parameter, reducing verbosity for self-explanatory methods. Alternatively, teams requiring explicit naming can enable REQUIRE_PARAM_NAME to enforce explicit parameter naming for clarity and future signature extension.
Non-Compliant
abap
lo_pricing->apply_discount( iv_percent = 10 ).Compliant
abap
lo_pricing->apply_discount( 10 ).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.
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_PARAM_NAME | Boolean | true | Suggest omitting parameter name when invoking single-parameter methods |
REQUIRE_PARAM_NAME | Boolean | false | Require explicit parameter names when calling multi-parameter methods |
Suppression
To suppress findings for this rule, append the pseudo-comment to the statement:
abap
" Standard pseudo-comment:
... "#EC PREF_PARAM_NAME
" SAP CI_ prefix format:
... "#EC CI_PREF_PARAM_NAMERelated Rules
- Limit Method Parameter Count and Require Multi-Line Signatures —
#EC MAX_PARAMS_COUNT - Avoid Obsolete ! Escape Prefix in Parameter Names —
#EC NO_PARAM_ESCAPE - Avoid Obsolete CALL METHOD —
#EC NO_CALL_METHOD
Technical Details
- Native ATC Class:
ZCL_SKYLINT_PREF_PARAM_NAME - Implementation File: zcl_skylint_pref_param_name.clas.abap