Skip to content

Commit eecd9fc

Browse files
chore(deps): update module github.com/golangci/golangci-lint/v2 to v2.6.1 (#14121)
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [github.com/golangci/golangci-lint/v2](https://redirect.github.com/golangci/golangci-lint) | `v2.5.0` -> `v2.6.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint%2fv2/v2.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint%2fv2/v2.5.0/v2.6.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>golangci/golangci-lint (github.com/golangci/golangci-lint/v2)</summary> ### [`v2.6.1`](https://redirect.github.com/golangci/golangci-lint/compare/v2.6.0...v2.6.1) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.6.0...v2.6.1) ### [`v2.6.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v260) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.5.0...v2.6.0) 1. New linters - Add `modernize` analyzer suite 2. Linters new features or changes - `arangolint`: from 0.2.0 to 0.3.1 - `dupword`: from 0.1.6 to 0.1.7 (new option `comments-only`) - `go-critic`: from 0.13.0 to 0.14.0 (new rules/checkers: `zeroByteRepeat`, `dupOption`) - `gofumpt`: from 0.9.1 to 0.9.2 ("clothe" naked returns is now controlled by the `extra-rules` option) - `perfsprint`: from 0.9.1 to 0.10.0 (new options: `concat-loop`, `loop-other-ops`) - `wsl`: from 5.2.0 to 5.3.0 3. Linters bug fixes - `dupword`: from 0.1.6 to 0.1.7 - `durationcheck`: from 0.0.10 to 0.0.11 - `exptostd`: from 0.4.4 to 0.4.5 - `fatcontext`: from 0.8.1 to 0.9.0 - `forbidigo`: from 2.1.0 to 2.3.0 - `ginkgolinter`: from 0.21.0 to 0.21.2 - `godoc-lint`: from 0.10.0 to 0.10.1 - `gomoddirectives`: from 0.7.0 to 0.7.1 - `gosec`: from 2.22.8 to 2.22.10 - `makezero`: from 2.0.1 to 2.1.0 - `nilerr`: from 0.1.1 to 0.1.2 - `paralleltest`: from 1.0.14 to 1.0.15 - `protogetter`: from 0.3.16 to 0.3.17 - `unparam`: from [`0df0534`](https://redirect.github.com/golangci/golangci-lint/commit/0df0534333a4) to [`5beb8c8`](https://redirect.github.com/golangci/golangci-lint/commit/5beb8c8f8f15) 4. Misc. - fix: ignore some files to hash the version for custom build </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), 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://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTkuNCIsInVwZGF0ZWRJblZlciI6IjQxLjE1OS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Signed-off-by: alex boten <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Boten <[email protected]>
1 parent 6374fac commit eecd9fc

File tree

8 files changed

+103
-101
lines changed

8 files changed

+103
-101
lines changed

cmd/mdatagen/internal/command.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,11 @@ func templatize(tmplFile string, md Metadata) *template.Template {
300300
"toCamelCase": func(s string) string {
301301
caser := cases.Title(language.English).String
302302
parts := strings.Split(s, "_")
303-
result := ""
303+
var result strings.Builder
304304
for _, part := range parts {
305-
result += caser(part)
305+
fmt.Fprintf(&result, "%s", caser(part))
306306
}
307-
return result
307+
return result.String()
308308
},
309309
"inc": func(i int) int { return i + 1 },
310310
"distroURL": distroURL,

exporter/debugexporter/internal/normal/metrics.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@ func writeHistogramDataPoints(metric pmetric.Metric) (lines []string) {
8383
dataPoint := metric.Histogram().DataPoints().At(i)
8484
dataPointAttributes := writeAttributes(dataPoint.Attributes())
8585

86-
var value string
87-
value = fmt.Sprintf("count=%d", dataPoint.Count())
86+
var value strings.Builder
87+
fmt.Fprintf(&value, "count=%d", dataPoint.Count())
8888
if dataPoint.HasSum() {
89-
value += fmt.Sprintf(" sum=%v", dataPoint.Sum())
89+
fmt.Fprintf(&value, " sum=%v", dataPoint.Sum())
9090
}
9191
if dataPoint.HasMin() {
92-
value += fmt.Sprintf(" min=%v", dataPoint.Min())
92+
fmt.Fprintf(&value, " min=%v", dataPoint.Min())
9393
}
9494
if dataPoint.HasMax() {
95-
value += fmt.Sprintf(" max=%v", dataPoint.Max())
95+
fmt.Fprintf(&value, " max=%v", dataPoint.Max())
9696
}
9797

9898
for bucketIndex := 0; bucketIndex < dataPoint.BucketCounts().Len(); bucketIndex++ {
@@ -101,10 +101,10 @@ func writeHistogramDataPoints(metric pmetric.Metric) (lines []string) {
101101
bucketBound = fmt.Sprintf("le%v=", dataPoint.ExplicitBounds().At(bucketIndex))
102102
}
103103
bucketCount := dataPoint.BucketCounts().At(bucketIndex)
104-
value += fmt.Sprintf(" %s%d", bucketBound, bucketCount)
104+
fmt.Fprintf(&value, " %s%d", bucketBound, bucketCount)
105105
}
106106

107-
dataPointLine := fmt.Sprintf("%s{%s} %s\n", metric.Name(), strings.Join(dataPointAttributes, ","), value)
107+
dataPointLine := fmt.Sprintf("%s{%s} %s\n", metric.Name(), strings.Join(dataPointAttributes, ","), value.String())
108108
lines = append(lines, dataPointLine)
109109
}
110110
return lines
@@ -140,16 +140,16 @@ func writeSummaryDataPoints(metric pmetric.Metric) (lines []string) {
140140
dataPoint := metric.Summary().DataPoints().At(i)
141141
dataPointAttributes := writeAttributes(dataPoint.Attributes())
142142

143-
var value string
144-
value = fmt.Sprintf("count=%d", dataPoint.Count())
145-
value += fmt.Sprintf(" sum=%f", dataPoint.Sum())
143+
var value strings.Builder
144+
fmt.Fprintf(&value, "count=%d", dataPoint.Count())
145+
fmt.Fprintf(&value, " sum=%f", dataPoint.Sum())
146146

147147
for quantileIndex := 0; quantileIndex < dataPoint.QuantileValues().Len(); quantileIndex++ {
148148
quantile := dataPoint.QuantileValues().At(quantileIndex)
149-
value += fmt.Sprintf(" q%v=%v", quantile.Quantile(), quantile.Value())
149+
fmt.Fprintf(&value, " q%v=%v", quantile.Quantile(), quantile.Value())
150150
}
151151

152-
dataPointLine := fmt.Sprintf("%s{%s} %s\n", metric.Name(), strings.Join(dataPointAttributes, ","), value)
152+
dataPointLine := fmt.Sprintf("%s{%s} %s\n", metric.Name(), strings.Join(dataPointAttributes, ","), value.String())
153153
lines = append(lines, dataPointLine)
154154
}
155155
return lines

internal/e2e/status_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"context"
88
"errors"
99
"fmt"
10+
"strings"
1011
"sync"
1112
"testing"
1213
"time"
@@ -157,12 +158,12 @@ func Test_ComponentStatusReporting_SharedInstance(t *testing.T) {
157158
}
158159
}
159160

160-
eventStr := ""
161+
var eventStr strings.Builder
161162
for i, e := range events {
162-
eventStr += fmt.Sprintf("%v,", e.Status())
163+
fmt.Fprintf(&eventStr, "%v,", e.Status())
163164
assert.Equal(t, expectedEvents[i].Status(), e.Status())
164165
}
165-
t.Logf("events received: %v", eventStr)
166+
t.Logf("events received: %v", eventStr.String())
166167
}
167168
}
168169

