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
{{ message }}
Repository navigation
"Align parameters and components" moves comment incorrectly #380
Hi Jörg-Michael, I have found a case where the rule "Align parameters and components" moves a comment incorrectly.
Example (expected):
TYPES: BEGIN OF gy_structure,
id TYPE i,
match TYPE abap_bool,
END OF gy_structure.
TYPES gy_table TYPE TABLE OF gy_structure WITHEMPTY KEY.
DATA gt_table TYPE gy_table.
gt_table =VALUE #( ( " Comment for the first line id=1match=abap_true )
( " Comment for the second lineid=2match=abap_false ) ).
Actual result:
gt_table =VALUE #( " Comment for the first line
( id=1match=abap_true )
( " Comment for the second lineid=2match=abap_false ) ).
The comment for the first line is moved outside of the brackets. This only happens for the first line of a table.
thanks for this example – actually, there was a dedicated branch to do exactly that, but I don't remember what kind of a case I had in mind where this would be beneficial (and none of the tests showed such a case, either). So, I removed this branch, and the comment will now stay inside the inner parentheses.
Activity
jmgrassau commentedon Dec 5, 2024
Hi ConjuringCoffee,
thanks for this example – actually, there was a dedicated branch to do exactly that, but I don't remember what kind of a case I had in mind where this would be beneficial (and none of the tests showed such a case, either). So, I removed this branch, and the comment will now stay inside the inner parentheses.
Kind regards,
Jörg-Michael
fix AlignParametersRule for comment inside inner parenthesis (SAP#380)
fix AlignParametersRule for comment inside inner parenthesis (#380)
jmgrassau commentedon Dec 16, 2024
Hi ConjuringCoffee,
thanks for this bug report! This should now be fixed with version 1.21.0, which was just released.
Kind regards,
Jörg-Michael
ConjuringCoffee commentedon Dec 27, 2024
Thank you :)