2023-05-08 22:18:34 +00:00
|
|
|
name: Clang-format Check
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
clang-format-check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install clang-format
|
2023-05-08 22:23:17 +00:00
|
|
|
run: apt-get install -y clang-format
|
2023-05-08 22:18:34 +00:00
|
|
|
|
|
|
|
- name: Check code formatting
|
|
|
|
run: |
|
|
|
|
find . -type f -regex '.*\.\(cpp\|hpp\|c\|h\)' -exec clang-format -style=file -i {} \;
|
|
|
|
git diff --exit-code
|