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
CLASS ... DEFINITION DEFERRED not working #142
Comments
Hi ruhnla, that's odd, actually ABAP cleaner does consider CLASS ... DEFINITION DEFERRED and does not expect an ENDCLASS here. Could you maybe try to create a minimal example for this (removing everything that doesn't trigger the error)? Do you use the plug-in or the stand-alone ABAP cleaner, and which version of it? Kind regards, |
Hi Jörg-Michael, I have tried both versions of ABAP cleaner, ADT and standalone, latest version (1.71). In the standalone version I can't even paste the code. Here you have a simple example of coding where it happens. `
CLASS: lcl_alv_toolbar DEFINITION DEFERRED. DATA : c_alv_toolbarmanager TYPE REF TO cl_alv_grid_toolbar_manager,
CLASS lcl_alv_toolbar DEFINITION.
ENDCLASS. "lcl_alv_toolbar DEFINITION
CLASS lcl_alv_toolbar IMPLEMENTATION. METHOD constructor.
ENDCLASS. "lcl_alv_toolbar IMPLEMENTATION Best, |
Hi Lars, I see – it's the colon! I didn't expect Kind regards, |
Hi Lars, okay, that wasn't difficult, this will be considered in the next release. Kind regards, |
|
Hi ConjuringCoffee, yes, along with comments and pragmas that's indeed the case! From this perspective, life is rather easy for a compiler, which can do a pre-processing step and
and only then start doing its actual job (well, admittedly, there might be some complexity in that part…). But not for ABAP cleaner! Because we care a lot about whitespace and alignment, have to stay aware that there may be any number of comments anywhere (including between any two tokens inside of a statement), must mind the pragmas (including in wrong places) and the chain colons … So, unfortunately, so far, there was always a constellation that wasn't yet considered. But let's hope the new "stress test" which I mentioned in #147 helps to identify more of those in advance! :-) And anyway, diligently writing regression tests, so at least we can be sure that whatever issue came up once for someone won't come up again for anyone! 🙂 Kind regards, |
Hi Lars, thanks again for reporting this – this issue should now be fixed in version 1.7.2, which was just released. Kind regards, |
The ABAP cleaner stops immediately when the command CLASS ... DEFINITION DEFERRED is found with the error message "Opening 'CLASS' not closed." (ABAP version 7.50)
Is this a bug or a feature or missing functionality?
The text was updated successfully, but these errors were encountered: