-
Notifications
You must be signed in to change notification settings - Fork 53
"Align declarations": Line break if the line gets too long #77
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 ConjuringCoffee, I haven't encountered such an example yet, but of course it makes sense to break the line here. So, I think an option for maximum line length should be added. However, where exactly would you expect Kind regards, |
I think the following two approaches would look good: DATA this_is_an_attribute TYPE lif_example_interface=>this_is_a_type_name
VALUE lif_example_interface=>values_for_the_type-first_value. DATA this_is_an_attribute TYPE lif_example_interface=>this_is_a_type_name
VALUE lif_example_interface=>values_for_the_type-first_value. |
Hi ConjuringCoffee, thanks for this issue! I now added a new option to the "Align declarations" rule: This changes DATA this_is_an_attribute TYPE lif_example_interface=>this_is_a_type_name VALUE lif_example_interface=>values_for_the_type-first_value. into DATA this_is_an_attribute TYPE lif_example_interface=>this_is_a_type_name
VALUE lif_example_interface=>values_for_the_type-first_value. or – if you'd only allow a maximum line length of 89 or less – even into DATA this_is_an_attribute TYPE lif_example_interface=>this_is_a_type_name
VALUE lif_example_interface=>values_for_the_type-first_value. This also works in the other direction, moving VALUE clauses behind the type if maximum line length allows for it. Kind regards, |
Hi ConjuringCoffee, the new option is now available with version 1.5.1 which was just released! Kind regards, |
Hi Jörg-Michael, the rule "Align declarations" doesn't seem to have any logic to add or keep line breaks if the line gets too long.
Example:
In this case I'd like to be able to put
VALUE lif_example_interface=>values_for_the_type-first_value
on a new line. The ABAP Cleaner rule doesn't allow this.Here are the options I am using:
The text was updated successfully, but these errors were encountered: