Skip to content

Commit

Permalink
Set up clang-format github action
Browse files Browse the repository at this point in the history
Signed-off-by: Ping Xie <[email protected]>
  • Loading branch information
PingXie committed May 24, 2024
1 parent c41dd77 commit c5dde8a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
File renamed without changes.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ permissions:

jobs:

checkers:
name: Run static checkers
runs-on: ubuntu-latest
strategy:
matrix:
path:
- check: 'src'
exclude: 'src/(lzf.*|crccombine.*|crc16.c|crc16_slottable.h|crc64.c|crcspeed.*|fmtargs.h|mt19937-64.*|pqsort.*|setcpuaffinity.c|setproctitle.c|sha1.*|sha256.*|siphash.c|strl.c|unit/test_files.h)'
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Run clang-format style check (.c and .h)
uses: jidicula/clang-format-action@f62da5e3d3a2d88ff364771d9d938773a618ab5e # v4.11.0
with:
clang-format-version: '13'
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}

test-ubuntu-latest:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions src/.clang-format-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ sha1.*
sha256.*
siphash.c
strl.c
unit/test_files.h

0 comments on commit c5dde8a

Please sign in to comment.