Skip to content

Fix FORMATVALUE widget for 64-bit integer values#2892

Merged
jmthomas merged 4 commits intomainfrom
format64
Feb 27, 2026
Merged

Fix FORMATVALUE widget for 64-bit integer values#2892
jmthomas merged 4 commits intomainfrom
format64

Conversation

@jmthomas
Copy link
Copy Markdown
Member

sprintf-js doesn't support BigInt values, causing format strings to be silently ignored for 64-bit integers. Add formatBigInt() to handle %d, %i, %u, %o, %x, %X specifiers with full precision. Also apply monospace font automatically for hex/octal format strings.

Screenshot 2026-02-26 at 8 27 41 PM

sprintf-js doesn't support BigInt values, causing format strings to be
silently ignored for 64-bit integers. Add formatBigInt() to handle
%d, %i, %u, %o, %x, %X specifiers with full precision. Also apply
monospace font automatically for hex/octal format strings.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.29%. Comparing base (19e909e) to head (8c6c82a).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2892      +/-   ##
==========================================
- Coverage   78.29%   78.29%   -0.01%     
==========================================
  Files         673      673              
  Lines       55118    55118              
  Branches      728      728              
==========================================
- Hits        43157    43156       -1     
- Misses      11883    11884       +1     
  Partials       78       78              
Flag Coverage Δ
python 79.34% <ø> (+<0.01%) ⬆️
ruby-api 80.24% <ø> (ø)
ruby-backend 82.16% <ø> (-0.01%) ⬇️

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.

@sonarqubecloud
Copy link
Copy Markdown

// Apply monospace font for hex/octal format strings so digits align
const formatString = this.parameters[3]
if (formatString && /%-?#?\d*[xXo]/.test(formatString)) {
this.appliedSettings.push(['RAW', 'font-family', 'monospace'])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@jmthomas jmthomas merged commit 86a9d54 into main Feb 27, 2026
49 of 51 checks passed
@jmthomas jmthomas deleted the format64 branch February 27, 2026 19:12
jmthomas added a commit that referenced this pull request Mar 21, 2026
Fix FORMATVALUE widget for 64-bit integer values
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