Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

float-compare: false positive not native float64 #150

Open
mmorel-35 opened this issue Jun 22, 2024 · 1 comment
Open

float-compare: false positive not native float64 #150

mmorel-35 opened this issue Jun 22, 2024 · 1 comment
Labels
false-positive Checker's false positive example

Comments

@mmorel-35
Copy link

While applying float-compare on https://github.com/prometheus/prometheus/pull/14334/files#diff-7c1dfea5c568897587621510c04d322f908a8ed40751e592d63d2f8422b6a78dR5926

I had deactivate testifylint here because it suggest to use InDelta here but once applied there is an error saying

Parameters must be numerical

This is due to SampleValue not being a native float64
https://github.com/prometheus/common/blob/ab322ea2c291549d457c23476304ed16a4d814a3/model/value_float.go#L32

@ccoVeille
Copy link
Contributor

Good catch

@Antonboom Antonboom added the false-positive Checker's false positive example label Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
false-positive Checker's false positive example
Projects
None yet
Development

No branches or pull requests

3 participants