diff --git a/.github/workflows/code-format-check.yml b/.github/workflows/code-format-check.yml new file mode 100644 index 000000000..599f73297 --- /dev/null +++ b/.github/workflows/code-format-check.yml @@ -0,0 +1,21 @@ +name: C++ Code Check +on: [ push, pull_request ] +jobs: + formatting-check: + name: Check C++ Code Formatting + runs-on: ubuntu-24.04 + strategy: + matrix: + path: + - check: 'include' + - check: 'src' + exclude: 'ext' + steps: + - uses: actions/checkout@v4 + - name: Run clang-format style check for C/C++/Protobuf programs. + uses: jidicula/clang-format-action@v4.14.0 + with: + clang-format-version: '18' + check-path: ${{ matrix.path['check'] }} + exclude-regex: ${{ matrix.path['exclude'] }} + fallback-style: 'LLVM'