Skip to content

Bug: Keyword text is not taken as keyword when letters are entered as value #95

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

Closed
jan-jezek opened this issue Aug 25, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jan-jezek
Copy link

The rule "Convert upper and lower case" is not working correctly for keyword "text", if the value has any letter in it.
Imagine two situations:
WRITE text-042
WRITE text-a42
For the first one "text" will be converted to "TEXT" with default setting.
But in the second case "text" is not converted.

IMHO this is bug as Pretty Print converts it to upper case and abaplint reports it as error if not converted.

image

@jmgrassau jmgrassau self-assigned this Sep 2, 2023
@jmgrassau jmgrassau added the bug Something isn't working label Sep 2, 2023
@jmgrassau
Copy link
Member

Hi Jan,

thanks for reporting this!

For some background: Code bits that aren't separated with a space – such as lo_any_instance->any_method( or ms_struc-component-subcomponent – are usually stored in one single token in ABAP cleaner, because except for display colors, there is no reason to ever tear them apart. In this case, however, some special processing was needed, because TEXT-a42 contains both a keyword and an identifier (unlike the other examples above).

The issue will be fixed in the next release, and coloring is now also adjusted to ADT:

image

As in ADT, the result depends on the settings for keywords and identifiers, so you could also get:

image

image

Kind regards,
Jörg-Michael

@jmgrassau
Copy link
Member

Hi Jan,

thanks again for opening this issue! This should now be fixed with version 1.5.3, which was just released.

Kind regards,
Jörg-Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants