From 8ac9305d05bda82fa2b9a4863e11e155c193fbf5 Mon Sep 17 00:00:00 2001 From: Shuo Sun <36634506+SS47816@users.noreply.github.com> Date: Wed, 20 Mar 2024 18:44:26 +0800 Subject: [PATCH] Create cpp-linter.yml --- .github/workflows/cpp-linter.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/cpp-linter.yml diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml new file mode 100644 index 0000000..ac4d1d5 --- /dev/null +++ b/.github/workflows/cpp-linter.yml @@ -0,0 +1,26 @@ +name: cpp-linter + +on: [push, pull_request] + +jobs: + cpp-linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: cpp-linter/cpp-linter-action@main + id: linter + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + style: file # optional, default is llvm + tidy-checks: '' + files-changed-only: false + thread-comments: ${{ github.event_name == 'pull_request' && 'update' }} + + - name: Fail fast?! + if: steps.linter.outputs.checks-failed != 0 + run: | + echo "some linter checks failed. ${{ steps.linter.outputs.checks-failed }}" + # for actual deployment + # run: exit 1