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
Syntax Error caused by rule "Simplify a chain with one element" inside Includes #372
Hello Jörg-Michael,
The following scenario is leading to a wrong cleaning:
Rule: "Simplify a chain with one element" with the default options
When we apply the cleaner to this code:
DATA:
"! Only used for declaring select-option
gv_serial_number TYPE gernr.
it will produce this code:
"! Only used for declaring select-option DATA gv_serial_number TYPE gernr.
Important: This seems to only happen because the object that we found is an include where the DATA:-line is literally the first line of the object. Any other command or even comment above the DATA will prevent this error.
ooops … Nice finding! Internally, ABAP cleaner always stores the number of line breaks above (and spaces left of) each token. At document start this can be 0, and this special case case was obviously not considered here. Will be fixed with the next release!
Activity
jmgrassau commentedon Nov 9, 2024
Hi PhiL,
ooops … Nice finding! Internally, ABAP cleaner always stores the number of line breaks above (and spaces left of) each token. At document start this can be 0, and this special case case was obviously not considered here. Will be fixed with the next release!
Kind regards,
Jörg-Michael
fix ChainOfOneRule for first command in code document (SAP#372)
fix ChainOfOneRule for first command in code document (#372)
jmgrassau commentedon Nov 11, 2024
Hi openPhiL,
thanks for this bug reporting – this shouldn't come up again with version 1.20.1!
Kind regards,
Jörg-Michael