fidley / ABAPQuickFix

ABAP Quick Fix
https://abapblog.com
MIT License
42 stars 9 forks source link

comma at begin of new line in combined declaration breaks the split fix #74

Open AndreaBorgia-Abo opened 1 week ago

AndreaBorgia-Abo commented 1 week ago

Trying to fix this:

  DATA:
    lr_tabdescr TYPE REF TO cl_abap_structdescr
  , lr_data     TYPE REF TO data
  , lt_dfies    TYPE ddfields
  , ls_dfies    TYPE dfies
  , ls_fieldcat TYPE lvc_s_fcat
  .

leads to:

  DATA lr_tabdescr TYPE REF TO cl_abap_structdescr
DATA .
  lr_data     type ref to data
data .
  lt_dfies    type ddfields
data .
  ls_dfies    type dfies
data .
  ls_fieldcat type lvc_s_fcat.
AndreaBorgia-Abo commented 1 week ago

FWIW abap cleaner deals with this properly

fidley commented 1 week ago

It makes more stress then xD

fidley commented 1 week ago

Even better example... In the past I've replaced the text split here from comma based to end of line base, in order to not have troubles with comments. But of course it was not perfect solution. I need to deep dive on in some evening.

DATA: lr_tabdescr TYPE REF TO cl_abap_structdescr "comment , with comma , lr_data TYPE REF TO data , lt_dfies TYPE ddfields "comment , with comma , ls_dfies TYPE dfies , ls_fieldcat TYPE lvc_s_fcat .