Skip to content

Commit 34253c1

Browse files
committed
workflows/lint: add clang-format on changed files
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.
1 parent 37159a8 commit 34253c1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/lint.yml

+18
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,21 @@ jobs:
3939
steps:
4040
- uses: actions/checkout@v4
4141
- uses: chartboost/ruff-action@v1
42+
43+
clang-format-lint:
44+
runs-on: ubuntu-24.04
45+
if: github.event_name == 'pull_request'
46+
# container:
47+
# image: "registry.opensuse.org/home/mia/images/images/mpv-ci:stable-deps"
48+
steps:
49+
- run: |
50+
sudo apt-get update
51+
sudo apt-get install -y clang-format
52+
53+
- uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 50
56+
- name: Check Formatting
57+
run: |
58+
git clang-format ${{ github.event.pull_request.base.sha }} --diff
59+
echo $?

0 commit comments

Comments
 (0)