Commit 0366d7996d2a5439c6196516e0aa8d4637f6e878
1 parent
e03bc641
chore(ci): add a code-format checker
Showing
1 changed file
with
22 additions
and
0 deletions
.github/workflows/clang-format.yaml
0 → 100644
| 1 | +name: Code formatting | |
| 2 | + | |
| 3 | +on: | |
| 4 | + push: | |
| 5 | + branches: | |
| 6 | + - main | |
| 7 | + pull_request: | |
| 8 | + branches: | |
| 9 | + - main | |
| 10 | + | |
| 11 | +jobs: | |
| 12 | + clang_format: | |
| 13 | + name: Code formatting | |
| 14 | + runs-on: ubuntu-latest | |
| 15 | + | |
| 16 | + steps: | |
| 17 | + - name: Checkout | |
| 18 | + uses: actions/checkout@v3 | |
| 19 | + | |
| 20 | + - name: Check code format | |
| 21 | + run: | | |
| 22 | + clang-format-12 src/* example/*/*.cpp --dry-run -Werror | ... | ... |