Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from storopoli/storopoli/ci/clang-format
Browse files Browse the repository at this point in the history
ci: add clang-format
  • Loading branch information
storopoli authored Jul 28, 2024
2 parents 84e68ec + 1e7d560 commit cc29a78
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: clang-format
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
clang-format:
name: Check code formatting using clang-format
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install clang-format
- name: Check formatting C code
run: |
find . -type f -name "*.c" -exec clang-format -n -Werror --ferror-limit=1 {} \;
- name: Check formatting C++ code
run: |
find . -type f -name "*.c" -exec clang-format -n -Werror --ferror-limit=1 {} \;
- name: Check formatting C header code
run: |
find . -type f -name "*.c" -exec clang-format -n -Werror --ferror-limit=1 {} \;
- name: Check formatting C++ header code
run: |
find . -type f -name "*.c" -exec clang-format -n -Werror --ferror-limit=1 {} \;

0 comments on commit cc29a78

Please sign in to comment.