Skip to content

Commit 57d1368

Browse files
authored
chore(build): Tweaks to support golangci-lint 2.10.1 (#20985)
1 parent 0edcd60 commit 57d1368

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.golangci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ linters:
6060
- legacy
6161
- std-error-handling
6262
rules:
63+
- linters:
64+
- revive
65+
path: (.*)\.go$
66+
text: "avoid meaningless package names"
67+
- linters:
68+
- revive
69+
path: (.*)\.go$
70+
text: "avoid package names that conflict with Go standard library"
6371
- path: pkg/scheduler/scheduler.go
6472
text: "SA1019: msg.GetHttpRequest is deprecated: Do not use"
6573
- linters:

pkg/logql/bench/testcase.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ func (c TestCase) Kind() string {
5050
func (c TestCase) Description() string {
5151
var b strings.Builder
5252
if c.Source != "" {
53-
b.WriteString(fmt.Sprintf("Source: %s\n", c.Source))
53+
fmt.Fprintf(&b, "Source: %s\n", c.Source)
5454
}
55-
b.WriteString(fmt.Sprintf("Query: %s\n", c.Query))
56-
b.WriteString(fmt.Sprintf("Time Range: %v to %v\n", c.Start.Format(time.RFC3339), c.End.Format(time.RFC3339)))
55+
fmt.Fprintf(&b, "Query: %s\n", c.Query)
56+
fmt.Fprintf(&b, "Time Range: %v to %v\n", c.Start.Format(time.RFC3339), c.End.Format(time.RFC3339))
5757
if c.Step > 0 {
58-
b.WriteString(fmt.Sprintf("Step: %v\n", c.Step))
58+
fmt.Fprintf(&b, "Step: %v\n", c.Step)
5959
}
60-
b.WriteString(fmt.Sprintf("Direction: %v", c.Direction))
60+
fmt.Fprintf(&b, "Direction: %v", c.Direction)
6161
return b.String()
6262
}

0 commit comments

Comments
 (0)