From b959a7d1c41f80923dc7386d1394e94f515997dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sat, 19 Oct 2024 22:17:10 +0200 Subject: [PATCH] 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. --- .github/workflows/lint.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3aece2f4d71b1..c8f73fe1ba458 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -39,3 +39,16 @@ jobs: steps: - uses: actions/checkout@v4 - uses: chartboost/ruff-action@v1 + + clang-format-lint: + runs-on: ubuntu-latest + # 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