aboutsummaryrefslogtreecommitdiff
path: root/ci/lint
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-11-13 13:46:57 +0000
committerfanquake <fanquake@gmail.com>2023-11-13 14:10:54 +0000
commit63423480723de8f4da67e9f4a715cca15498a4ca (patch)
tree9afc80788c7c0618d11b9a2cd68d33b3c52bd41e /ci/lint
parent29c2c903621f7daae26113dd2902c016b56929d4 (diff)
parentbbbbdb0cd57d75a06357d2811363d30a498f4499 (diff)
downloadbitcoin-63423480723de8f4da67e9f4a715cca15498a4ca.tar.xz
Merge bitcoin/bitcoin#28076: util: Replace std::filesystem with util/fs.h
bbbbdb0cd57d75a06357d2811363d30a498f4499 ci: Add filesystem lint check (MarcoFalke) fada2f91108a56cc5c447bd6b6fac411e4d5cdca refactor: Replace <filesystem> with <util/fs.h> (MarcoFalke) Pull request description: Using `std::filesystem` is problematic: * There is a `fs` namespace wrapper for it. So having two ways to achieve the same is confusing. * Not using the `fs` wrapper is dangerous and buggy, because it disables known bugs by deleting problematic functions. Fix all issues by removing use of it and adding a linter to avoid using it again in the future. ACKs for top commit: TheCharlatan: ACK bbbbdb0cd57d75a06357d2811363d30a498f4499 fanquake: ACK bbbbdb0cd57d75a06357d2811363d30a498f4499 🦀 Tree-SHA512: 0e2d49742b08eb2635e6fce41485277cb9c40fe20b81017c391d3472a43787db1278a236825714ca1e41c9d2f59913865cfb0c649e3c8ab1fb598c849f80c660
Diffstat (limited to 'ci/lint')
-rwxr-xr-xci/lint/04_install.sh11
-rwxr-xr-xci/lint/06_script.sh1
-rwxr-xr-xci/lint/container-entrypoint.sh1
3 files changed, 13 insertions, 0 deletions
diff --git a/ci/lint/04_install.sh b/ci/lint/04_install.sh
index b160406392..476417d04b 100755
--- a/ci/lint/04_install.sh
+++ b/ci/lint/04_install.sh
@@ -33,6 +33,17 @@ export PATH="${PYTHON_PATH}/bin:${PATH}"
command -v python3
python3 --version
+export LINT_RUNNER_PATH="/lint_test_runner"
+if [ ! -d "${LINT_RUNNER_PATH}" ]; then
+ ${CI_RETRY_EXE} apt-get install -y cargo
+ (
+ cd ./test/lint/test_runner || exit 1
+ cargo build
+ mkdir -p "${LINT_RUNNER_PATH}"
+ mv target/debug/test_runner "${LINT_RUNNER_PATH}"
+ )
+fi
+
${CI_RETRY_EXE} pip3 install \
codespell==2.2.5 \
flake8==6.1.0 \
diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh
index ccde12a033..af7a517930 100755
--- a/ci/lint/06_script.sh
+++ b/ci/lint/06_script.sh
@@ -30,6 +30,7 @@ test/lint/git-subtree-check.sh src/secp256k1
test/lint/git-subtree-check.sh src/minisketch
test/lint/git-subtree-check.sh src/leveldb
test/lint/git-subtree-check.sh src/crc32c
+RUST_BACKTRACE=1 "${LINT_RUNNER_PATH}/test_runner"
test/lint/check-doc.py
test/lint/all-lint.py
diff --git a/ci/lint/container-entrypoint.sh b/ci/lint/container-entrypoint.sh
index e94a75e22c..a403f923a2 100755
--- a/ci/lint/container-entrypoint.sh
+++ b/ci/lint/container-entrypoint.sh
@@ -11,6 +11,7 @@ export LC_ALL=C
git config --global --add safe.directory /bitcoin
export PATH="/python_build/bin:${PATH}"
+export LINT_RUNNER_PATH="/lint_test_runner"
if [ -z "$1" ]; then
LOCAL_BRANCH=1 bash -ic "./ci/lint/06_script.sh"