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

Converting CHECK outside loop to IF NOT ... RETURN considering BREAK-POINT #135

Closed
blackfish5 opened this issue Oct 9, 2023 · 3 comments
Assignees

Comments

@blackfish5
Copy link

Could BREAK-POINT statement be considered the same way as local declarations at the beginning of the method so that CHECK in the following code is NOT converted to IF ... RETURN ... ENDIF?

METHOD process.
  DATA a TYPE c LENGTH 1.
  BREAK-POINT ID fins_rev_rec_acdocp.
  CHECK a IS INITIAL.
ENDMETHOD.
@jmgrassau jmgrassau self-assigned this Oct 10, 2023
@jmgrassau
Copy link
Member

Hi blackfish5,

that's a good point, thanks for bringing this up! And I think this is valid for all Checkpoints (ASSERT, BREAK-POINT, LOG-POINT). However, rather than considering them like local declarations, I think it would be better to add an option like "[X] Keep CHECK statement independent of previous ASSERT, BREAK-POINT, or LOG-POINT".

Kind regards,
Jörg-Michael

jmgrassau added a commit to jmgrassau/abap-cleaner that referenced this issue Oct 10, 2023
@jmgrassau
Copy link
Member

Hi blackfish5,

the new option is now available with version 1.7.0, which was just released! My initial wording was a bit complicated, hope this works better:

image

Kind regards,
Jörg-Michael

@blackfish5
Copy link
Author

I have updated to 1.7.1 and it works as expected. Thanks a lot for swift implementation.

BR
Michal

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

No branches or pull requests

2 participants