Skip to content

Docs enhancement: Guide to use ABAP Cleaner in Github Workflow #127

Closed

Description

@stockbal

Hi Jörg-Michael,

I now got a first working version of a Github Action Workflow that uses ABAP Cleaner 😄.
As I am not a GitHub Workflow expert by far, I am not sure if it is the best approach to do it, but hey, it is working.

Here is the workflow in my sample repository. I only had one minor hickup after the job first ran and I tried to import the changes back into my ABAP system.
After a little bit of debugging I found the culprit... crlf 😋. abapGit is splitting the received text content from git at lf into an internal table. The left behind carriage return is then seen as unknown statement and the import fails.

In a local setup the crlf characters written by ABAP cleaner never caused this because of the git setting core.autocrlf = true. And luckily enough this can also be set inside the workflow. So an additional step before the checkout solved it.

    - run: git config --global core.autocrlf true

    - name: Checkout
      uses: actions/checkout@v3

After that additional file changes via the workflow could be imported back to the ABAP system without any issue.

All the best,
Ludwig

Activity

  1. jmgrassau commented on Oct 2, 2023

    @jmgrassau
    Member

    Hi Ludwig,

    that's amazing!! Hardly any GitHub Workflow knowledge on my side, but could you try changing the hard-coded release number into this: releases/download/v1.6.0/ -> releases/latest/download/

    https://github.com/SAP/abap-cleaner/releases/latest/download/com.sap.adt.abapcleaner.app-linux.gtk.x86_64.tar.gz

    After a little bit of debugging I found the culprit...

    Oops 😉 Yes, the world would be a better place without / versus \ or crlf versus lf…

    Kind regards,
    Jörg-Michael

  2. stockbal commented on Oct 2, 2023

    @stockbal
    ContributorAuthor

    Hi Jörg-Michael,

    Ah, I knew there was a way to get the latest release 👍🚀 . Change is done, works like a charm.

    Kind regards,
    Ludwig

  3. self-assigned this
    on Oct 10, 2023
  4. jmgrassau commented on Oct 10, 2023

    @jmgrassau
    Member

    Hi Ludwig,

    the How to use ABAP cleaner documentation was now enhanced with a section on GitHub Actions workflow usage! Hope this is as you expected it to be – otherwise please let me know. And again thanks so much for you contributions!

    Kind regards,
    Jörg-Michael

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

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions