Skip to content

docs: add a Doxygen compatibility page - #1372

Open
gennaroprota wants to merge 5 commits into
cppalliance:developfrom
gennaroprota:docs/doxygen_compatibility_page
Open

gennaroprota wants to merge 5 commits into
cppalliance:developfrom
gennaroprota:docs/doxygen_compatibility_page

Conversation

@gennaroprota

Copy link
Copy Markdown
Collaborator

This PR is stacked on #1371, whose commits it shows until that PR lands; only the last two commits, "docs: correct what the docs say about the brief, see-below and untitled headings" and "docs: add a Doxygen compatibility page", belong to it.

A project migrating from Doxygen couldn't tell which of its commands MrDocs honors, and many are ignored without a warning: some lose their text, others publish text the author meant to hide. A new page under Commands lists every Doxygen command by family, with its status (supported, a different idiom, or not supported), what happens to its text, and the issue that tracks it where there is one, plus the comment styles MrDocs accepts and the options that replace Doxygen markup.

Writing it showed that several docs described the brief as the first sentence of a doc comment, while MrDocs takes the whole first paragraph. The first commit corrects them, along with the @seebelow placeholder (/* see-below */) and what an untitled @par produces.

Changes

  • Build: the auto-brief option's description says "first paragraph" and lists the commands that set a brief when it is off; the config schema follows.
  • Golden tests: the auto-brief snippet's text says "first paragraph".
  • CI: the registry check also checks the page: its Supported rows must be exactly the commands the parser handles.

Testing

The page check runs in CI with the other registry checks, so a command that starts or stops being handled fails it until its row is updated. The \cond row is one: it changes when #1367 lands.

Documentation

New page commands/doxygen.adoc, linked from the nav, the commands overview and the migration notes. Corrected: the auto-brief option, configuration/extraction.adoc, commands/metadata.adoc, migration-notes.adoc and the commands registry.

Fixes #1342.

The commands reference documents `@sa` as an alias of `@see` and `@arg`
as an alias of `@li`, but the doc-comment extractor handled neither.
Clang gives each of them its own command ID, which reached the branch
that ignores unhandled block commands, so the paragraph after the
command disappeared without a warning. We now handle them in the same
`case` as `@see` and `@li`.
…ence

The commands registry, from which the commands reference is generated,
documented three forms that don't work. `@link <name> ... @endlink` is a
verbatim block in Clang's command table that only HeaderDoc's `@/link`
closes, so everything after `@link` becomes a code block. `@strong` is
not a command, so `@strong word` renders as the text "strong word". And
the quoted text in `@ref <name> "text"` is printed literally after the
link. We now document none of them, and the Cross-reference entry says
to write `@ref <name>` in place of `@link`.

The registry also gains `@dot`, `@msc` and `@startuml`, which the parser
already renders as code blocks, and the Footnote Definition and Math
Block entries now point to the examples that already show them.
utils/docs/check_commands_registry.py is meant to keep the commands
registry in sync with the doc-comment parser, but no CI job ran it, and
it had fallen out of step with the registry: it still expected the
`node_types` and `preview` fields and the example locations of an
earlier layout, and failed with 181 problems, nearly all of them false.
We now run it in the utility tests job, with its checks updated to the
registry's current shape.

It also checked only one direction, that every command the parser
handles is documented, which let the registry document `@sa`, `@arg`,
`@strong` and `@link` while the parser ignored them. It now also checks
that every command a documented syntax names is one the parser handles.
…ed headings

The `auto-brief` option, the configuration and commands pages and the
commands registry said that the first sentence of a doc comment becomes
its brief, but we take the whole first paragraph. They now say so, as
does the `auto-brief` example, and the option's description lists the
commands that still set a brief when it is off. Likewise, the synopsis
placeholder of a `@seebelow` symbol is `/* see-below */`, not `/* see
below */`, and a `@par` with no title takes the first line of its body
as the heading, where the registry said it emitted none.
A project migrating from Doxygen had no way to tell which of its
commands MrDocs honors short of reading the parser, and many of them are
ignored without a warning: some lose their text, others publish text the
author meant to hide. The new page lists every Doxygen command by
family, with its status, what happens to its text, and the issue that
tracks it where there is one. It also lists the comment styles MrDocs
accepts and the configuration options that replace Doxygen markup.

The commands registry check now also compares the page with the parser,
so a command that starts or stops being handled fails CI until its row
says so.

Fixes cppalliance#1342.
@github-actions

Copy link
Copy Markdown
Contributor

✨ Highlights

  • 🧪 Existing golden tests changed (behavior likely shifted)

🧾 Changes by Scope

Scope Lines Δ% Lines Δ Lines + Lines - Files Δ Files + Files ~ Files ↔ Files -
🧰 Tooling 35% 577 420 157 1 - 1 - -
📄 Docs 34% 570 544 26 8 1 7 - -
🥇 Golden Tests 30% 503 501 2 8 6 2 - -
🛠️ Source <1% 8 5 3 3 - 3 - -
⚙️ CI <1% 3 3 - 1 - 1 - -
Total 100% 1661 1473 188 21 7 14 - -

Legend: Files + (added), Files ~ (modified), Files ↔ (renamed), Files - (removed)

🔝 Top Files

  • utils/docs/check_commands_registry.py (Tooling): 577 lines Δ (+420 / -157)
  • docs/modules/ROOT/pages/commands/doxygen.adoc (Docs): 515 lines Δ (+515 / -0)
  • tests/golden/fixtures/javadoc/see/sa.xml (Golden Tests): 211 lines Δ (+211 / -0)

Generated by 🚫 dangerJS against e6904aa

@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.21%. Comparing base (9faf2d7) to head (e6904aa).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1372   +/-   ##
========================================
  Coverage    83.21%   83.21%           
========================================
  Files           35       35           
  Lines         3670     3670           
  Branches       845      845           
========================================
  Hits          3054     3054           
  Misses         410      410           
  Partials       206      206           
Flag Coverage Δ
bootstrap 83.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://1372.mrdocs.prtest2.cppalliance.org/index.html

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

2026-10-30 11:04:45 UTC

This branch has not been deployed

No deployments
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.

docs: Doxygen compatibility page listing what MrDocs does not support

2 participants