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 19, 2024
1 parent 37159a8 commit 92ee218
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,16 @@ 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: "registry.opensuse.org/home/mia/images/images/mpv-ci:stable-deps"
steps:
- run: |
sudo apt-get update
sudo apt-get install -y clang-format
- uses: actions/checkout@v4
- run: git clang-format ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} --diff

0 comments on commit 92ee218

Please sign in to comment.