Skip to content

"Delete unused variables": Incorrect result across multiple TEST-INJECTION blocks #87

Closed

Description

@ConjuringCoffee

Hi Jörg-Michael, the check "Delete unused variables" doesn't work when a variable is declared in one TEST-INJECTION block and then only used in another TEST-INJECTION block. The variable is marked as unused, even though it is used in the other block.

Activity

  1. self-assigned this
    on Aug 15, 2023
  2. jmgrassau commented on Aug 15, 2023

    @jmgrassau
    Member

    Hi ConjuringCoffee,

    thanks a lot – you're right, we have to exclude methods with TEST-SEAM or TEST-INJECTION blocks from processing for "Delete unused variables" (as well as "Use FINAL for immutable variables"), because the declaration or usage of variables may be completely "out of sight" for ABAP cleaner. This will be fixed in the next release!

    Kind regards,
    Jörg-Michael

  3. jmgrassau commented on Aug 15, 2023

    @jmgrassau
    Member

    Hi ConjuringCoffee,

    thanks again – this should now be fixed with version 1.5.2 which was just released!

    Kind regards,
    Jörg-Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions