chore(build): Tweaks to support golangci-lint 2.10.1 (#20985)

This commit is contained in:
Paul Rogers
2026-02-26 11:56:42 -05:00
committed by GitHub
parent 0edcd606ee
commit 57d1368e17
2 changed files with 13 additions and 5 deletions

View File

@@ -60,6 +60,14 @@ linters:
- legacy
- std-error-handling
rules:
- linters:
- revive
path: (.*)\.go$
text: "avoid meaningless package names"
- linters:
- revive
path: (.*)\.go$
text: "avoid package names that conflict with Go standard library"
- path: pkg/scheduler/scheduler.go
text: "SA1019: msg.GetHttpRequest is deprecated: Do not use"
- linters:

View File

@@ -50,13 +50,13 @@ func (c TestCase) Kind() string {
func (c TestCase) Description() string {
var b strings.Builder
if c.Source != "" {
b.WriteString(fmt.Sprintf("Source: %s\n", c.Source))
fmt.Fprintf(&b, "Source: %s\n", c.Source)
}
b.WriteString(fmt.Sprintf("Query: %s\n", c.Query))
b.WriteString(fmt.Sprintf("Time Range: %v to %v\n", c.Start.Format(time.RFC3339), c.End.Format(time.RFC3339)))
fmt.Fprintf(&b, "Query: %s\n", c.Query)
fmt.Fprintf(&b, "Time Range: %v to %v\n", c.Start.Format(time.RFC3339), c.End.Format(time.RFC3339))
if c.Step > 0 {
b.WriteString(fmt.Sprintf("Step: %v\n", c.Step))
fmt.Fprintf(&b, "Step: %v\n", c.Step)
}
b.WriteString(fmt.Sprintf("Direction: %v", c.Direction))
fmt.Fprintf(&b, "Direction: %v", c.Direction)
return b.String()
}