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

fix(deps): update module github.com/golangci/golangci-lint to v1.60.3 #6039

Merged
merged 3 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion samplers/probability/consistent/base2.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ func splitProb(p float64) (uint8, uint8, float64) {
highP := expToFloat64(-high)
lowProb := (highP - p) / (highP - lowP)

return uint8(low), uint8(high), lowProb
return uint8(low), uint8(high), lowProb // nolint: gosec // 8-bit sample.
}
6 changes: 3 additions & 3 deletions samplers/probability/consistent/sampler.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func ProbabilityBased(fraction float64, opts ...ProbabilityBasedOption) sdktrace
func (cs *consistentProbabilityBased) newR() uint8 {
cs.lock.Lock()
defer cs.lock.Unlock()
return uint8(bits.LeadingZeros64(uint64(cs.rnd.Int63())) - 1)
return uint8(bits.LeadingZeros64(uint64(cs.rnd.Int63())) - 1) // nolint: gosec // 8-bit sample.
}

func (cs *consistentProbabilityBased) lowChoice() bool {
Expand Down 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)
}
2 changes: 1 addition & 1 deletion samplers/probability/consistent/tracestate.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
return maximum + 1, parseError(key, strconv.ErrRange)
}
// `value` is strictly less then the uint8 maximum. This cast is safe.
return uint8(value), nil
return uint8(value), nil // nolint: gosec
Dismissed Show dismissed Hide dismissed
}

func parseError(key string, err error) error {
Expand Down
4 changes: 2 additions & 2 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exclude github.com/blizzy78/varnamelen v0.6.1
require (
github.com/atombender/go-jsonschema v0.16.0
github.com/client9/misspell v0.3.4
github.com/golangci/golangci-lint v1.60.2
github.com/golangci/golangci-lint v1.60.3
github.com/jcchavezs/porto v0.6.0
github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad
go.opentelemetry.io/build-tools/crosslink v0.14.0
Expand Down Expand Up @@ -164,7 +164,7 @@ require (
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.27.0 // indirect
github.com/securego/gosec/v2 v2.20.1-0.20240820084340-81cda2f91fbe // indirect
github.com/securego/gosec/v2 v2.20.1-0.20240822074752-ab3f6c1c83a0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
Expand Down
8 changes: 4 additions & 4 deletions tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk=
github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 h1:/1322Qns6BtQxUZDTAT4SdcoxknUki7IAoK4SAXr8ME=
github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9/go.mod h1:Oesb/0uFAyWoaw1U1qS5zyjCg5NP9C9iwjnI4tIsXEE=
github.com/golangci/golangci-lint v1.60.2 h1:Y8aWnZCMOLY5T7Ga5hcoemyKsZZJCUmIIK3xTD3jIhc=
github.com/golangci/golangci-lint v1.60.2/go.mod h1:4UvjLpOJoQSvmyWkmO1urDR3txhL9R9sn4oM/evJ95g=
github.com/golangci/golangci-lint v1.60.3 h1:l38A5de24ZeDlcFF+EB7m3W5joPD99/hS5SIHJPyZa0=
github.com/golangci/golangci-lint v1.60.3/go.mod h1:J4vOpcjzRI+lDL2DKNGBZVB3EQSBfCBCMpaydWLtJNo=
github.com/golangci/misspell v0.6.0 h1:JCle2HUTNWirNlDIAUO44hUsKhOFqGPoC4LZxlaSXDs=
github.com/golangci/misspell v0.6.0/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo=
github.com/golangci/modinfo v0.3.4 h1:oU5huX3fbxqQXdfspamej74DFX0kyGLkw1ppvXoJ8GA=
Expand Down Expand Up @@ -378,8 +378,8 @@ github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tM
github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ=
github.com/sashamelentyev/usestdlibvars v1.27.0 h1:t/3jZpSXtRPRf2xr0m63i32ZrusyurIGT9E5wAvXQnI=
github.com/sashamelentyev/usestdlibvars v1.27.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8=
github.com/securego/gosec/v2 v2.20.1-0.20240820084340-81cda2f91fbe h1:exdneYmXwZ4+VaIWv9mQ47uIHkTQSN50DYdCjXJ1cdQ=
github.com/securego/gosec/v2 v2.20.1-0.20240820084340-81cda2f91fbe/go.mod h1:iyeMMRw8QEmueUSZ2VqmkQMiDyDcobfPnG00CV/NWdE=
github.com/securego/gosec/v2 v2.20.1-0.20240822074752-ab3f6c1c83a0 h1:VqD4JMoqwuuCz8GZlBDsIDyE6K4YUsWJpbNtuOWHoFk=
github.com/securego/gosec/v2 v2.20.1-0.20240822074752-ab3f6c1c83a0/go.mod h1:iyeMMRw8QEmueUSZ2VqmkQMiDyDcobfPnG00CV/NWdE=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU=
Expand Down
Loading