Antonboom / testifylint

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

float-compare: false positive not native float64 #150

Open mmorel-35 opened 5 months ago

mmorel-35 commented 5 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 5 months ago

Good catch