[Number of Public Attributes Check] Should ignore local test doubles
Nobody has claimed this yet.
- Dominant language
- ABAP
- Stars
- 435
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
💡 Code pal for ABAP follows the Clean ABAP. If the issue relates to coding style, please submit it here.
Check Name
Number of Public Attributes Check
Actual Behavior
The current check also covers and reports findings for local test doubles, like the following:
CLASS ltd_my_double DEFINITION FOR TESTING.
PUBLIC SECTION.
INTERFACES if_my_interface.
DATA mv_my_injected_attribute TYPE string.
ENDCLASS.
As an explanation: According to this test design pattern, the double behavior is controlled by these attributes. In addition, getter/setters are not needed due to the locality and the scope of the test fixture.
Still, the application of this pattern is reported by the check.
Expected Behavior
The check should ignore local classes for testing.
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
Locate the implementation of the Number of Public Attributes Check and the tests covering local test doubles. Start by tracing how local classes declared FOR TESTING are represented, then verify that their public attributes are excluded while ordinary classes remain checked. Done means the regression behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Domain
- testing, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100