What changed, and why it matters
This commit updates the Bitcoin Core continuous integration (CI) system to use Clang 22 instead of Clang 21 for the clang-tidy static analysis task. It also adds an explicit path to the clang-tidy configuration file because the newer version no longer finds it automatically. This is a build/test infrastructure change with no effect on the Bitcoin Core software that users run.
No security action required. Treat as a routine CI maintenance change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff changes two CI shell scripts. ci/test/00_setup_env_native_tidy.sh bumps TIDY_LLVM_V from 21 to 22, which causes the CI container to install clang-22, libclang-22-dev, llvm-22-dev, libomp-22-dev, and clang-tidy-22. ci/test/03_test_script.sh adds -config-file="${BASE_ROOT_DIR}/src/.clang-tidy" to the run-clang-tidy-22 invocation to compensate for changed default config-file discovery behavior in the newer LLVM release. No source code, consensus logic, networking, wallet, or RPC code is modified.
Changed components
ci/test/00_setup_env_native_tidy.shci/test/03_test_script.shInspect captured patch +2 / −2
diff --git a/ci/test/00_setup_env_native_tidy.sh b/ci/test/00_setup_env_native_tidy.sh
index 04f3e2e7..b3cda17e 100755
--- a/ci/test/00_setup_env_native_tidy.sh
+++ b/ci/test/00_setup_env_native_tidy.sh
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
export CONTAINER_NAME=ci_native_tidy
-export TIDY_LLVM_V="21"
+export TIDY_LLVM_V="22"
export APT_LLVM_V="${TIDY_LLVM_V}"
export PACKAGES="clang-${TIDY_LLVM_V} libclang-${TIDY_LLVM_V}-dev llvm-${TIDY_LLVM_V}-dev libomp-${TIDY_LLVM_V}-dev clang-tidy-${TIDY_LLVM_V} jq libevent-dev libboost-dev libzmq3-dev systemtap-sdt-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev libsqlite3-dev libcapnp-dev capnproto"
export NO_DEPENDS=1
diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh
index d81bd0b9..eb03c2dd 100755
--- a/ci/test/03_test_script.sh
+++ b/ci/test/03_test_script.sh
@@ -174,7 +174,7 @@ if [ "${RUN_TIDY}" = "true" ]; then
mv tmp.json "${BASE_BUILD_DIR}/compile_commands.json"
cd "${BASE_BUILD_DIR}/src/"
- if ! ( run-clang-tidy-"${TIDY_LLVM_V}" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" | tee tmp.tidy-out.txt ); then
+ if ! ( run-clang-tidy-"${TIDY_LLVM_V}" -config-file="${BASE_ROOT_DIR}/src/.clang-tidy" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" | tee tmp.tidy-out.txt ); then
grep -C5 "error: " tmp.tidy-out.txt
echo "^^^ ⚠️ Failure generated from clang-tidy"
false
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.