Array First Position
Open
Nobody has claimed this yet.
new check
- Dominant language
- ABAP
- Stars
- 435
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
ABAP array starts at position [ 1 ], as opposed to java which starts at [ 0 ].
ABAP compiles the code if you try to access the array at position [ 0 ].
However, it raises the CX_SY_ITAB_LINE_NOT_FOUND when executing the code.
For instance:
DATA array TYPE TABLE OF string.
APPEND 'this' TO array.
APPEND 'is' TO array.
APPEND 'a' TO array.
APPEND 'test' TO array.
cl_demo_output=>display( array ).
cl_demo_output=>display( array[ 0 ] ).
It would be good to have a check that identifies these access to position [ 0 ] during the development phase.
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
The issue provides an ABAP example but names no file, test, or entry point. Start by finding where existing code-quality checks are defined, then determine how the check should identify table access at position [0] and add coverage for the shown case.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100