internal/tools/go.mod

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ require (
3131
dev.gaijin.team/go/exhaustruct/v4 v4.0.0 // indirect
3232
dev.gaijin.team/go/golib v0.6.0 // indirect
3333
github.com/4meepo/tagalign v1.4.3 // indirect
34-
github.com/Abirdcfly/dupword v0.1.6 // indirect
34+
github.com/Abirdcfly/dupword v0.1.7 // indirect
3535
github.com/AdminBenni/iota-mixing v1.0.0 // indirect
3636
github.com/AlwxSin/noinlineerr v1.0.5 // indirect
3737
github.com/Antonboom/errname v1.1.1 // indirect
3838
github.com/Antonboom/nilnil v1.1.1 // indirect
3939
github.com/Antonboom/testifylint v1.6.4 // indirect
4040
github.com/BurntSushi/toml v1.5.0 // indirect
4141
github.com/Djarvur/go-err113 v0.1.1 // indirect
42-
github.com/Masterminds/semver/v3 v3.3.1 // indirect
42+
github.com/Masterminds/semver/v3 v3.4.0 // indirect
4343
github.com/Microsoft/go-winio v0.6.2 // indirect
4444
github.com/MirrexOne/unqueryvet v1.2.1 // indirect
4545
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
@@ -52,24 +52,24 @@ require (
5252
github.com/alfatraining/structtag v1.0.0 // indirect
5353
github.com/alingse/asasalint v0.0.11 // indirect
5454
github.com/alingse/nilnesserr v0.2.0 // indirect
55-
github.com/ashanbrown/forbidigo/v2 v2.1.0 // indirect
56-
github.com/ashanbrown/makezero/v2 v2.0.1 // indirect
55+
github.com/ashanbrown/forbidigo/v2 v2.3.0 // indirect
56+
github.com/ashanbrown/makezero/v2 v2.1.0 // indirect
5757
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
5858
github.com/beorn7/perks v1.0.1 // indirect
5959
github.com/bitfield/gotestdox v0.2.2 // indirect
6060
github.com/bkielbasa/cyclop v1.2.3 // indirect
6161
github.com/blizzy78/varnamelen v0.8.0 // indirect
6262
github.com/bmatcuk/doublestar/v4 v4.9.1 // indirect
6363
github.com/bombsimon/wsl/v4 v4.7.0 // indirect
64-
github.com/bombsimon/wsl/v5 v5.2.0 // indirect
64+
github.com/bombsimon/wsl/v5 v5.3.0 // indirect
6565
github.com/breml/bidichk v0.3.3 // indirect
6666
github.com/breml/errchkjson v0.4.1 // indirect
6767
github.com/butuzov/ireturn v0.4.0 // indirect
6868
github.com/butuzov/mirror v1.3.0 // indirect
69-
github.com/catenacyber/perfsprint v0.9.1 // indirect
69+
github.com/catenacyber/perfsprint v0.10.0 // indirect
7070
github.com/ccojocar/zxcvbn-go v1.0.4 // indirect
7171
github.com/cespare/xxhash/v2 v2.3.0 // indirect
72-
github.com/charithe/durationcheck v0.0.10 // indirect
72+
github.com/charithe/durationcheck v0.0.11 // indirect
7373
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
7474
github.com/charmbracelet/lipgloss v1.1.0 // indirect
7575
github.com/charmbracelet/x/ansi v0.8.0 // indirect
@@ -93,8 +93,8 @@ require (
9393
github.com/firefart/nonamedreturns v1.0.6 // indirect
9494
github.com/fsnotify/fsnotify v1.9.0 // indirect
9595
github.com/fzipp/gocyclo v0.6.0 // indirect
96-
github.com/ghostiam/protogetter v0.3.16 // indirect
97-
github.com/go-critic/go-critic v0.13.0 // indirect
96+
github.com/ghostiam/protogetter v0.3.17 // indirect
97+
github.com/go-critic/go-critic v0.14.2 // indirect
9898
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
9999
github.com/go-git/go-billy/v5 v5.6.2 // indirect
100100
github.com/go-git/go-git/v5 v5.16.3 // indirect
@@ -111,17 +111,16 @@ require (
111111
github.com/gobwas/glob v0.2.3 // indirect
112112
github.com/goccy/go-json v0.10.5 // indirect
113113
github.com/goccy/go-yaml v1.18.0 // indirect
114-
github.com/godoc-lint/godoc-lint v0.10.0 // indirect
115-
github.com/gofrs/flock v0.12.1 // indirect
114+
github.com/godoc-lint/godoc-lint v0.10.1 // indirect
115+
github.com/gofrs/flock v0.13.0 // indirect
116116
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
117117
github.com/golangci/asciicheck v0.5.0 // indirect
118118
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
119119
github.com/golangci/go-printf-func-name v0.1.1 // indirect
120120
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
121-
github.com/golangci/golangci-lint/v2 v2.5.0 // indirect
121+
github.com/golangci/golangci-lint/v2 v2.6.1 // indirect
122122
github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 // indirect
123123
github.com/golangci/misspell v0.7.0 // indirect
124-
github.com/golangci/nilerr v0.0.0-20250918000102-015671e622fe // indirect
125124
github.com/golangci/plugin-module-register v0.1.2 // indirect
126125
github.com/golangci/revgrep v0.8.0 // indirect
127126
github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e // indirect
@@ -135,6 +134,7 @@ require (
135134
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
136135
github.com/gostaticanalysis/comment v1.5.0 // indirect
137136
github.com/gostaticanalysis/forcetypeassert v0.2.0 // indirect
137+
github.com/gostaticanalysis/nilerr v0.1.2 // indirect
138138
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
139139
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect
140140
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
@@ -151,17 +151,17 @@ require (
151151
github.com/kaptinlin/go-i18n v0.1.6 // indirect
152152
github.com/kaptinlin/jsonschema v0.4.12 // indirect
153153
github.com/kaptinlin/messageformat-go v0.4.0 // indirect
154-
github.com/karamaru-alpha/copyloopvar v1.2.1 // indirect
154+
github.com/karamaru-alpha/copyloopvar v1.2.2 // indirect
155155
github.com/kevinburke/ssh_config v1.4.0 // indirect
156156
github.com/kisielk/errcheck v1.9.0 // indirect
157157
github.com/kisielk/gotool v1.0.0 // indirect
158158
github.com/kkHAIKE/contextcheck v1.1.6 // indirect
159159
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
160160
github.com/kulti/thelper v0.7.1 // indirect
161-
github.com/kunwardeep/paralleltest v1.0.14 // indirect
161+
github.com/kunwardeep/paralleltest v1.0.15 // indirect
162162
github.com/lasiar/canonicalheader v1.1.2 // indirect
163-
github.com/ldez/exptostd v0.4.4 // indirect
164-
github.com/ldez/gomoddirectives v0.7.0 // indirect
163+
github.com/ldez/exptostd v0.4.5 // indirect
164+
github.com/ldez/gomoddirectives v0.7.1 // indirect
165165
github.com/ldez/grignotin v0.10.1 // indirect
166166
github.com/ldez/tagliatelle v0.7.2 // indirect
167167
github.com/ldez/usetesting v0.5.0 // indirect
@@ -185,7 +185,7 @@ require (
185185
github.com/nakabonne/nestif v0.3.1 // indirect
186186
github.com/nishanths/exhaustive v0.12.0 // indirect
187187
github.com/nishanths/predeclared v0.2.2 // indirect
188-
github.com/nunnatsa/ginkgolinter v0.21.0 // indirect
188+
github.com/nunnatsa/ginkgolinter v0.21.2 // indirect
189189
github.com/pavius/impi v0.0.3 // indirect
190190
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
191191
github.com/pjbgf/sha1cd v0.5.0 // indirect
@@ -195,8 +195,8 @@ require (
195195
github.com/prometheus/client_model v0.6.2 // indirect
196196
github.com/prometheus/common v0.66.1 // indirect
197197
github.com/prometheus/procfs v0.16.1 // indirect
198-
github.com/quasilyte/go-ruleguard v0.4.4 // indirect
199-
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
198+
github.com/quasilyte/go-ruleguard v0.4.5 // indirect
199+
github.com/quasilyte/go-ruleguard/dsl v0.3.23 // indirect
200200
github.com/quasilyte/gogrep v0.5.0 // indirect
201201
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
202202
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
@@ -212,7 +212,7 @@ require (
212212
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
213213
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
214214
github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect
215-
github.com/securego/gosec/v2 v2.22.8 // indirect
215+
github.com/securego/gosec/v2 v2.22.10 // indirect
216216
github.com/sergi/go-diff v1.4.0 // indirect
217217
github.com/sirupsen/logrus v1.9.3 // indirect
218218
github.com/sivchari/containedctx v1.0.3 // indirect
@@ -247,8 +247,8 @@ require (
247247
gitlab.com/bosi/decorder v0.4.2 // indirect
248248
go-simpler.org/musttag v0.14.0 // indirect
249249
go-simpler.org/sloglint v0.11.1 // indirect
250-
go.augendre.info/arangolint v0.2.0 // indirect
251-
go.augendre.info/fatcontext v0.8.1 // indirect
250+
go.augendre.info/arangolint v0.3.1 // indirect
251+
go.augendre.info/fatcontext v0.9.0 // indirect
252252
go.opentelemetry.io/build-tools v0.29.0 // indirect
253253
go.opentelemetry.io/build-tools/checkapi v0.29.0 // indirect
254254
go.opentelemetry.io/build-tools/checkfile v0.29.0 // indirect
@@ -264,7 +264,7 @@ require (
264264
go.yaml.in/yaml/v4 v4.0.0-rc.2 // indirect
265265
golang.org/x/crypto v0.43.0 // indirect
266266
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
267-
golang.org/x/exp/typeparams v0.0.0-20250911091902-df9299821621 // indirect
267+
golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546 // indirect
268268
golang.org/x/mod v0.29.0 // indirect
269269
golang.org/x/net v0.46.0 // indirect
270270
golang.org/x/sync v0.17.0 // indirect
@@ -280,7 +280,7 @@ require (
280280
gotest.tools/gotestsum v1.13.0 // indirect
281281
honnef.co/go/tools v0.7.0-0.dev.0.20250523013057-bbc2f4dd71ea // indirect
282282
mvdan.cc/gofumpt v0.9.2 // indirect
283-
mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4 // indirect
283+
mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 // indirect
284284
)
285285

286286
retract (

0 commit comments

Comments
 (0)