feature: add clang-format check workflow for code style enforcement
This commit is contained in:
parent
4e9155a02c
commit
a9d9825d0f
1 changed files with 18 additions and 0 deletions
18
.github/workflows/clang-format-check.yml
vendored
Normal file
18
.github/workflows/clang-format-check.yml
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
name: clang-format Check
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
formatting-check:
|
||||||
|
name: Formatting Check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install clang-format
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y clang-format-19
|
||||||
|
|
||||||
|
- name: Run clang-format check
|
||||||
|
run: |
|
||||||
|
find Source -name '*.cpp' -o -name '*.hpp' -o -name '*.c' -o -name '*.h' | \
|
||||||
|
xargs clang-format-19 --dry-run --Werror
|
||||||
Loading…
Add table
Add a link
Reference in a new issue