Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
go-version-file: .go-version
cache: true
- name: Golangci-lint
uses: golangci/golangci-lint-action@v6.5.1
uses: golangci/golangci-lint-action@v8.0.0
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22
1.24
32 changes: 25 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
version: "2"
linters:
enable:
- goimports
- misspell
- revive

issues:
exclude-rules:
- path: _test.go
linters:
- errcheck
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- errcheck
path: _test.go
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
Comment on lines +6 to +29
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was added by golang-ci migrate. looks good to me , but let me know

7 changes: 4 additions & 3 deletions walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,14 @@ func (s *PromQLSmith) walkFunctions(expr *parser.Call, depth int) {
}

expr.Args = make([]parser.Expr, len(expr.Func.ArgTypes))
if expr.Func.Name == "holt_winters" {
switch expr.Func.Name {
case "holt_winters":
s.walkHoltWinters(expr, depth)
return
} else if expr.Func.Name == "label_replace" {
case "label_replace":
s.walkLabelReplace(expr, depth)
return
} else if expr.Func.Name == "info" {
case "info":
s.walkInfo(expr, depth)
return
}
Expand Down