Skip to content

Conversation

@michaelnebel
Copy link
Contributor

The precision of the query has been increased to high. Even though comparing floats in many cases yield correct results, it should generally be avoided. If exact comparison is needed, decimal should be used instead.

@michaelnebel michaelnebel marked this pull request as ready for review April 28, 2025 12:08
Copilot AI review requested due to automatic review settings April 28, 2025 12:08
@michaelnebel michaelnebel requested a review from a team as a code owner April 28, 2025 12:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR increases the precision of the cs/equality-on-floats query from medium to high by updating the change notes.

  • Introduces a new change note file outlining the precision update
  • Categorizes the change as a minor analysis update
Files not reviewed (3)
  • csharp/ql/integration-tests/posix/query-suite/csharp-code-quality.qls.expected: Language not supported
  • csharp/ql/src/Likely Bugs/EqualityCheckOnFloats.ql: Language not supported
  • csharp/ql/src/codeql-suites/csharp-code-quality.qls: Language not supported

@michaelnebel
Copy link
Contributor Author

DCA looks good, but the experiment failed to start for ASP.NET (traced). I tried running the query locally for this repo and the alerts look good (and there doesn't appear to be any issues with performance either).

@michaelnebel michaelnebel merged commit e5d2961 into github:main Apr 29, 2025
25 checks passed
@michaelnebel michaelnebel deleted the csharp/equality-on-floats branch April 29, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants