-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Allow CHECK keyword in begin of routines #1097
base: main
Are you sure you want to change the base?
Conversation
Also fix some old tests
Remove commented Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
…nto check_02_smarter
Co-authored-by: abaplint[bot] <24845621+abaplint[bot]@users.noreply.github.com>
************************************************************************ | ||
* Copyright (c) 2023 by Alexandr Zhuravlev | ||
* MIT License | ||
* https://github.com/alezhu/abapOpenChecks/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git keeps the history
you can choose to contribute under the license terms, I dont want to add multiple license parts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excuse me, but I do not understand. Do you mean that I should remove those 3 lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is certainly very subjective.
In my opinion, CHECK
should not be allowed after the marked commands.
The exception states that CHECK
may only check the precondition of the procedure. But these commands already "do" something and are not preconditions?
WHEN 'CLEAR' | ||
OR 'FREE' | ||
OR 'REFRESH'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WHEN 'CLEAR' | |
OR 'FREE' | |
OR 'REFRESH'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually clear the exporting parameters anyway and then check the importing parameters .
WHEN 'DESCRIBE' | ||
OR 'GET' | ||
OR 'INCLUDE' | ||
OR 'ASSIGN'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WHEN 'DESCRIBE' | |
OR 'GET' | |
OR 'INCLUDE' | |
OR 'ASSIGN'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'DESCRIBE' - for describe lines or get field type and then check it
'GET' - for GET PARAMETER for example and then check it
'ASSIGN' - for assign importing parameter of generic type and cast them to concret type or dereference ref and then check assigned structure field or check assigned table lines or some thing
'INCLUDE' - sometimes common checks in common include
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with pcf0: In my opinion this goes against the spirit of only allowing CHECK at the start of routines. If you need to do things before you CHECK, then it's not the start of the routine anymore.
Resolve #1095