diff --git a/.github/workflows/clang-format.yml.disabled b/.github/workflows/clang-format.yml.disabled new file mode 100644 index 00000000..b154a3a4 --- /dev/null +++ b/.github/workflows/clang-format.yml.disabled @@ -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 + +