-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Add User-Exit in zcl_abapgit_oo_serializer methods #5050
Comments
it should be a "code post-processing" exit and also available for object types like |
user exit referenced = https://docs.abapgit.org/ref-exits.html#custom_serialize_abap_clif Suggest a new exit |
Ideally, user exit execution could be restricted to push. (My use case : Code pushed to public git repo should be formatted but code pulled from other repo (eg. abap2xlsx) should be copied as is, in order to avoid false flag diff after import). |
If we only do it on push, it will be hidden to the user as to what happens. I agree with Lars that it should happen at the end of serialize process. Then the results will be visible in repo and diff views. So I think the exit should go at the end of this method: METHOD files_local.
...
* Call postprocessing
li_exit = zcl_abapgit_exit=>get_instance( ).
li_exit->serialize_postprocess(
EXPORTING
iv_package = iv_package
ii_log = ii_log
CHANGING
ct_files = rt_files ).
ENDMETHOD. For your (our) purpose, you can then loop over all |
There are scenarios where you want to serialize objects differently than abapGit. This exit is called at the end of the serialize process and gives an opportunity to change the content of the serialzed files. One such scenario would be to automatically pretty-print code. This can be achieved by looping over all `.abap` files and processing them accordingly in this exit. Closes #5050
There are scenarios where you want to serialize objects differently than abapGit. This exit is called at the end of the serialize process and gives an opportunity to change the content of the serialzed files. One such scenario would be to automatically pretty-print code. This can be achieved by looping over all `.abap` files and processing them accordingly in this exit. Closes #5050 Co-authored-by: Lars Hvam <larshp@hotmail.com>
Method
serialize_abap_clif_source
inzcl_abapgit_oo_serializer
contains a user exit (custom_serialize_abap_clif
) that enables me to perform a custom Pretty print different from the one I use on my system (cf. https://gist.github.com/mbtools/71aa345a8ccb8f375568f9f337569154).Such a User Exit is missing in the following methods:
serialize_locals_def
serialize_locals_imp
serialize_macros
serialize_testclasses
Thanks,
The text was updated successfully, but these errors were encountered: