mirror of
https://github.com/grafana/loki.git
synced 2026-03-13 09:33:58 +08:00
chore(build): Tweaks to support golangci-lint 2.10.1 (#20985)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user