mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:29:40 +00:00
lint: shellcheck files with shell shebang #36742
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36742
Loading…
Reference in a new issue
No description provided.
Delete branch "2611-lint-shellcheck-shebang"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The current shellcheck lint silently ignores all files with a shell shebang that are not ending in
.sh.Fix it by linting them, which also simplifies the script, because manually appending of guix scripts can be dropped.
Also, remove global shellcheck exclude of SC2162 (read -r).
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
No conflicts as of last run.
Concept ACK.
🟠 Minor · The subtree filter also excludes unrelated
src/directoriesThe combined discovery list now uses a pre-existing character-class filter that would silently exclude scripts under directories such as
src/test/; no current affected non-vendored script was found.Location:
test/lint/lint-shell.py:63(head).🔵 Suggestion · Passphrase reads still trim surrounding whitespace
As a pre-existing limitation, the signing prompts strip leading and trailing spaces and tabs despite
read -r; no affected signer is known, butIFS= read -rwould preserve these passphrases.Location:
contrib/macdeploy/detached-sig-create.sh:34(head).Review coverage was incomplete.
Reviewed:
fa2028daaa46· Review report · Previous reportspermalink
The new
get_shebang_files()function picks up the vendoredci/retry/retry,depends/config.guessanddepends/config.sub. The first had to be modified to pass the check, and the last two happen to pass it at the moment. However, I don't think we want to check any of them in the first place.The following pre-existing code seems to be broken:
github.com/bitcoin/bitcoin@fa2028daaa/test/lint/lint-shell.py (L64)For example, it causes the whole
src/ipc/subdirectory to be skipped.Could it be fixed in this PR as well?
Why not?
ci/retry/retryis maintained in-tree, and already heavily modified, so it must be checked. If the config stuff fails, it would be trivial to exclude itIt is not broken. It works correctly by accident. I don't know how to fix it, so let's leave it for later: https://github.com/bitcoin/bitcoin/pull/36749#issuecomment-6625819678
ACK
fa2028daaa.I think we can probably just delete / cleanup more of this code, but that can be done later.