Skip to content

Commit c42406a

Browse files
fix(deps): update module github.com/golangci/golangci-lint to v1.60.3 (#6039)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | `v1.60.2` -> `v1.60.3` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint/v1.60.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgolangci%2fgolangci-lint/v1.60.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgolangci%2fgolangci-lint/v1.60.2/v1.60.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint/v1.60.2/v1.60.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>golangci/golangci-lint (github.com/golangci/golangci-lint)</summary> ### [`v1.60.3`](https://togithub.com/golangci/golangci-lint/compare/v1.60.2...v1.60.3) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.60.2...v1.60.3) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tyler Yahn <[email protected]>
1 parent fd28620 commit c42406a

File tree

7 files changed

+14
-16
lines changed

7 files changed

+14
-16
lines changed

bridges/otelzap/encoder.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func (m *objectEncoder) AddUint16(k string, v uint16) {
175175
}
176176

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

181181
func (m *objectEncoder) AddUintptr(k string, v uintptr) {
@@ -272,10 +272,8 @@ func (a *arrayEncoder) AppendTime(v time.Time) { a.AppendInt64(v.UnixNan
272272
func (a *arrayEncoder) AppendUint(v uint) { a.AppendUint64(uint64(v)) }
273273
func (a *arrayEncoder) AppendUint32(v uint32) { a.AppendInt64(int64(v)) }
274274
func (a *arrayEncoder) AppendUint16(v uint16) { a.AppendInt64(int64(v)) }
275+
func (a *arrayEncoder) AppendUint8(v uint8) { a.AppendInt64(int64(v)) }
275276
func (a *arrayEncoder) AppendUintptr(v uintptr) { a.AppendUint64(uint64(v)) }
276-
func (a *arrayEncoder) AppendUint8(v uint8) {
277-
a.AppendInt64(int64(v)) // nolint: gosec // https://github.com/securego/gosec/issues/1185
278-
}
279277

280278
func convertValue(v interface{}) log.Value {
281279
switch v := v.(type) {

config/resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func keyVal(k string, v any) attribute.KeyValue {
2323
case int8:
2424
return attribute.Int64(k, int64(val))
2525
case uint8:
26-
return attribute.Int64(k, int64(val)) // nolint: gosec // https://github.com/securego/gosec/issues/1185
26+
return attribute.Int64(k, int64(val))
2727
case int16:
2828
return attribute.Int64(k, int64(val))
2929
case uint16:

samplers/probability/consistent/base2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ func splitProb(p float64) (uint8, uint8, float64) {
7070
highP := expToFloat64(-high)
7171
lowProb := (highP - p) / (highP - lowP)
7272

73-
return uint8(low), uint8(high), lowProb
73+
return uint8(low), uint8(high), lowProb // nolint: gosec // 8-bit sample.
7474
}

samplers/probability/consistent/sampler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func ProbabilityBased(fraction float64, opts ...ProbabilityBasedOption) sdktrace
100100
func (cs *consistentProbabilityBased) newR() uint8 {
101101
cs.lock.Lock()
102102
defer cs.lock.Unlock()
103-
return uint8(bits.LeadingZeros64(uint64(cs.rnd.Int63())) - 1)
103+
return uint8(bits.LeadingZeros64(uint64(cs.rnd.Int63())) - 1) // nolint: gosec // 8-bit sample.
104104
}
105105

106106
func (cs *consistentProbabilityBased) lowChoice() bool {
@@ -161,8 +161,8 @@ func (cs *consistentProbabilityBased) ShouldSample(p sdktrace.SamplingParameters
161161
func (cs *consistentProbabilityBased) Description() string {
162162
var prob float64
163163
if cs.lowLAC != pZeroValue {
164-
prob = cs.lowProb * expToFloat64(-int(cs.lowLAC)) // nolint: gosec // https://github.com/securego/gosec/issues/1185
165-
prob += (1 - cs.lowProb) * expToFloat64(-int(cs.highLAC)) // nolint: gosec // https://github.com/securego/gosec/issues/1185
164+
prob = cs.lowProb * expToFloat64(-int(cs.lowLAC))
165+
prob += (1 - cs.lowProb) * expToFloat64(-int(cs.highLAC))
166166
}
167167
return fmt.Sprintf("ProbabilityBased{%g}", prob)
168168
}

samplers/probability/consistent/tracestate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func parseNumber(key string, input string, maximum uint8) (uint8, error) {
199199
return maximum + 1, parseError(key, strconv.ErrRange)
200200
}
201201
// `value` is strictly less then the uint8 maximum. This cast is safe.
202-
return uint8(value), nil
202+
return uint8(value), nil // nolint: gosec
203203
}
204204

205205
func parseError(key string, err error) error {

tools/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exclude github.com/blizzy78/varnamelen v0.6.1
99
require (
1010
github.com/atombender/go-jsonschema v0.16.0
1111
github.com/client9/misspell v0.3.4
12-
github.com/golangci/golangci-lint v1.60.2
12+
github.com/golangci/golangci-lint v1.60.3
1313
github.com/jcchavezs/porto v0.6.0
1414
github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad
1515
go.opentelemetry.io/build-tools/crosslink v0.14.0
@@ -164,7 +164,7 @@ require (
164164
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
165165
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
166166
github.com/sashamelentyev/usestdlibvars v1.27.0 // indirect
167-
github.com/securego/gosec/v2 v2.20.1-0.20240820084340-81cda2f91fbe // indirect
167+
github.com/securego/gosec/v2 v2.20.1-0.20240822074752-ab3f6c1c83a0 // indirect
168168
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
169169
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
170170
github.com/sirupsen/logrus v1.9.3 // indirect

tools/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9
180180
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk=
181181
github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 h1:/1322Qns6BtQxUZDTAT4SdcoxknUki7IAoK4SAXr8ME=
182182
github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9/go.mod h1:Oesb/0uFAyWoaw1U1qS5zyjCg5NP9C9iwjnI4tIsXEE=
183-
github.com/golangci/golangci-lint v1.60.2 h1:Y8aWnZCMOLY5T7Ga5hcoemyKsZZJCUmIIK3xTD3jIhc=
184-
github.com/golangci/golangci-lint v1.60.2/go.mod h1:4UvjLpOJoQSvmyWkmO1urDR3txhL9R9sn4oM/evJ95g=
183+
github.com/golangci/golangci-lint v1.60.3 h1:l38A5de24ZeDlcFF+EB7m3W5joPD99/hS5SIHJPyZa0=
184+
github.com/golangci/golangci-lint v1.60.3/go.mod h1:J4vOpcjzRI+lDL2DKNGBZVB3EQSBfCBCMpaydWLtJNo=
185185
github.com/golangci/misspell v0.6.0 h1:JCle2HUTNWirNlDIAUO44hUsKhOFqGPoC4LZxlaSXDs=
186186
github.com/golangci/misspell v0.6.0/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo=
187187
github.com/golangci/modinfo v0.3.4 h1:oU5huX3fbxqQXdfspamej74DFX0kyGLkw1ppvXoJ8GA=
@@ -378,8 +378,8 @@ github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tM
378378
github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ=
379379
github.com/sashamelentyev/usestdlibvars v1.27.0 h1:t/3jZpSXtRPRf2xr0m63i32ZrusyurIGT9E5wAvXQnI=
380380
github.com/sashamelentyev/usestdlibvars v1.27.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8=
381-
github.com/securego/gosec/v2 v2.20.1-0.20240820084340-81cda2f91fbe h1:exdneYmXwZ4+VaIWv9mQ47uIHkTQSN50DYdCjXJ1cdQ=
382-
github.com/securego/gosec/v2 v2.20.1-0.20240820084340-81cda2f91fbe/go.mod h1:iyeMMRw8QEmueUSZ2VqmkQMiDyDcobfPnG00CV/NWdE=
381+
github.com/securego/gosec/v2 v2.20.1-0.20240822074752-ab3f6c1c83a0 h1:VqD4JMoqwuuCz8GZlBDsIDyE6K4YUsWJpbNtuOWHoFk=
382+
github.com/securego/gosec/v2 v2.20.1-0.20240822074752-ab3f6c1c83a0/go.mod h1:iyeMMRw8QEmueUSZ2VqmkQMiDyDcobfPnG00CV/NWdE=
383383
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
384384
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
385385
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU=

0 commit comments

Comments
 (0)