-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Delete unused variables" rule deletes variable which used in macros. #43
Comments
I temporarily chose the option to 'comment out with "' for local variables that are never used. |
Hi thebestabapdeveloper :-), 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…) Kind regards, |
Hi, 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! Kind regards, |
Cheers. |
"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: