Antonboom / testifylint

The Golang linter that checks usage of github.com/stretchr/testify.
https://github.com/stretchr/testify
MIT License
98 stars 9 forks source link

float-compare: false positive not native float64 #150

Open mmorel-35 opened 3 months ago

mmorel-35 commented 3 months ago

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 commented 3 months ago

Good catch