Skip to content

fix: use if/else instead of or helper for array bounds rendering#1174

Open
gennaroprota wants to merge 1 commit intocppalliance:developfrom
gennaroprota:fix/rendering_of_arrays_with_unknown_bounds
Open

fix: use if/else instead of or helper for array bounds rendering#1174
gennaroprota wants to merge 1 commit intocppalliance:developfrom
gennaroprota:fix/rendering_of_arrays_with_unknown_bounds

Conversation

@gennaroprota
Copy link
Copy Markdown
Collaborator

@gennaroprota gennaroprota commented Apr 9, 2026

The Handlebars or helper returns the boolean false when both arguments are falsy, which renders as the literal text "false" inside array brackets (e.g. int arr[false]). Replace {{or boundsValue boundsExpr}} with an explicit {{#if}}/{{else}} so that empty bounds render as [].

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

⚠️ Warnings

Warning

Add a brief note about how this change was tested (or why tests are not needed).

Warning

Source changed but no tests or fixtures were updated.

🧾 Changes by Scope

Scope Lines Δ% Lines Δ Lines + Lines - Files Δ Files + Files ~ Files ↔ Files -
🛠️ Source 100% 2 1 1 1 - 1 - -
Total 100% 2 1 1 1 - 1 - -

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

🔝 Top Files

  • share/mrdocs/addons/generator/common/partials/type/declarator-suffix.hbs (Source): 2 lines Δ (+1 / -1)

Generated by 🚫 dangerJS against e0e18ea

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.12%. Comparing base (7e73057) to head (e0e18ea).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1174   +/-   ##
========================================
  Coverage    82.12%   82.12%           
========================================
  Files           33       33           
  Lines         3149     3149           
  Branches       734      734           
========================================
  Hits          2586     2586           
  Misses         387      387           
  Partials       176      176           
Flag Coverage Δ
bootstrap 82.12% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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

cppalliance-bot commented Apr 9, 2026

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

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

2026-05-07 12:57:05 UTC

The Handlebars `or` helper returns the boolean `false` when both
arguments are falsy, which renders as the literal text "false" inside
array brackets (e.g. `int arr[false]`). Replace
`{{or boundsValue boundsExpr}}` with an explicit `{{#if}}`/`{{else}}` so
that empty bounds render as `[]`.
@gennaroprota gennaroprota force-pushed the fix/rendering_of_arrays_with_unknown_bounds branch from 40cbaeb to e0e18ea Compare May 7, 2026 12:41
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.

2 participants