Skip to content

Commit

Permalink
fix(deps): update module github.com/golangci/golangci-lint to v1.60.3 (
Browse files Browse the repository at this point in the history
…#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]>
  • Loading branch information
renovate[bot] and MrAlias authored Aug 23, 2024
1 parent fd28620 commit c42406a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 16 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
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 @@ func parseNumber(key string, input string, maximum uint8) (uint8, error) {
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
}

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

0 comments on commit c42406a

Please sign in to comment.