Skip to content

[Number of Public Attributes Check] Should ignore local test doubles #471

Open
@obr-sap

Description

@obr-sap

💡 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionAnything that doesn't fit into the other categories

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions