name: Format on: push: branches: - main # PRs get the same gate -- without this the checks only ran after merge. pull_request: jobs: clang-format: runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v7 - name: Install clang-format # Pinned to 18 so CI matches the version contributors run locally; # clang-format output differs between major versions. run: | sudo apt-get update sudo apt-get install -y clang-format-18 - name: Check formatting # Fails the job (and blocks the PR) the moment any file differs from # the Linux kernel .clang-format style. Run `make format` to fix. run: make check