2023-12-13 15:20:23 +00:00
|
|
|
name: lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- '**.h'
|
|
|
|
- '**.cc'
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
format_code:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-05-03 14:59:52 +00:00
|
|
|
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
|
2023-12-13 15:20:23 +00:00
|
|
|
|
|
|
|
- name: Install clang-format
|
2024-05-03 15:18:33 +00:00
|
|
|
uses: aminya/setup-cpp@290824452986e378826155f3379d31bce8753d76 # v0.37.0
|
2023-12-13 15:20:23 +00:00
|
|
|
with:
|
|
|
|
clangformat: 17.0.5
|
|
|
|
|
|
|
|
- name: Run clang-format
|
|
|
|
run: |
|
|
|
|
find include src -name '*.h' -o -name '*.cc' | xargs clang-format -i -style=file -fallback-style=none
|
|
|
|
git diff --exit-code
|