Skip to content

Update handling of non number floating point values#317

Merged
vsanthanam merged 1 commit intomainfrom
vsanthanam/doubles
Jan 13, 2026
Merged

Update handling of non number floating point values#317
vsanthanam merged 1 commit intomainfrom
vsanthanam/doubles

Conversation

@vsanthanam
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

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

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: 2c6f422509

ℹ️ 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 on lines +76 to +80
switch storage {
case let .double(value):
value.isInfinite
case .int:
true
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Return false for integer isInfinite

JSON.Number.isInfinite currently returns true for .int storage, which makes every integer report as infinite. Any caller using isInfinite to filter out invalid numeric values (e.g., before serialization or validation) will incorrectly treat valid integers as invalid, changing behavior compared to previous versions. Integers are always finite, so this should return false for the .int case.

Useful? React with 👍 / 👎.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 13, 2026

Codecov Report

❌ Patch coverage is 10.00000% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.81%. Comparing base (1f6438a) to head (8329c1f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/JBirdCore/Models/Number.swift 0.00% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #317      +/-   ##
==========================================
- Coverage   95.34%   94.81%   -0.54%     
==========================================
  Files          35       35              
  Lines        2860     2874      +14     
==========================================
- Hits         2727     2725       -2     
- Misses        133      149      +16     
Flag Coverage Δ
llvm-cov 94.81% <10.00%> (-0.54%) ⬇️
swiftpm 94.81% <10.00%> (-0.54%) ⬇️

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.

@vsanthanam vsanthanam merged commit 52247d3 into main Jan 13, 2026
45 of 47 checks passed
@vsanthanam vsanthanam deleted the vsanthanam/doubles branch January 13, 2026 19:22
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.

1 participant