Skip to content

Commit

Permalink
Remove lint ignores
Browse files Browse the repository at this point in the history
Bug has been fixed.
  • Loading branch information
MrAlias committed Aug 23, 2024
1 parent ff7ae8a commit d848ea0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions bridges/otelzap/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (m *objectEncoder) AddUint16(k string, v uint16) {
}

func (m *objectEncoder) AddUint8(k string, v uint8) {
m.AddInt64(k, int64(v)) // nolint: gosec // https://github.com/securego/gosec/issues/1185
m.AddInt64(k, int64(v))
}

func (m *objectEncoder) AddUintptr(k string, v uintptr) {
Expand Down Expand Up @@ -272,10 +272,8 @@ func (a *arrayEncoder) AppendTime(v time.Time) { a.AppendInt64(v.UnixNan
func (a *arrayEncoder) AppendUint(v uint) { a.AppendUint64(uint64(v)) }
func (a *arrayEncoder) AppendUint32(v uint32) { a.AppendInt64(int64(v)) }
func (a *arrayEncoder) AppendUint16(v uint16) { a.AppendInt64(int64(v)) }
func (a *arrayEncoder) AppendUint8(v uint8) { a.AppendInt64(int64(v)) }
func (a *arrayEncoder) AppendUintptr(v uintptr) { a.AppendUint64(uint64(v)) }
func (a *arrayEncoder) AppendUint8(v uint8) {
a.AppendInt64(int64(v)) // nolint: gosec // https://github.com/securego/gosec/issues/1185
}

func convertValue(v interface{}) log.Value {
switch v := v.(type) {
Expand Down
2 changes: 1 addition & 1 deletion config/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func keyVal(k string, v any) attribute.KeyValue {
case int8:
return attribute.Int64(k, int64(val))
case uint8:
return attribute.Int64(k, int64(val)) // nolint: gosec // https://github.com/securego/gosec/issues/1185
return attribute.Int64(k, int64(val))
case int16:
return attribute.Int64(k, int64(val))
case uint16:
Expand Down
4 changes: 2 additions & 2 deletions samplers/probability/consistent/sampler.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ func (cs *consistentProbabilityBased) ShouldSample(p sdktrace.SamplingParameters
func (cs *consistentProbabilityBased) Description() string {
var prob float64
if cs.lowLAC != pZeroValue {
prob = cs.lowProb * expToFloat64(-int(cs.lowLAC)) // nolint: gosec // https://github.com/securego/gosec/issues/1185
prob += (1 - cs.lowProb) * expToFloat64(-int(cs.highLAC)) // nolint: gosec // https://github.com/securego/gosec/issues/1185
prob = cs.lowProb * expToFloat64(-int(cs.lowLAC))
prob += (1 - cs.lowProb) * expToFloat64(-int(cs.highLAC))
}
return fmt.Sprintf("ProbabilityBased{%g}", prob)
}

0 comments on commit d848ea0

Please sign in to comment.