Skip to content

Commit

Permalink
Add clang-format-check GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
y-guyon authored and wantehchang committed May 2, 2022
1 parent 45b6b1b commit 570e918
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/clang-format-check.yml
@@ -0,0 +1,12 @@
name: Clang Format Checker
on: [push]
jobs:
clang-format-checking:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: RafikFarhad/clang-format-github-action@v2.1.0
with:
style: file
sources: "apps/**/*.h,apps/**/*.c,examples/*.c,includes/**/*.h,src/**/*.h,src/**/*.c,tests/**/*.h,tests/**/*.c"
excludes: "apps/shared/iccjpeg.*"
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -66,7 +66,9 @@ Use [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to format the C
sources from the top-level folder:

```sh
clang-format -i apps/*.c examples/*.c include/avif/*.h src/*.c tests/*.c
clang-format -i apps/*.c apps/shared/avifjpeg.* apps/shared/avifpng.* \
apps/shared/avifutil.* apps/shared/y4m.* \
examples/*.c include/avif/*.h src/*.c tests/*.h tests/*.c
```

Use [cmake-format](https://github.com/cheshirekow/cmake_format) to format the
Expand Down

0 comments on commit 570e918

Please sign in to comment.