Skip to content

Commit

Permalink
workflows/lint: add clang-format on changed files
Browse files Browse the repository at this point in the history
The entire codebase is not ready to be clang-formatted and probably
never will be, but we can at least check if the changes in new pull
requests follow our coding style.
  • Loading branch information
kasper93 committed Oct 20, 2024
1 parent 37159a8 commit 2d1d9ec
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,24 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1

clang-format-lint:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
container:
image: alpine:3.20
# container:
# image: "registry.opensuse.org/home/mia/images/images/mpv-ci:stable-deps"
steps:
- run: |
apk update
apk add clang18-extra-tools
- uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Check Formatting
shell: bash
run: |
git clang-format ${{ github.event.pull_request.base.sha }} --diff
echo $?

0 comments on commit 2d1d9ec

Please sign in to comment.