lint: pass args from lint.py to cargo run in container
What changed, and why it matters
This commit is a minor developer-tooling improvement. It changes the lint helper scripts so that command-line arguments typed by a developer (for example, `--help` or `--lint=py_lint`) are forwarded through the container entrypoint into the Rust lint test runner. There is no change to Bitcoin Core's network, wallet, consensus, or cryptographic code, and nothing in the diff suggests a security bug or fix.
No security action needed. Treat as a normal CI/developer-experience change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies three files in the CI lint infrastructure. ci/lint/06_script.sh now passes "$@" to cargo run -- ..., ci/lint/container-entrypoint.sh removes a conditional that previously ran a default command when no arguments were present, and test/lint/README.md documents the new argument forwarding. The change is purely about CLI ergonomics for running lint checks locally in a container.
Changed components
ci/lint/06_script.shci/lint/container-entrypoint.shtest/lint/README.mdInspect captured patch +9 / −6
diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh
index 82e499c2..ffbf68ea 100755
--- a/ci/lint/06_script.sh
+++ b/ci/lint/06_script.sh
@@ -16,7 +16,7 @@ if [ -n "${LINT_CI_IS_PR}" ]; then
fi
fi
-RUST_BACKTRACE=1 cargo run --manifest-path "./test/lint/test_runner/Cargo.toml"
+RUST_BACKTRACE=1 cargo run --manifest-path "./test/lint/test_runner/Cargo.toml" -- "$@"
if [ "${LINT_CI_SANITY_CHECK_COMMIT_SIG}" = "1" ] ; then
# Sanity check only the last few commits to get notified of missing sigs,
diff --git a/ci/lint/container-entrypoint.sh b/ci/lint/container-entrypoint.sh
index 84e60be2..6edb74a2 100755
--- a/ci/lint/container-entrypoint.sh
+++ b/ci/lint/container-entrypoint.sh
@@ -12,8 +12,4 @@ git config --global --add safe.directory /bitcoin
export PATH="/python_build/bin:${PATH}"
-if [ -z "$1" ]; then
- bash -ic "./ci/lint/06_script.sh"
-else
- exec "$@"
-fi
+./ci/lint/06_script.sh "$@"
diff --git a/test/lint/README.md b/test/lint/README.md
index 462e4c80..e98522a7 100644
--- a/test/lint/README.md
+++ b/test/lint/README.md
@@ -10,6 +10,13 @@ the _lint.py_ helper script which runs checks inside the CI container:
./ci/lint.py
```
+Extra arguments are passed to `cargo run -- ...` in the container so you can do:
+
+```sh
+./ci/lint.py --help
+./ci/lint.py --lint=py_lint
+```
+
test runner
===========
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.