From bc9fd054d5150199f6a3f486af152ebc8b967a47 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com> Date: Sun, 1 Nov 2026 21:14:06 +0000 Subject: [PATCH 1/3] test: e2e cpp-linter-action v3.0.0-rc0 with cpp-linter v2 rc --- .github/workflows/v3-e2e.yml | 148 +++++++++++++++++++++++++++++++++++ src/demo.cpp | 2 + 2 files changed, 150 insertions(+) create mode 100644 .github/workflows/v3-e2e.yml diff --git a/.github/workflows/v3-e2e.yml b/.github/workflows/v3-e2e.yml new file mode 100644 index 0000000..180f164 --- /dev/null +++ b/.github/workflows/v3-e2e.yml @@ -0,0 +1,148 @@ +name: v3.0.0-rc0 e2e + +on: + push: + branches: [claude/project-thread-3y9j3l] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + # Cross-platform smoke test: v3.0.0-rc0 vs v2 on the same commit. + matrix: + if: github.event_name == 'push' + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest, windows-11-arm] + version: ['21'] + action: [v3] + include: + - { os: ubuntu-latest, version: '12', action: v3 } + - { os: ubuntu-latest, version: '17', action: v3 } + - { os: ubuntu-latest, version: '23', action: v3 } + - { os: ubuntu-latest, version: '21', action: v2 } + - { os: macos-latest, version: '21', action: v2 } + - { os: windows-latest, version: '21', action: v2 } + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v7 + with: + persist-credentials: false + - name: Generate compilation database + run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + - name: cpp-linter-action v3.0.0-rc0 + if: matrix.action == 'v3' + id: v3 + uses: cpp-linter/cpp-linter-action@v3.0.0-rc0 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + style: file + files-changed-only: false + ignore: build + database: build + version: ${{ matrix.version }} + step-summary: true + extra-args: -std=c++14 -Wall + - name: cpp-linter-action v2 + if: matrix.action == 'v2' + id: v2 + uses: cpp-linter/cpp-linter-action@v2 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + style: file + files-changed-only: false + ignore: build + database: build + version: ${{ matrix.version }} + step-summary: true + extra-args: -std=c++14 -Wall + - name: Outputs + shell: bash + run: | + echo "${{ matrix.action }} ${{ matrix.os }} clang ${{ matrix.version }}: total=${{ steps.v3.outputs.checks-failed }}${{ steps.v2.outputs.checks-failed }} format=${{ steps.v3.outputs.clang-format-checks-failed }}${{ steps.v2.outputs.clang-format-checks-failed }} tidy=${{ steps.v3.outputs.clang-tidy-checks-failed }}${{ steps.v2.outputs.clang-tidy-checks-failed }}" | tee -a "$GITHUB_STEP_SUMMARY" + + # Only the deprecated alias is set: a review is expected if the alias works. + pr-alias: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/checkout@v7 + with: + persist-credentials: false + - run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + - uses: cpp-linter/cpp-linter-action@v3.0.0-rc0 + id: linter + env: + GITHUB_TOKEN: ${{ github.token }} + with: + style: file + lines-changed-only: true + ignore: build + database: build + tidy-review: true + file-annotations: false + extra-args: -std=c++14 -Wall + - run: echo "alias run done at $(date -u +%FT%TZ), checks-failed=${{ steps.linter.outputs.checks-failed }}" | tee -a "$GITHUB_STEP_SUMMARY" + + pr-review: + needs: pr-alias + if: always() && github.event_name == 'pull_request' + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/checkout@v7 + with: + persist-credentials: false + - run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + - uses: cpp-linter/cpp-linter-action@v3.0.0-rc0 + id: linter + env: + GITHUB_TOKEN: ${{ github.token }} + with: + style: file + lines-changed-only: true + ignore: build + database: build + pr-review: true + thread-comments: update + step-summary: true + extra-args: -std=c++14 -Wall + - run: echo "pr-review done at $(date -u +%FT%TZ), checks-failed=${{ steps.linter.outputs.checks-failed }}" | tee -a "$GITHUB_STEP_SUMMARY" + + # Runs after the review jobs so a pushed fix cannot move their diff mid-run. + auto-fix: + needs: pr-review + if: always() && github.event_name == 'pull_request' + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v7 + - run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + - uses: cpp-linter/cpp-linter-action@v3.0.0-rc0 + id: linter + env: + GITHUB_TOKEN: ${{ github.token }} + with: + style: file + lines-changed-only: true + ignore: build + database: build + auto-fix: true + file-annotations: false + extra-args: -std=c++14 -Wall + - name: State after auto-fix + run: | + git log --oneline -3 + git status --short + ls -la .cpp-linter-cache || true diff --git a/src/demo.cpp b/src/demo.cpp index 0c1db60..d104a7d 100644 --- a/src/demo.cpp +++ b/src/demo.cpp @@ -15,3 +15,5 @@ int main() return 0; } + +int addedForV3Test(int x){return x*2;} From 5644250ca9ebc3ed534b58398e0e09d01f000cdc Mon Sep 17 00:00:00 2001 From: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com> Date: Sun, 1 Nov 2026 21:15:32 +0000 Subject: [PATCH 2/3] test: use v3.0.0-rc0 without --jobs --- .github/workflows/v3-e2e.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/v3-e2e.yml b/.github/workflows/v3-e2e.yml index 180f164..1d4cdc7 100644 --- a/.github/workflows/v3-e2e.yml +++ b/.github/workflows/v3-e2e.yml @@ -36,7 +36,7 @@ jobs: - name: cpp-linter-action v3.0.0-rc0 if: matrix.action == 'v3' id: v3 - uses: cpp-linter/cpp-linter-action@v3.0.0-rc0 + uses: cpp-linter/cpp-linter-action@claude/project-thread-3y9j3l env: GITHUB_TOKEN: ${{ github.token }} with: @@ -78,7 +78,7 @@ jobs: with: persist-credentials: false - run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - - uses: cpp-linter/cpp-linter-action@v3.0.0-rc0 + - uses: cpp-linter/cpp-linter-action@claude/project-thread-3y9j3l id: linter env: GITHUB_TOKEN: ${{ github.token }} @@ -104,7 +104,7 @@ jobs: with: persist-credentials: false - run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - - uses: cpp-linter/cpp-linter-action@v3.0.0-rc0 + - uses: cpp-linter/cpp-linter-action@claude/project-thread-3y9j3l id: linter env: GITHUB_TOKEN: ${{ github.token }} @@ -129,7 +129,7 @@ jobs: steps: - uses: actions/checkout@v7 - run: cmake -B build -S src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - - uses: cpp-linter/cpp-linter-action@v3.0.0-rc0 + - uses: cpp-linter/cpp-linter-action@claude/project-thread-3y9j3l id: linter env: GITHUB_TOKEN: ${{ github.token }} From 9f3f2befe2ddfcec3d5f3cd14684ff93be9e01f5 Mon Sep 17 00:00:00 2001 From: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com> Date: Sun, 1 Nov 2026 21:18:05 +0000 Subject: [PATCH 3/3] style: apply clang-format fixes --- src/demo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/demo.cpp b/src/demo.cpp index d104a7d..bf47d7b 100644 --- a/src/demo.cpp +++ b/src/demo.cpp @@ -16,4 +16,4 @@ int main() return 0; } -int addedForV3Test(int x){return x*2;} +static auto addedForV3Test(int x) -> int { return x * 2; }