-
Notifications
You must be signed in to change notification settings - Fork 53
Unchain into multiple statements for TYPES #94
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Hi Josh, yes, that absolutely makes sense, and guess which comment I found inside the ChainRule code: // TODO: chains that just *contain* a BEGIN OF ... END OF section may nevertheless be partly unchained ...
if (command.getFirstToken().matchesOnSiblings(true, TokenSearch.ASTERISK, "BEGIN OF"))
return false; So, currently, the rule skips any Kind regards, |
Hi, TYPES: BEGIN OF ty_type1,
field1 TYPE data,
END OF ty_type1,
tty_type1 TYPE STANDARD TABLE OF ty_type1.
TYPES: BEGIN OF ty_type2,
field3 TYPE data,
END OF ty_type2,
tty_type2 TYPE STANDARD TABLE OF ty_type2. but I agree it complicates a bit the rule. |
Hi Josh, thanks for bringing this up! With the next release, "Unchain into multiple statements" will now also work on TYPES chains that contain BEGIN OF … END OF definitions, if they are not interrupted by an INCLUDE (sorry, that case would really complicate things too much, but I think most cases are simple cases): @AlexandreHT: Nice point! For this, I added the following option, which is activated by default: With that, you get: Kind regards, |
Hi Josh, thanks for pointing this out – the enhancement (as described above) is now available in version 1.11.0 which was just released! Kind regards, |
I'd like to see this rule extended to work also for TYPES. Ideally we should unchain these just like constants, variables, methods, etc.
Before:
After:
The text was updated successfully, but these errors were encountered: