Skip to content

lint: make include guard check pass for BGL headers#273

Open
RYB-404 wants to merge 1 commit into
BitgesellOfficial:masterfrom
RYB-404:ryb/include-guard-lint-bgl
Open

lint: make include guard check pass for BGL headers#273
RYB-404 wants to merge 1 commit into
BitgesellOfficial:masterfrom
RYB-404:ryb/include-guard-lint-bgl

Conversation

@RYB-404
Copy link
Copy Markdown

@RYB-404 RYB-404 commented May 20, 2026

Description

Fixes the include-guard lint so it can run cleanly on the current Bitgesell tree and catches real BGL header mismatches instead of failing on imported/generated headers.

The current test/lint/lint-include-guards.py exits non-zero on the repository as-is. Some failures are external or generated headers that intentionally keep upstream guard names, while several BGL-owned headers have small guard/comment mismatches. This makes the lint noisy and less useful for reviewers.

What changed

  • Excluded generated/imported headers from the include-guard lint where enforcing the BGL naming convention would be inappropriate.
  • Fixed BGL-owned include guard mismatches in:
    • src/chainparamsseeds.h
    • src/consensus/amount.h
    • src/kernel/mempool_persist.h
    • src/policy/feerate.h
    • src/test/scriptnum10.h
    • src/util/readwritefile.h
    • src/util/trace.h
    • src/zmq/zmqrpc.h

Verification

  • python test/lint/lint-include-guards.py
  • python -m py_compile test/lint/lint-include-guards.py
  • git diff --check

I could not run the Rust test/lint/test_runner wrapper locally because cargo is not installed in this environment, but the underlying include-guard linter passes directly.

/claim #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant