Class Method called on instance
Nobody has claimed this yet.
- Dominant language
- ABAP
- Stars
- 435
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
Such a check is known from other programming languages (Java, C# etc.), and it would be great to have it in ABAP, too: Static methods should only be called on the class (=>), NOT on an instance (->), because if someone calls a static method on an instance, they probably don't know what is really happening. (I just discovered such a case in our code which was copied a lot to other places; a check would have helped to discover this: CL_FARR_TD_UTILITY_FACTORY=>CREATE_DOUBLE( )->INJECT_ITSELF( … ) is called, but INJECT_ITSELF is a class-method.) Grassau, Joerg-Michael
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
No implementation files or tests are identified in the issue. Start by locating the existing ABAP check entry point for method-call rules and reviewing how violations are tested; done means flagging static methods called with instance syntax while allowing class syntax.
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
- Mostly clear
- Newbie friendliness
- 35/100