| 123456789101112131415161718192021222324252627 |
- name: Format
- on:
- push:
- pull_request:
- jobs:
- clang-format:
- runs-on: ubuntu-latest
- steps:
- - name: Check out repository
- uses: actions/checkout@v4
- - 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 and style
- # Fails the job (and blocks the PR) the moment any file differs from
- # the Linux kernel .clang-format style, or a long trailing // comment
- # is found. Run `make format` to fix formatting; move long trailing
- # comments above their statement to satisfy the lint.
- run: make check
|