From 96d150a64e7636138bdc60042d97f3d33f5cce38 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Thu, 15 Jun 2023 23:03:46 -0500 Subject: [PATCH] Add C++ format check to GitHub Actions (#2554) --- .github/workflows/format-check.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/format-check.yml diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml new file mode 100644 index 0000000000..4914d5e5ea --- /dev/null +++ b/.github/workflows/format-check.yml @@ -0,0 +1,25 @@ +name: C++ Format Check + +on: pull_request + +jobs: + cpp-linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: cpp-linter/cpp-linter-action@v2 + id: linter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + style: file + files-changed-only: true + tidy-checks: '-*' + version: '15' # clang-format version + file-annotations: true + step-summary: true + extensions: 'cpp,h' + + - name: Failure Check + if: steps.linter.outputs.checks-failed > 0 + run: echo "Some files failed the formatting check! See job summary and file annotations for more info" && exit 1