-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable clang-format action until it actually passes
Ref #22
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: clang-format check | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
check-fmt: | ||
runs-on: ubuntu-latest | ||
name: "clang-format" | ||
if: "!contains(github.event.head_commit.message, '[skip lint]')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Run clang-format | ||
run: | | ||
# This magic invocation to find will: | ||
# - list every file ending in .hpp or .cpp recursively in | ||
# - ./lib | ||
# - ./test | ||
# unless the path contains a directory named 3rdparty in it | ||
find ./lib ./test -type d -name "3rdparty" -prune -false -o -type f -iname "*.cpp" -o -iname "*.hpp" -print0 | xargs -0 clang-format --style=file -Werror --dry-run | ||
|
||
|