mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 12:17:38 +00:00
WIP: [RFC] refactor: fix and then enforce param naming via clang-tidy #36781
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!36781
Loading…
Reference in a new issue
No description provided.
Delete branch "tidy_param_names"
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?
Declarations and definitions tend to drift apart. We could align these, and then enforce that via
clang-tidysreadability-inconsistent-declaration-parameter-namecheck: https://clang.llvm.org/extra/clang-tidy/checks/readability/inconsistent-declaration-parameter-name.html.This may not be worth the (initial) churn / we may also be fine with inconsistency here. Also need to decide which side to align on in some cases.
Currently drafted, as it's based on changes from #36743 to avoid changing could-be-deleted lines twice.
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
Reviewers, this pull request conflicts with the following ones:
WalletBatchwrite failures by achow101)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
LLM Linter (✨ experimental)
Possible places where named args for integral literals may be used (e.g.
func(x, /*named_arg=*/0)in C++, andfunc(x, named_arg=0)in Python):src/wallet/spend.cpp:CreateTransaction(wallet, recipients, change_pos, coinControl, false)2026-11-05 15:08:56
🔵 Suggestion · Static wallet helpers retain unnecessary standalone prototypes
The new prototypes for OutputGetChange and FindNonChangeParentOutput duplicate signatures unnecessarily; their lock annotations can live on the definitions without changing behavior or thread-safety checking.
Location:
src/wallet/receive.cpp:79(head).Review coverage was incomplete.
Reviewed:
38f497d04cb0· Full review report · Previous reportspermalink
Concept ACK on unifying parameter names and enforcing consistency. I left a few optional naming alternative nits, but I’m also fine with minimizing the diff and focusing on enabling the tidy. The unused serialization removal and internal-linkage cleanup are worthwhile independently and could land separately.
Since we’re unifying parameter names, it seems more consistent to me if we also add back the missing names.: the complementary
readability-named-parametercheck (withInsertPlainNamesInForwardDecls: true) could catch these cases.Add missing parameter names to headers
I understand you chose the version with the minimal diff, but since we’re fixing inconsistencies, we might as well use
in_bytes/out_bytesconsistently for bothCryptmethods.Use consistent ChaCha20 buffer parameter names
Same, matching the definition keeps the diff smaller, but keeping
min_incremental_feehere and renaming the parameter in the definition would be closer to our current coding style.Keep the snake_case FeeFilterRounder parameter
Alternatively we could keep
scriptrather thaninin the script hash constructors, andkeyidrather thanaddressinCreateSig, updating the definitions instead (the baseCreateSigdeclaration already useskeyid).Keep descriptive script and key parameter names
🐙 This pull request conflicts with the target branch and needs rebase.