Skip to content

Commit 88d5abc

Browse files
committed
ci: replace cpp-linter-action with cpp-linter CLI
cpp-linter/cpp-linter-action is frozen at v2.15.1: v2.16+ introduced an untrusted dependency and was blocked by ASF Infra (apache/infrastructure-actions#325), and the ASF gateway ignores newer versions. The pinned action still runs but can no longer be updated. The action is a thin wrapper around the cpp-linter PyPI package, which is not affected by the block. Install that package plus matching clang tools with pip and call the cpp-linter CLI with the same options the action used, keeping the checks-failed output and the Fail fast step. This is a run: step rather than a uses: reference, so it adds no new third-party action to the ASF allowlist. Fixes #336.
1 parent 9221381 commit 88d5abc

1 file changed

Lines changed: 25 additions & 13 deletions

File tree

.github/workflows/cpp-linter.yml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,24 +91,36 @@ jobs:
9191
with:
9292
path: ${{ github.workspace }}/.sccache
9393
key: sccache-cpp-linter-ubuntu-${{ github.run_id }}
94-
- uses: cpp-linter/cpp-linter-action@0f6d1b8d7e38b584cbee606eb23d850c217d54f8 # v2.15.1
94+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
95+
if: github.event_name == 'pull_request'
96+
- name: Install cpp-linter and clang tools
97+
if: github.event_name == 'pull_request'
98+
run: pip install "cpp-linter==1.13.0" "clang-format==22.1.8" "clang-tidy==22.1.8"
99+
- name: Run cpp-linter
95100
id: linter
96101
if: github.event_name == 'pull_request'
97102
continue-on-error: true
98103
env:
99104
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100-
with:
101-
style: file
102-
tidy-checks: ''
103-
version: 22
104-
files-changed-only: true
105-
lines-changed-only: true
106-
thread-comments: true
107-
ignore: 'build|cmake_modules|ci|src/iceberg/catalog/hive/gen-cpp'
108-
database: build
109-
verbosity: 'debug'
110-
# need '-fno-builtin-std-forward_like', see https://github.com/llvm/llvm-project/issues/101614
111-
extra-args: '-std=c++23 -I$PWD/src -I$PWD/build/src -I$PWD/build/_deps/sqlpp23-src/include -I/usr/include/postgresql -I/usr/include/mysql -fno-builtin-std-forward_like'
105+
# need '-fno-builtin-std-forward_like', see https://github.com/llvm/llvm-project/issues/101614
106+
run: |
107+
cpp-linter \
108+
--style=file \
109+
--tidy-checks='' \
110+
--version=22 \
111+
--files-changed-only=true \
112+
--lines-changed-only=true \
113+
--thread-comments=true \
114+
--ignore='build|cmake_modules|ci|src/iceberg/catalog/hive/gen-cpp' \
115+
--database=build \
116+
--verbosity=debug \
117+
--extra-arg='-std=c++23' \
118+
--extra-arg="-I${PWD}/src" \
119+
--extra-arg="-I${PWD}/build/src" \
120+
--extra-arg="-I${PWD}/build/_deps/sqlpp23-src/include" \
121+
--extra-arg='-I/usr/include/postgresql' \
122+
--extra-arg='-I/usr/include/mysql' \
123+
--extra-arg='-fno-builtin-std-forward_like'
112124
- name: Fail fast?!
113125
if: github.event_name == 'pull_request' && steps.linter.outputs.checks-failed != 0
114126
run: |

0 commit comments

Comments
 (0)