clang-format-check.yml raw
1 # Workflow for checking that source code is formatted by clang-format.
2 name: clang-format check
3
4 on: [ push, pull_request ]
5
6 jobs:
7 build:
8 name: Check by clang-format
9 runs-on: ubuntu-latest
10
11 steps:
12 - name: Checkout
13 uses: actions/checkout@v4
14 - name: Show clang-format version
15 run: >
16 clang-format --version
17 - name: Perform checking by clang-format
18 run: >
19 find . -iname '*.c' -o -iname '*.cc' -o -iname '*.cpp' -o -iname '*.h'
20 | xargs clang-format --dry-run --Werror
21