-
Notifications
You must be signed in to change notification settings - Fork 53
"Convert upper/lower" case rule does not consider first statement in global class #92
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
Comments
Hi Suhas, with "Derive from first statement", ABAP cleaner indeed separately determines the casing from
The idea behind this is that in class definitions, SE80 always seems to use lower case keywords and upper case identifiers (regardless of the settings in menu "Utilities / Settings" -> ABAP Editor -> Pretty Printer), while for class implementations, SE80 does observe these settings, so SE80 could produce different formatting for the implementations (e.g. upper case keywords and lower case identifiers). Therefore, if "derive from first statement" would now only derive the settings from the CLASS … DEFINITION line and someone in the team still uses SE80, you would always end up to have everything in lower case keywords and upper case identifiers – and that might not be intended, even by the SE80 users. But you're right: SE80 does seem to put If that's still not satisfying, we could of course consider to add another option to the "Auto-determine upper/lower case" selection, so everyone could decide for themselves:
Kind regards, |
"derive from first statement of a class definition / method implementation" |
Hi Suhas, thanks again for this hint! The renamed option and adjusted behavior was now released with version 1.5.3, hope it helps! Kind regards, |
Uh oh!
There was an error while loading. Please reload this page.
Our team uses the option "Derive from first statement" of the Convert upper/lower case rule. We do this because we work mostly with legacy code and want to keep the formatting settings of the original author.
However, i found a quirky bug when running the rule on global class:
When i run the abapCleaner on the lines-of-code of FOO( ), it formats everything to CAPS.
My expectation was that the abapCleaner derives the formatting settings from the
class ZCL_TEST definition
line which are:The ABAP formatter (aka Pretty Printer) works as expected.
Cheers,
Suhas
The text was updated successfully, but these errors were encountered: