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
I found an example in which the generated TODO comment is not removed after a use for the variable is added.
Before the variable is used:
METHODexample.
TRY.
RAISEEXCEPTION TYPE cx_sy_itab_line_not_found.
CATCH cx_sy_itab_line_not_found INTODATA(exception).
* MESSAGE exception TYPE 'E'. ENDTRY.
ENDMETHOD.
The ABAP Cleaner correctly adds the comment:
METHODexample.
TRY.
RAISEEXCEPTION TYPE cx_sy_itab_line_not_found.
CATCH cx_sy_itab_line_not_found INTODATA(exception). " TODO: variable is assigned but only used in commented-out code (ABAP cleaner)* MESSAGE exception TYPE 'E'. ENDTRY.
ENDMETHOD.
However, actually using the variable afterwards doesn't remove the TODO comment again:
METHODexample.
TRY.
RAISEEXCEPTION TYPE cx_sy_itab_line_not_found.
CATCH cx_sy_itab_line_not_found INTODATA(exception). " TODO: variable is assigned but only used in commented-out code (ABAP cleaner)MESSAGEexception TYPE'E'.
ENDTRY.
ENDMETHOD.
The text was updated successfully, but these errors were encountered:
ConjuringCoffee
changed the title
"Delete unused variables": TODO Comment not removed for exception
"Delete unused variables": TODO comment not removed for exception
Jun 12, 2023
very good finding, thanks for reporting this! Hm, maybe the check only works for stand-alone TODO comment lines, not for the special case here? Definitely worth fixing this!
Hi Jörg-Michael,
I found an example in which the generated TODO comment is not removed after a use for the variable is added.
Before the variable is used:
The ABAP Cleaner correctly adds the comment:
However, actually using the variable afterwards doesn't remove the TODO comment again:
The text was updated successfully, but these errors were encountered: