doc: Fix Doxygen attribution of file-level comments #36815

Manually merged
hebasto merged 3 commits from 261109-doxygen into master 2026-11-10 10:51:34 +00:00 AGit
hebasto commented 2026-11-09 14:13:18 +00:00 (Migrated from github.com)

Doxygen attaches a comment block that lacks a @file command to the next declaration rather than to the file.

For example:
image

This PR fixes that.

Requested in https://github.com/bitcoin/bitcoin/pull/36805#discussion_r4511737767:

... they are wrong, ... it may be best to fix them instead of ignoring them?

Required for https://github.com/bitcoin/bitcoin/pull/36805.

Doxygen attaches a comment block that lacks a `@file` command to the next declaration rather than to the file. For example: <img width="742" height="265" alt="image" src="https://git.fish.foo/attachments/3e0242f8-4208-485b-8094-a348e974b03e" /> This PR fixes that. Requested in https://github.com/bitcoin/bitcoin/pull/36805#discussion_r4511737767: > ... they are wrong, ... it may be best to fix them instead of ignoring them? Required for https://github.com/bitcoin/bitcoin/pull/36805.
DrahtBot commented 2026-11-09 14:13:26 +00:00 (Migrated from github.com)

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.

Type Reviewers
ACK fanquake
Stale ACK maflcko

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36815 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36815.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36815#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [fanquake](https://github.com/bitcoin/bitcoin/pull/36815#issuecomment-6745658516) | | Stale ACK | [maflcko](https://github.com/bitcoin/bitcoin/pull/36815#issuecomment-6742692771) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--5faf32d7da4f0f540f40219e4f7537a3-->
First-time contributor

I found no actionable issues in this static review.


Reviewed: c4a68cc5ceb6 · Review report · Previous reports

