Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_js_analyze): noPrecisionLoss correctly handle 1 digit ints #4087

Merged
merged 1 commit into from
Dec 22, 2022
Merged

fix(rome_js_analyze): noPrecisionLoss correctly handle 1 digit ints #4087

merged 1 commit into from
Dec 22, 2022

Conversation

Conaclos
Copy link
Contributor

@Conaclos Conaclos commented Dec 21, 2022

Summary

Fixes #4086.

The bug is due to a divergence between the Rust std formatting of floats and the rule's formatting.
Indeed, 1 is formatted to 5e0 by Rust's format!, while 1 is formatted to 5.e0 by the rule.
The fix aligns the rule's format to the Rsut format.

Test Plan

New unit test included.

Documentation

  • The PR requires documentation
  • I will create a new PR to update the documentation

@netlify
Copy link

netlify bot commented Dec 21, 2022

Deploy Preview for docs-rometools canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit d38a5b6
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/63a39a62e03caa0008bc8c0e

@ematipico ematipico merged commit f2c8f71 into rome:main Dec 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 noPrecisionLoss reports 1 digit integers
2 participants