Skip to content

docs(api): drop @brief where it is the only description - #841

Merged
andiwand merged 1 commit into
mainfrom
docs/drop-redundant-brief
Sep 6, 2026
Merged

docs(api): drop @brief where it is the only description#841
andiwand merged 1 commit into
mainfrom
docs/drop-redundant-brief

Conversation

@andiwand

@andiwand andiwand commented Sep 6, 2026

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Stacked on #840 — the tip of the v7 series, so it applies cleanly. Docs
only; no signature moves.

The argument, and the numbers behind it

@brief marks a short description off from a detailed one. Where there is no
detailed one, it marks nothing — it is ceremony in front of the only sentence
there is. Counting the public headers:

@brief with nothing under it 186
@brief with a real detail paragraph 19
blocks with no @brief at all 65

Two things that count settles. The tag was never applied consistently — a
quarter of the blocks already went without it — and there is no Doxyfile
anywhere in the repo
, so nothing is consuming the brief/detail distinction
today anyway.

-/// @brief File not found exception
+/// File not found exception
 struct FileNotFound final : Exception {

The 19 that earn it keep it, and they all look like this:

/// @brief How to decode a file.
///
/// Every field is optional; the default detects everything. @ref as_file_type
/// skips detection outright, @ref file_type_priority only reorders what
/// detection found.

AGENTS.md gets the rule so it stays settled: write the description plainly;
add @brief at the moment a second paragraph arrives.

Wrapping

Stripping seven characters off a first line leaves a multi-line paragraph
wrapped narrower than it needs to be, and ReflowComments does not
re-justify — it only breaks lines that overflow. So the ten affected paragraphs
are rewrapped by hand. Measured both ways: 32 paragraphs could pull a word up
before this change and 32 after
, so it introduces no ragged wrapping.

Something the tag was hiding

With @brief gone, filesystem.hpp reads:

/// FileWalker class
class FileWalker {

14 comments are pure tautology — the declaration's own name restated:
/// Represents a document on class Document, /// Represents a text file
on class TextFile, and so on. AGENTS.md already says "Don't restate the
code"
, so they arguably all want deleting.

I have not touched them here — that is a content change, not this one, and
deleting fourteen doc comments deserves its own review. They read no worse than
they did with the tag on. Say the word and it is a two-minute follow-up.

Verified

Full build clean, no new warnings; 113 targeted gtests pass. Nothing outside
comments changed — the diff is 186 tag removals plus the rewraps.

@andiwand
andiwand force-pushed the test/pin-enum-ordinals branch from 5316deb to 8ad4ad0 Compare September 6, 2026 14:26
Base automatically changed from test/pin-enum-ordinals to main September 6, 2026 14:28
196 doc comments in the public headers opened with @brief and 174 of them had
nothing under it, so the tag marked nothing off from anything - it read as
ceremony rather than structure. 68 blocks already went without it, so the
headers were inconsistent about it too, and there is no Doxyfile in the tree
for the distinction to feed.

The 22 that do carry a detail paragraph keep it, which is the line the rule
added to AGENTS.md draws: write the description plainly, add @brief at the
moment a second paragraph arrives.

Paragraphs whose first line lost the seven characters are rewrapped, so the
change adds no ragged wrapping.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012QiYawTVZyuMLQBQngdTeu
@andiwand
andiwand force-pushed the docs/drop-redundant-brief branch from ccea59a to 15c4301 Compare September 6, 2026 14:34
@andiwand
andiwand merged commit 269509b into main Sep 6, 2026
23 checks passed
@andiwand
andiwand deleted the docs/drop-redundant-brief branch September 6, 2026 14:35
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