From cb99b51229d02c00c2dc2434c8350e19dd124373 Mon Sep 17 00:00:00 2001 From: "Mag1c.H" Date: Thu, 27 Nov 2025 23:23:00 +0800 Subject: [PATCH 1/2] Create cpp-linter.yml --- .github/workflows/cpp-linter.yml | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 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 00000000..dee97606 --- /dev/null +++ b/.github/workflows/cpp-linter.yml @@ -0,0 +1,34 @@ +name: cpp-linter + +on: + push: + branches: [ "*" ] + pull_request: + branches: [ "dev*", "main", "*release" ] + + +jobs: + cpp-linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + with: + persist-credentials: false + - uses: cpp-linter/cpp-linter-action@main + id: linter + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + style: file + tidy-checks: '-*' + files-changed-only: true + lines-changed-only: diff + format-review: true + thread-comments: false + + - name: Fail fast?! + if: steps.linter.outputs.checks-failed != 0 + run: | + echo "some linter checks failed. ${{ steps.linter.outputs.checks-failed }}" + exit 1 From c32c782116be60f66024f6867a82992e19cc05f5 Mon Sep 17 00:00:00 2001 From: "Mag1c.H" Date: Thu, 27 Nov 2025 23:56:26 +0800 Subject: [PATCH 2/2] Update cpp-linter.yml add thread-comments support. --- .github/workflows/cpp-linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml index dee97606..e013a62c 100644 --- a/.github/workflows/cpp-linter.yml +++ b/.github/workflows/cpp-linter.yml @@ -25,7 +25,7 @@ jobs: files-changed-only: true lines-changed-only: diff format-review: true - thread-comments: false + thread-comments: ${{ github.event_name == 'pull_request' && 'update' }} - name: Fail fast?! if: steps.linter.outputs.checks-failed != 0