• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: lint
2
3on:
4  pull_request:
5    paths:
6      - '**.h'
7      - '**.cc'
8
9permissions:
10  contents: read
11
12jobs:
13  format_code:
14    runs-on: ubuntu-latest
15    steps:
16    - uses: actions/checkout@v4
17
18    - name: Install clang-format
19      uses: aminya/setup-cpp@v1
20      with:
21        clangformat: 17.0.5
22
23    - name: Run clang-format
24      run: |
25        find include src -name '*.h' -o -name '*.cc' |  xargs clang-format -i -style=file -fallback-style=none
26        git diff --exit-code
27