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 180aeb9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,23 @@ 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 git python3 clang17-extra-tools
- uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Check Formatting
run: |
git clang-format ${{ github.event.pull_request.base.sha }} --diff
echo $?

0 comments on commit 180aeb9

Please sign in to comment.