From 0366d7996d2a5439c6196516e0aa8d4637f6e878 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 23 Oct 2022 10:28:03 +0000 Subject: [PATCH] chore(ci): add a code-format checker --- .github/workflows/clang-format.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/clang-format.yaml diff --git a/.github/workflows/clang-format.yaml b/.github/workflows/clang-format.yaml new file mode 100644 index 0000000..eed101a --- /dev/null +++ b/.github/workflows/clang-format.yaml @@ -0,0 +1,22 @@ +name: Code formatting + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + clang_format: + name: Code formatting + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Check code format + run: | + clang-format-12 src/* example/*/*.cpp --dry-run -Werror -- libgit2 0.21.4