SAP / abap-cleaner

ABAP cleaner applies 95+ cleanup rules to ABAP code at a single keystroke
Apache License 2.0
458 stars 48 forks source link

##Needed is not correct recognized #200

Closed fmabap closed 1 year ago

fmabap commented 1 year ago

Hi, in the following example is ##NEEDED not at the end of the variable declaration. ABAP-Cleaner set it to the end, but then it does not recognize that it is there and creates a TODO. Can you please fix it?

image
 METHOD test.

    ##NEEDED data lv_msg type bapi_msg.

    DATA: lv_field TYPE c,
          ##NEEDED lv_msg2 type bapi_msg.

    MESSAGE e001(000) INTO lv_msg.
    MESSAGE e001(000) INTO lv_msg2.

    lv_field = 3.
    WRITE lv_field.
  ENDMETHOD.

Best regards Frank

jmgrassau commented 1 year ago

Hi Frank,

you're right, thanks for reporting this! Indeed, this rule so far only considered pragmas at the end (before the comma or period), not at the beginning of the line, although those are correct, too. This will be fixed with the next release!

Kind regards, Jörg-Michael

fmabap commented 1 year ago

Hi Jörg-Michael, great thank you!

Best regards Frank

jmgrassau commented 1 year ago

Hi Frank,

thanks again for opening this issue – this is now fixed with version 1.11.2, which was just released!

Kind regards, Jörg-Michael

jmgrassau commented 9 months ago

Hi,

sorry, I entered the wrong issue number in the above commit enable ABAP cleaner menus for WebDynpro implementations – this belongs to issue #220!

Kind regards, Jörg-Michael

fmabap commented 9 months ago

Hi Jörg-Michael,

no problem. Thank you for fixing it. It works in my Testprogramm and also in the productive code.

Kind regards Frank