mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 15:11:38 +00:00
Enclose all header content in include guards #36805
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!36805
Loading…
Reference in a new issue
No description provided.
Delete branch "261108-include-guard"
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?
From https://gcc.gnu.org/onlinedocs/cpp/Once-Only-Headers.html:
This PR fixes the three headers that have content outside their guards and modifies
test/lint/lint-include-guards.pyto catch such violations in the future.A prerequisite for https://github.com/bitcoin/bitcoin/pull/36808.
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:
src/test/fuzzand treat them as errors by hebasto)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.
🔵 Suggestion · Lint does not verify that the final
#endifcloses the include guardThe lint can accept content outside an early-closed guard when a later conditional supplies the expected final
#endif; no current tracked header with this layout was identified.Location:
test/lint/lint-include-guards.py:80(head).Review coverage was incomplete.
Reviewed:
ca14da90250f· Review report · Previous reportspermalink
ACK
c385c1ff18We don't use /* comments for the header and we shouldn't start doing that, so this dead logic should be dropped
github.com/bitcoin/bitcoin@4ef7904c39/src/util/moneystr.h (L6-L8)or
github.com/bitcoin/bitcoin@4ef7904c39/src/torcontrol.h (L5-L7)Sure, but they are wrong, because doxygen doesn't attach them to the guard, but to the next variable:
Implying that this would be possible doesn't seem useful. I guess I missed that there are existing violations, but it may be best to fix them instead of ignoring them?
Right. Fixed in https://github.com/bitcoin/bitcoin/pull/36815.
Marking this PR as a draft for now.
Rebased on top of the merged bitcoin/bitcoin#36815 and undrafted.
Thanks! Done.
Seems a lot of hand-holding to use regex here and double-parsing just to print a line number. Should be trivial to just use something like:
If you feel strongly about hand-holding, you can echo back
code[0](or so)otherwise:
lgtm 9b0ef7e98b00409e6b8871bd6c8fbcad6ffc26b7~0 🥐
Show signature
Signature:
Thanks! Taken.
I tested the build compile failure fixed in the first commit, but I haven't tested the linter.
review ACK
ca14da9025🖨Show signature
Signature:
A CI job with the reverted first commit is available here: https://github.com/hebasto/bitcoin/actions/runs/42830416553/job/129878658971.
UPDATE: