New check - modification of importing parameter via field-symbol
Open
Nobody has claimed this yet.
new check
- Dominant language
- ABAP
- Stars
- 435
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
methods EXECUTE
importing
!IR_OPERAND1 type ref to DATA
!IR_OPERAND2 type ref to DATA
!IR_RESULT type ref to DATA.
METHOD execute.
CHECK ir_operand1 IS BOUND AND
ir_operand2 IS BOUND AND
ir_result IS BOUND.
ASSIGN ir_operand1->* TO FIELD-SYMBOL(<operand1>).
ASSIGN ir_operand2->* TO FIELD-SYMBOL(<operand2>).
ASSIGN ir_result->* TO FIELD-SYMBOL(<result>).
TRY.
<result> = <operand1> - <operand2>.
CATCH cx_root.
ENDTRY.
ENDMETHOD.
I found this method which treats an importing parameter as if it were changing/returning.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the repository's existing check entry points and comparable checks; the issue provides only the ABAP EXECUTE method example and no file or test path. Determine the intended diagnostic for modifying an importing parameter through field symbols, then add coverage for the shown case and verify the check reports it.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100