JS-1686 Rule S1244 Floating point numbers should not be tested for equality#7119
Draft
sonar-nigel[bot] wants to merge 2 commits into
Draft
JS-1686 Rule S1244 Floating point numbers should not be tested for equality#7119sonar-nigel[bot] wants to merge 2 commits into
sonar-nigel[bot] wants to merge 2 commits into
Conversation
added 2 commits
May 28, 2026 13:03
Detect exact equality and inequality checks on floating-point-sensitive expressions, including indirect comparisons and exact assertion APIs.
Preserve BinaryExpression narrowing for indirect comparison operands by storing logical operands in locals before applying the comparison type guard. This fixes the TypeScript compile error while keeping the S1244 detection algorithm unchanged.
Agentic Analysis: Early ResultsAgentic Analysis and Context Augmentation are available on your project. Here are some issues that could have been prevented. Follow the links to learn how to put them into action. 2 issue(s) found across 1 file(s):
Analyzed by SonarQube Agentic Analysis in 3.1 s |
Contributor
Ruling Report✅ No changes to ruling expected issues in this PR |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Implements JavaScript/TypeScript rule S1244 to detect exact equality and inequality checks on floating-point-sensitive expressions.