Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: skip unsupported statements instead of cancelling whole cleanup #351

Open
sandraros opened this issue Sep 1, 2024 · 0 comments

Comments

@sandraros
Copy link

sandraros commented Sep 1, 2024

Applying ABAP Cleaner version 1.18.1 on the program at the end of the issue, due to unsupported syntax, prevents the whole cleanup:

line 8: Parse error in line 8: Chain colons inside parentheses or brackets are currently not supported by ABAP cleaner. Please rewrite this ABAP statement manually before running ABAP cleaner on this code.

1 entry was added to the error log 'C:...\AppData\Roaming\SAP\ABAP cleaner\user\error.log': the cleanup of a code file was cancelled

image

The real case is the 3 below lines of the class zcl_excel_writer_2007, just running a selective ABAP Cleanup on 1 line in another method of the class fails:

    lo_element_root->set_attribute_ns( : name  = 'xmlns:v'  value = lc_xml_node_ns_v ),
                                         name  = 'xmlns:o'  value = lc_xml_node_ns_o ),
                                         name  = 'xmlns:x'  value = lc_xml_node_ns_x ).

Of course, I agree to rewrite these ABAP statements, but I think they should not prevent the whole cleanup.

I know that @jmgrassau is against these ABAP statements, as I said, I agree ;-) (#134 (comment)).

Minimal reproducible example:

REPORT.
CLASS lcl_dummy DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS dummy IMPORTING dummy TYPE any.
ENDCLASS.
CLASS lcl_dummy IMPLEMENTATION.
  METHOD dummy.
    dummy( : 'call1' ), 'call 2' ).
  ENDMETHOD.
ENDCLASS.

NB: this syntax also prevents from going to the configuration, same error pops up, but I guess it should be another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant