Skip to content

feat: uniform attribute extraction#1237

Merged
alandefreitas merged 1 commit into
cppalliance:developfrom
alandefreitas:feat/document-attributes
Jun 22, 2026
Merged

feat: uniform attribute extraction#1237
alandefreitas merged 1 commit into
cppalliance:developfrom
alandefreitas:feat/document-attributes

Conversation

@alandefreitas

Copy link
Copy Markdown
Collaborator

Reads attributes for every kind of symbol and shows them in the generated pages. Before, it only read attributes on functions and variables, and a deprecated symbol gave no sign that it was deprecated. For other symbols, it showed nothing. Now every symbol carries its attributes, deprecated symbols get a notice with the message in an admonition, and attributes appear in signatures and member tables.

Fixes #1233.

Changes

In the source code, attributes now live on the common symbol base class. Each attribute now contains its name and all its arguments. The templates render them in each signature, add a deprecation notice, and tag deprecated entries in member tables the same way constructors are tagged. The output schema and the golden tests were updated to match.

Testing

New metadata fixtures cover attribute extraction for each symbol type. A new generator example renders the attributes to AsciiDoc and HTML.

Documentation

The data model reference section now describes the new attribute fields.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

✨ Highlights

  • 🧪 Existing golden tests changed (behavior likely shifted)

🧾 Changes by Scope

Scope Lines Δ% Lines Δ Lines + Lines - Files Δ Files + Files ~ Files ↔ Files -
🛠️ Source 48% 1315 1244 71 37 20 17 - -
🥇 Golden Tests 46% 1254 1239 15 21 14 7 - -
📄 Docs 3% 90 58 32 1 - 1 - -
🏗️ Build 2% 57 49 8 1 - 1 - -
🧪 Unit Tests 1% 16 12 4 1 - 1 - -
Total 100% 2732 2602 130 61 34 27 - -

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

🔝 Top Files

  • test-files/golden-tests/generator/hbs/attributes/attributes.adoc (Golden Tests): 357 lines Δ (+357 / -0)
  • test-files/golden-tests/generator/hbs/attributes/attributes.html (Golden Tests): 347 lines Δ (+347 / -0)
  • src/lib/AST/ASTVisitor.cpp (Source): 286 lines Δ (+268 / -18)

Generated by 🚫 dangerJS against 7b6cc4f

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.16%. Comparing base (64cfdbd) to head (7b6cc4f).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1237   +/-   ##
========================================
  Coverage    83.16%   83.16%           
========================================
  Files           35       35           
  Lines         3658     3658           
  Branches       843      843           
========================================
  Hits          3042     3042           
  Misses         409      409           
  Partials       207      207           
Flag Coverage Δ
bootstrap 83.16% <ø> (ø)

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b62ee704ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/AST/ASTVisitor.cpp Outdated
@cppalliance-bot

cppalliance-bot commented Jun 22, 2026

Copy link
Copy Markdown

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

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

2026-06-22 18:06:07 UTC

@alandefreitas alandefreitas force-pushed the feat/document-attributes branch from b62ee70 to 608432a Compare June 22, 2026 04:44
@gennaroprota

Copy link
Copy Markdown
Collaborator

Hi Alan, very good PR. I only left some minor comments. The most important one is about the duplication of IsNoReturn.

Comment thread docs/modules/ROOT/pages/extensions/dom-reference.adoc
Comment thread src/lib/AST/ASTVisitor.cpp
Comment thread include/mrdocs/Metadata/Symbol/Function.hpp
Comment thread src/lib/AST/ASTVisitor.cpp
@alandefreitas alandefreitas force-pushed the feat/document-attributes branch from 608432a to 7b6cc4f Compare June 22, 2026 17:58
@alandefreitas

Copy link
Copy Markdown
Collaborator Author

@gennaroprota I believe everything is handled. Thank you so much. Those were good comments. 🙏

@alandefreitas alandefreitas added this pull request to the merge queue Jun 22, 2026
Merged via the queue into cppalliance:develop with commit 8fe79f8 Jun 22, 2026
30 checks passed
@correaa

correaa commented Jun 22, 2026

Copy link
Copy Markdown

i am curious how this will look like in the produced docs.

@alandefreitas

alandefreitas commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

i am curious how this will look like in the produced docs.

Well... the golden tests already include all the possible variants.

@correaa

correaa commented Jun 22, 2026

Copy link
Copy Markdown

is there a link you can point to. or a screenshot?

@alandefreitas

Copy link
Copy Markdown
Collaborator Author

@correaa

correaa commented Jun 23, 2026

Copy link
Copy Markdown

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.

[[deprecated]] could be documented

4 participants