abap-cleaner icon indicating copy to clipboard operation
abap-cleaner copied to clipboard

Recommendations on how to leverage ABAP Cleaner as part of a pipeline

Open diegodiff opened this issue 1 year ago • 3 comments

Currently considering building a pipeline that auto-generates ABAP Code and it will be great to be able to via CI/CD tool to call the ABAP Cleaner pass a piece of code, request to clean it and get the code back.

As of now, the only viable way would be using some scripting tool with a VM and the standalone ABAP Cleaner BUT perhaps you're thinking about that or already figured it out.

Thanks, Diego.

diegodiff avatar Feb 12 '24 06:02 diegodiff

You might want to get in touch with @stockbal. He was working on a GitHub workflow last year: https://github.com/SAP/abap-cleaner/issues/118#issuecomment-1741860852

ConjuringCoffee avatar Feb 12 '24 07:02 ConjuringCoffee

if generating code, I assume that there is multiple things that needs to fit together, ie. you'd like early feedback on the syntax

something like https://github.com/abap-openapi/abap-openapi generates ABAP code, and checks it with abaplint for early syntax feedback

can also quick fix issues npm install @abaplint/cli -g && abaplint --fix

larshp avatar Feb 12 '24 08:02 larshp

Hi Diego,

regarding ABAP cleaner, you could check how far you can get with Calling ABAP cleaner from the command line, which also includes an example of a GitHub Actions workflow usage.

Kind regards, Jörg-Michael

jmgrassau avatar Feb 12 '24 09:02 jmgrassau