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
thank you very much for reporting this. Actually, this is a limitation of ABAP cleaner: the tool only works on the code document provided to it, without doing further backend calls. This usually works fine for local variables, but macros are indeed an exception that can't be considered here, especially if the macro definition is 'out of sight'.
I shall therefore restrict the "Delete unused variables" rule to only work on methods that do NOT make use of macros (hopefully you won't find too much usage of macros in the code anyway…)
this issue should now be fixed in the freshly released version 1.3.0, meaning that the rule "Delete unused variables" (as well as "Use FINAL form immutable variables") will now simply skip methods in which macros are used hopefully adding another motivation to replace macros with other constructs :-) Thanks again for pointing this out!
"Delete unused variables" rule deletes variable which used in macros.
For example:
In include f01
DATA: lv_tuna TYPE developer.
In include m01
DEFINE xxx.
&1 = lv_tuna + 'xxx'.
END-OF-DEFINITION.
when formatting include f01, it deletes the definition in include f01, so it cannot be activated.
The text was updated successfully, but these errors were encountered: