Skip to content

feat: per-generator options#1235

Merged
alandefreitas merged 8 commits into
cppalliance:developfrom
alandefreitas:feat/per-generator-options
Jun 19, 2026
Merged

feat: per-generator options#1235
alandefreitas merged 8 commits into
cppalliance:developfrom
alandefreitas:feat/per-generator-options

Conversation

@alandefreitas

Copy link
Copy Markdown
Collaborator

This change lets each generator carry its own options that take precedence over the shared ones, so a single run can, for example, send the HTML and XML outputs to different destinations or apply different settings. This is used in CI, where we generate demos in multiple formats, allowing generators to reuse the extraction step. The feature looked small, but reaching it meant first fixing a handful of inconsistencies and bugs in the surrounding code. Fixes #762.

Changes

The generators now share a single entry point, so options and output paths resolve the same way whether one generator runs or several. Getting there also required implementing command-line overrides to access nested settings, pinning the CMake build directory to a fixed location and inspecting it after a failed configure, and refactoring the test runner to run reproducibly from a suite-root marker, one generator at a time.

Testing

New unit tests cover command-line override parsing, and the golden suite now runs each generator on its own, so per-generator behavior stays covered on every build.

Documentation

The configuration reference has been updated to include entries for the per-generator options and the new CMake build-directory option.

@github-actions

github-actions Bot commented Jun 19, 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 51% 1943 1218 725 31 3 28 - -
🧪 Unit Tests 41% 1549 742 807 11 2 7 - 2
⚙️ CI 3% 104 64 40 3 - 3 - -
📄 Docs 2% 68 60 8 5 - 5 - -
🧰 Tooling 2% 61 59 2 2 - 2 - -
🏗️ Build 1% 45 15 30 1 - 1 - -
📚 Examples 1% 32 18 14 4 - 4 - -
🥇 Golden Tests <1% 7 7 - 2 1 1 - -
Total 100% 3809 2183 1626 59 6 51 - 2

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

🔝 Top Files

  • src/test/TestRunner.cpp (Unit Tests): 583 lines Δ (+322 / -261)
  • src/lib/CompilationDatabaseBuilder.cpp (Source): 395 lines Δ (+264 / -131)
  • src/test/Support/Comparison.cpp (Unit Tests): 318 lines Δ (+127 / -191)

Generated by 🚫 dangerJS against fb0c7db

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.16%. Comparing base (b014649) to head (fb0c7db).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1235      +/-   ##
===========================================
+ Coverage    78.82%   83.16%   +4.34%     
===========================================
  Files          346       35     -311     
  Lines        35798     3658   -32140     
  Branches      7240      843    -6397     
===========================================
- Hits         28216     3042   -25174     
+ Misses        4938      409    -4529     
+ Partials      2644      207    -2437     
Flag Coverage Δ
bootstrap 83.16% <ø> (ø)
cpp ?

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.

The push trigger filtered branches with '*', which does not match a
'/' in a branch name, so slashed branches like feat/x never built on
push. Use '**' so any branch builds on push.
@alandefreitas alandefreitas force-pushed the feat/per-generator-options branch from 27eb7d0 to fb0c7db Compare June 19, 2026 02:49
@cppalliance-bot

cppalliance-bot commented Jun 19, 2026

Copy link
Copy Markdown

An automated preview of the documentation is available at https://1235.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-19 03:00:35 UTC

@alandefreitas alandefreitas added this pull request to the merge queue Jun 19, 2026
Merged via the queue into cppalliance:develop with commit 64cfdbd Jun 19, 2026
30 checks passed
@alandefreitas alandefreitas deleted the feat/per-generator-options branch June 19, 2026 21:59
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.

Easier debugging when using cmake commands generated by mrdocs

2 participants