daphne-eu / daphne

DAPHNE: An Open and Extensible System Infrastructure for Integrated Data Analysis Pipelines
Apache License 2.0
67 stars 62 forks source link

[ci] adds clang-format action (#833) #835

Closed philipportner closed 1 month ago

philipportner commented 1 month ago

With 12839d6d, cb999f20, and 9a1b93e4 a .clang-format file was introduced and src/ and test/ were formatted according to the .clang-format file using clang-format version 18.1.8.

This patch adds an action that runs clang-format on pushes to main and on events in pull requests. The action runs clang-format with version 18.1.8 on the src/ and test/ folders. If the pushed code contains ill-formatted code, the actions displays the diff.

With that, I added clang-format-18 to the dependencies of the Dockerfile to make it readily available for contributors.

philipportner commented 1 month ago

LGTM generally. Maybe resolve the inline questions :)

Thanks a lot @corepointer for the instant review :)

auge commented 1 month ago

@philipportner sorry for my late comments … I highly value the move towards more maintain- and readable code. I have a small suggestion, could you pls. update the checkout step to a more modern version? We've recently updated these in the other actions too - see https://github.com/daphne-eu/daphne/blob/main/.github/workflows/main.yml

uses: actions/checkout@v4

philipportner commented 1 month ago

@philipportner sorry for my late comments … I highly value the move towards more maintain- and readable code. I have a small suggestion, could you pls. update the checkout step to a more modern version? We've recently updated these in the other actions too - see https://github.com/daphne-eu/daphne/blob/main/.github/workflows/main.yml

uses: actions/checkout@v4

Hi @auge , I totally missed that. Thanks for the suggestion! #841 and I'll push an update for that tomorrow :)