You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
"Delete unused variables": Incorrect result across multiple TEST-INJECTION blocks #87
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.
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!
Activity
jmgrassau commentedon Aug 15, 2023
Hi ConjuringCoffee,
thanks a lot – you're right, we have to exclude methods with
TEST-SEAMorTEST-INJECTIONblocks 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
fix UnusedVariablesRule for test injection (SAP#87)
fix UnusedVariablesRule for test injection (#87)
jmgrassau commentedon Aug 15, 2023
Hi ConjuringCoffee,
thanks again – this should now be fixed with version 1.5.2 which was just released!
Kind regards,
Jörg-Michael