Skip to content

docs: give doc code one shared header and one namespace style - #390

Merged
mvandeberg merged 1 commit into
cppalliance:developfrom
mvandeberg:pr/doc-code-cleanup
Aug 27, 2026
Merged

docs: give doc code one shared header and one namespace style#390
mvandeberg merged 1 commit into
cppalliance:developfrom
mvandeberg:pr/doc-code-cleanup

Conversation

@mvandeberg

Copy link
Copy Markdown
Contributor

Every file under test/doc/ opened with the same 24-line warning-suppression preamble -- 105 copies of it, byte for byte -- and most carried both namespace capy = boost::capy; and using namespace boost::capy;, where the directive supersedes the alias and makes the alias dead text.

The preamble now lives in test/doc/doc_warnings.hpp, included once per file outside every tag:: region. Three files kept a warning of their own, each under a comment saying why.

The using-directives are gone and every capy name in a doc fragment is spelled capy::, so a reader can tell which names in an example come from the library. example/ already read this way; test/doc now matches it.

-Werror does not finish this conversion on its own: write, read, when_all, when_any, run_async and the make_buffer overloads are ordinary free function templates, so ADL keeps finding them unqualified once a call has a capy-typed argument. Those were found by sweeping the tree against the symbol list MrDocs publishes, not by the compiler. A second class the compiler cannot see is the using-declaration -- using capy::task; in scaffolding feeds a bare name into a tagged region that renders on a page; nine of those are gone too.

Eight fragments rendered a using-directive on the site; those show the alias instead. The inline pseudocode blocks on 7a.drivers, 4b.launching and 5a.buffers contradicted the fragments beside them and are qualified to match. make_error_code was spelled three ways across the docs and now names its owner at every call site.

Blocks that verbatim-quote library-internal source keep that source's own unqualified spelling, since inside namespace boost::capy that is what the library actually says.

The convention is recorded in doc/STYLE_GUIDE.md as B5, enforced by review only -- no gate.

Closes #387

Every file under test/doc/ opened with the same 24-line warning-suppression
preamble -- 105 copies of it, byte for byte -- and most carried both
`namespace capy = boost::capy;` and `using namespace boost::capy;`, where the
directive supersedes the alias and makes the alias dead text.

The preamble now lives in test/doc/doc_warnings.hpp, included once per file
outside every tag:: region. Three files kept a warning of their own, each under
a comment saying why.

The using-directives are gone and every capy name in a doc fragment is spelled
capy::, so a reader can tell which names in an example come from the library.
example/ already read this way; test/doc now matches it.

-Werror does not finish this conversion on its own: write, read, when_all,
when_any, run_async and the make_buffer overloads are ordinary free function
templates, so ADL keeps finding them unqualified once a call has a capy-typed
argument. Those were found by sweeping the tree against the symbol list MrDocs
publishes, not by the compiler. A second class the compiler cannot see is the
using-declaration -- `using capy::task;` in scaffolding feeds a bare name into
a tagged region that renders on a page; nine of those are gone too.

Eight fragments rendered a using-directive on the site; those show the alias
instead. The inline pseudocode blocks on 7a.drivers, 4b.launching and
5a.buffers contradicted the fragments beside them and are qualified to match.
make_error_code was spelled three ways across the docs and now names its owner
at every call site.

Blocks that verbatim-quote library-internal source keep that source's own
unqualified spelling, since inside namespace boost::capy that is what the
library actually says.

The convention is recorded in doc/STYLE_GUIDE.md as B5, enforced by review
only -- no gate.

Closes cppalliance#387
@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://390.capy.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-08-27 16:10:37 UTC

@cppalliance-bot

Copy link
Copy Markdown

GCOVR code coverage report https://390.capy.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://390.capy.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://390.capy.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-08-27 16:23:57 UTC

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.14%. Comparing base (44f55b1) to head (050e42d).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #390      +/-   ##
===========================================
+ Coverage    98.09%   98.14%   +0.04%     
===========================================
  Files          130      130              
  Lines         6291     6291              
===========================================
+ Hits          6171     6174       +3     
+ Misses         120      117       -3     
Flag Coverage Δ
linux 98.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44f55b1...050e42d. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mvandeberg
mvandeberg merged commit 1d82ad5 into cppalliance:develop Aug 27, 2026
39 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Beast2 Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Cleanup doc code

2 participants