Review report

bitcoin/bitcoin: PR #36808

1 minor finding

Findings

Link

[minor] · The include-guard lint misses code following a block comment

The new lint accepts code outside an include guard when it follows a block-comment terminator on a line classified as comment-only.

Location: test/lint/lint-include-guards.py:76 (head).

Details and suggested fix

For a checked header with the three expected guard directives, placing /* note */ int outside; after the closing guard produces no error. A two-line comment ending with */ int outside; has the same effect. _is_comment_or_blank returns True for the entire line in both cases, and the caller skips the outside-guard comparison. Inspect the remainder after each */, allowing whitespace and further comments, and classify the line as comment-only only if no code remains. No current header with this pattern was found. This is a gap in the newly added enforcement; the base had no outside-guard check.


Coverage details