From 4998cdc496d447127080645c8c2c415f5b5b7cb6 Mon Sep 17 00:00:00 2001 From: Alan Jian Date: Wed, 15 May 2024 10:36:48 +0800 Subject: [PATCH] Check coding style with GitHub CI Close #6 --- .github/workflows/format.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..5d758b6 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,17 @@ +name: Format CI + +on: [push, pull_request] + +jobs: + check-format: + runs-on: ubuntu-latest + steps: + - name: Check out the repository + uses: actions/checkout@v3 + - name: Check code format + run: | + FILES=$(find | grep -E "\.(c|h)\$") + for file in ${FILES}; + do + clang-format -n -Werror ${file} + done