permalink

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:7eebed8027c96ac27bcd79eeb7a88e35799cd96eb8fbacf34d3257986a959f64:6952af7d31ef83bb85ac4ee73e8c979307f4998f73396eb2a639b474cdfe83e6 --> <!-- ralph-base:44901d8f64cb617714707bd025ecd83f108353c2 --> <!-- ralph-head:c4a68cc5ceb62ac160b7adc44ebf6388aa803ed5 --> <!-- ralph-case:a95b22c1b68d84271801b65944cd9b9662828e5cdcd354aebcec2c4ae8da32e6 --> I found no actionable issues in this static review. <!-- Review tier: routine --> --- Reviewed: [`c4a68cc5ceb6`](<https://git.fish.foo/bitcoin/bitcoin/commit/c4a68cc5ceb62ac160b7adc44ebf6388aa803ed5>) · [Review report](<https://review.fish.foo/report/36815-c4a68cc5ceb62ac160b7adc44ebf6388aa803ed5-2412-2.html>) · [Previous reports](<https://review.fish.foo/traces/36815/>) [permalink](<https://review.fish.foo/report/36815-c4a68cc5ceb62ac160b7adc44ebf6388aa803ed5-2412-2.html>)
maflcko commented 2026-11-09 14:35:27 +00:00 (Migrated from github.com)

review ACK b8a07768e2 🏡

Show signature

Signature:

untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
trusted comment: review ACK b8a07768e2b479b008e027fc13ccb379f022dada 🏡
pbPL/v/FX8CFRTOzW0HoWs0XDUrtD8jqOKV6/lhw+nFarBgcYimivnuBp4pYtFwnIU7pDQzrRdXICTmVmvKvBg==
review ACK b8a07768e2b479b008e027fc13ccb379f022dada 🏡 <details><summary>Show signature</summary> Signature: ``` untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}" RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM= trusted comment: review ACK b8a07768e2b479b008e027fc13ccb379f022dada 🏡 pbPL/v/FX8CFRTOzW0HoWs0XDUrtD8jqOKV6/lhw+nFarBgcYimivnuBp4pYtFwnIU7pDQzrRdXICTmVmvKvBg== ``` </details>
fanquake (Migrated from github.com) reviewed 2026-11-09 14:46:24 +00:00
fanquake (Migrated from github.com) commented 2026-11-09 14:46:24 +00:00

Forgot about this one?

Forgot about this one?
fanquake commented 2026-11-09 14:47:51 +00:00 (Migrated from github.com)
If the idea is to consolidate these (onto one style?) looks like a number were missed, i.e: https://github.com/bitcoin/bitcoin/blob/44901d8f64cb617714707bd025ecd83f108353c2/src/util/task_runner.h#L13 https://github.com/bitcoin/bitcoin/blob/44901d8f64cb617714707bd025ecd83f108353c2/src/common/types.h#L5 https://github.com/bitcoin/bitcoin/blob/44901d8f64cb617714707bd025ecd83f108353c2/src/wallet/types.h#L6
hebasto (Migrated from github.com) reviewed 2026-11-09 14:49:36 +00:00
hebasto (Migrated from github.com) commented 2026-11-09 14:49:36 +00:00

If you mean @file, then I didn't. I see this comment as a design note rather than a file description.

If you mean `@file`, then I didn't. I see this comment as a design note rather than a file description.
hebasto commented 2026-11-09 14:53:32 +00:00 (Migrated from github.com)

If the idea is to consolidate these (onto one style?) looks like a number were missed...

The initial motivation was to remove all comments that start with /* from between a copyright banner and an include guard to simplify the linter code in https://github.com/bitcoin/bitcoin/pull/36805.

This PR provides the minimal diff to achieve that aim.

And these changes are real fixes for the Doxygen-generated docs rather than pure style changes.

> If the idea is to consolidate these (onto one style?) looks like a number were missed... The initial motivation was to remove all comments that start with `/*` from between a copyright banner and an include guard to simplify the linter code in https://github.com/bitcoin/bitcoin/pull/36805. This PR provides the minimal diff to achieve that aim. And these changes are real fixes for the Doxygen-generated docs rather than pure style changes.
fanquake (Migrated from github.com) reviewed 2026-11-09 14:58:25 +00:00
fanquake (Migrated from github.com) commented 2026-11-09 14:58:25 +00:00

Sure, but we could include the design note in the docs, rather than hiding it? i.e something like:

diff --git a/src/base58.h b/src/base58.h
index bca3c07701..65ac61f1ac 100644
--- a/src/base58.h
+++ b/src/base58.h
@@ -4,6 +4,9 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 /**
+ * @file
+ * Base58 and Base58Check encoding and decoding.
+ *
  * Why base-58 instead of standard base-64 encoding?
  * - Don't want 0OIl characters that look the same in some fonts and
  *      could be used to create visually identical looking data.
Screenshot
Sure, but we could include the design note in the docs, rather than hiding it? i.e something like: ```diff diff --git a/src/base58.h b/src/base58.h index bca3c07701..65ac61f1ac 100644 --- a/src/base58.h +++ b/src/base58.h @@ -4,6 +4,9 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. /** + * @file + * Base58 and Base58Check encoding and decoding. + * * Why base-58 instead of standard base-64 encoding? * - Don't want 0OIl characters that look the same in some fonts and * could be used to create visually identical looking data. ``` <img width="837" height="272" alt="Screenshot" src="https://git.fish.foo/attachments/a6becd12-f7dd-4d0b-98c3-ac70c995e736" />
fanquake commented 2026-11-09 15:07:26 +00:00 (Migrated from github.com)

And these changes are real fixes for the Doxygen-generated docs rather than pure style changes.

The @file instances I linked to (plus others) also need fixing. i.e master:
master

vs the below diff:

diff
diff --git a/src/common/messages.h b/src/common/messages.h
index 6a2752521f..eb9f19a77c 100644
--- a/src/common/messages.h
+++ b/src/common/messages.h
@@ -3,9 +3,11 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-//! @file common/messages.h is a home for simple string functions returning
-//! descriptive messages that are used in RPC and GUI interfaces or log
-//! messages, and are called in different parts of the codebase across
+//! @file
+//! @brief Home for simple string functions returning descriptive messages.
+//!
+//! The messages are used in RPC and GUI interfaces or log messages, and the
+//! functions are called in different parts of the codebase across
 //! node/wallet/gui boundaries.
 
 #ifndef BITCOIN_COMMON_MESSAGES_H
diff --git a/src/common/types.h b/src/common/types.h
index 1ffcd392d6..e570089601 100644
--- a/src/common/types.h
+++ b/src/common/types.h
@@ -2,8 +2,10 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-//! @file common/types.h is a home for simple enum and struct type definitions
-//! that can be used internally by functions in the libbitcoin_common library,
+//! @file
+//! @brief Home for simple enum and struct type definitions.
+//!
+//! These can be used internally by functions in the libbitcoin_common library,
 //! but also used externally by node, wallet, and GUI code.
 //!
 //! This file is intended to define only simple types that do not have external
diff --git a/src/ipc/types.h b/src/ipc/types.h
index ac89a9bf43..f8ba2fb628 100644
--- a/src/ipc/types.h
+++ b/src/ipc/types.h
@@ -2,8 +2,10 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-//! @file ipc/types.h is a home for public enum and struct type definitions
-//! that are used internally by ipc code, but also used externally by wallet,
+//! @file
+//! @brief Home for public enum and struct type definitions.
+//!
+//! These are used internally by ipc code, but also used externally by wallet,
 //! mining or GUI code.
 //!
 //! This file is intended to define only simple types that do not have external
diff --git a/src/kernel/types.h b/src/kernel/types.h
index 164d4cfda8..6c5ee5b2d9 100644
--- a/src/kernel/types.h
+++ b/src/kernel/types.h
@@ -2,8 +2,10 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-//! @file kernel/types.h is a home for simple enum and struct type definitions
-//! that can be used internally by functions in the libbitcoin_kernel library,
+//! @file
+//! @brief Home for simple enum and struct type definitions.
+//!
+//! These can be used internally by functions in the libbitcoin_kernel library,
 //! but also used externally by node, wallet, and GUI code.
 //!
 //! This file is intended to define only simple types that do not have external
diff --git a/src/node/mining_types.h b/src/node/mining_types.h
index 6e4eb82aa9..319341f562 100644
--- a/src/node/mining_types.h
+++ b/src/node/mining_types.h
@@ -2,8 +2,11 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-//! @file node/mining_types.h is used externally by mining IPC clients, so it should
-//! only declare simple data definitions.
+//! @file
+//! @brief Simple data definitions used by mining IPC clients.
+//!
+//! This file is used externally by mining IPC clients, so it should only
+//! declare simple data definitions.
 //!
 //! Avoid declaring functions or classes with methods here unless they are
 //! header-only or provided by the util library.
diff --git a/src/node/types.h b/src/node/types.h
index 1003b42ca7..8e0bb29578 100644
--- a/src/node/types.h
+++ b/src/node/types.h
@@ -2,8 +2,10 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-//! @file node/types.h is a home for public enum and struct type definitions
-//! that are used internally by node code, but also used externally by wallet,
+//! @file
+//! @brief Home for public enum and struct type definitions.
+//!
+//! These are used internally by node code, but also used externally by wallet,
 //! mining or GUI code.
 //!
 //! This file is intended to define only simple types that do not have external
diff --git a/src/wallet/types.h b/src/wallet/types.h
index 6ba9a1dbde..0b565fc402 100644
--- a/src/wallet/types.h
+++ b/src/wallet/types.h
@@ -3,8 +3,10 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-//! @file wallet/types.h is a home for public enum and struct type definitions
-//! that are used by internally by wallet code, but also used externally by node
+//! @file
+//! @brief Home for public enum and struct type definitions.
+//!
+//! These are used internally by wallet code, but also used externally by node
 //! or GUI code.
 //!
 //! This file is intended to define only simple types that do not have external
> And these changes are real fixes for the Doxygen-generated docs rather than pure style changes. The `@file` instances I linked to (plus others) also need fixing. i.e master: <img width="1400" height="171" alt="master" src="https://git.fish.foo/attachments/bad130c8-0dc7-4cf5-8c65-b8200b893cb4" /> vs the below diff: <img width="1113" height="212" alt="diff" src="https://git.fish.foo/attachments/81415916-98e6-43fa-b676-fc0b2f1adc12" /> ```diff diff --git a/src/common/messages.h b/src/common/messages.h index 6a2752521f..eb9f19a77c 100644 --- a/src/common/messages.h +++ b/src/common/messages.h @@ -3,9 +3,11 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -//! @file common/messages.h is a home for simple string functions returning -//! descriptive messages that are used in RPC and GUI interfaces or log -//! messages, and are called in different parts of the codebase across +//! @file +//! @brief Home for simple string functions returning descriptive messages. +//! +//! The messages are used in RPC and GUI interfaces or log messages, and the +//! functions are called in different parts of the codebase across //! node/wallet/gui boundaries. #ifndef BITCOIN_COMMON_MESSAGES_H diff --git a/src/common/types.h b/src/common/types.h index 1ffcd392d6..e570089601 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -2,8 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -//! @file common/types.h is a home for simple enum and struct type definitions -//! that can be used internally by functions in the libbitcoin_common library, +//! @file +//! @brief Home for simple enum and struct type definitions. +//! +//! These can be used internally by functions in the libbitcoin_common library, //! but also used externally by node, wallet, and GUI code. //! //! This file is intended to define only simple types that do not have external diff --git a/src/ipc/types.h b/src/ipc/types.h index ac89a9bf43..f8ba2fb628 100644 --- a/src/ipc/types.h +++ b/src/ipc/types.h @@ -2,8 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -//! @file ipc/types.h is a home for public enum and struct type definitions -//! that are used internally by ipc code, but also used externally by wallet, +//! @file +//! @brief Home for public enum and struct type definitions. +//! +//! These are used internally by ipc code, but also used externally by wallet, //! mining or GUI code. //! //! This file is intended to define only simple types that do not have external diff --git a/src/kernel/types.h b/src/kernel/types.h index 164d4cfda8..6c5ee5b2d9 100644 --- a/src/kernel/types.h +++ b/src/kernel/types.h @@ -2,8 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -//! @file kernel/types.h is a home for simple enum and struct type definitions -//! that can be used internally by functions in the libbitcoin_kernel library, +//! @file +//! @brief Home for simple enum and struct type definitions. +//! +//! These can be used internally by functions in the libbitcoin_kernel library, //! but also used externally by node, wallet, and GUI code. //! //! This file is intended to define only simple types that do not have external diff --git a/src/node/mining_types.h b/src/node/mining_types.h index 6e4eb82aa9..319341f562 100644 --- a/src/node/mining_types.h +++ b/src/node/mining_types.h @@ -2,8 +2,11 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -//! @file node/mining_types.h is used externally by mining IPC clients, so it should -//! only declare simple data definitions. +//! @file +//! @brief Simple data definitions used by mining IPC clients. +//! +//! This file is used externally by mining IPC clients, so it should only +//! declare simple data definitions. //! //! Avoid declaring functions or classes with methods here unless they are //! header-only or provided by the util library. diff --git a/src/node/types.h b/src/node/types.h index 1003b42ca7..8e0bb29578 100644 --- a/src/node/types.h +++ b/src/node/types.h @@ -2,8 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -//! @file node/types.h is a home for public enum and struct type definitions -//! that are used internally by node code, but also used externally by wallet, +//! @file +//! @brief Home for public enum and struct type definitions. +//! +//! These are used internally by node code, but also used externally by wallet, //! mining or GUI code. //! //! This file is intended to define only simple types that do not have external diff --git a/src/wallet/types.h b/src/wallet/types.h index 6ba9a1dbde..0b565fc402 100644 --- a/src/wallet/types.h +++ b/src/wallet/types.h @@ -3,8 +3,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -//! @file wallet/types.h is a home for public enum and struct type definitions -//! that are used by internally by wallet code, but also used externally by node +//! @file +//! @brief Home for public enum and struct type definitions. +//! +//! These are used internally by wallet code, but also used externally by node //! or GUI code. //! //! This file is intended to define only simple types that do not have external ```
hebasto commented 2026-11-09 15:32:35 +00:00 (Migrated from github.com)

@fanquake

Thank you for the review! Your feedback has been addressed.

@fanquake Thank you for the review! Your feedback has been addressed.
fanquake commented 2026-11-09 16:41:31 +00:00 (Migrated from github.com)
ACK c4a68cc5ceb62ac160b7adc44ebf6388aa803ed5
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36815
No description provided.