Skip to content

Commit da8b8e9

Browse files
committed
Update linting
* Update golangci-lint from upstream prometheus repo. * Ignore min/max in predeclared. * Fix `Errorf()` use. Signed-off-by: SuperQ <[email protected]>
1 parent dbf72fc commit da8b8e9

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
3737
with:
3838
args: --verbose
39-
version: v1.59.1
39+
version: v1.60.2

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ linters-settings:
6666
local-prefixes: github.com/prometheus/client_golang
6767
gofumpt:
6868
extra-rules: true
69+
predeclared:
70+
ignore: "min,max"
6971
revive:
7072
rules:
7173
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter

Makefile.common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
6161
SKIP_GOLANGCI_LINT :=
6262
GOLANGCI_LINT :=
6363
GOLANGCI_LINT_OPTS ?=
64-
GOLANGCI_LINT_VERSION ?= v1.59.1
64+
GOLANGCI_LINT_VERSION ?= v1.60.2
6565
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
6666
# windows isn't included here because of the path separator being different.
6767
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))

prometheus/graphite/bridge_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ prefix.name_bucket;constname=constvalue;labelname=val2;le=+Inf 3 1477043
238238
got := buf.String()
239239

240240
if err := checkLinesAreEqual(want, got, useTags); err != nil {
241-
t.Fatalf(err.Error())
241+
t.Fatal(err.Error())
242242
}
243243
}
244244

@@ -290,7 +290,7 @@ prefix.name;constname=constvalue;labelname=val2 1 1477043
290290
got := buf.String()
291291

292292
if err := checkLinesAreEqual(want, got, useTags); err != nil {
293-
t.Fatalf(err.Error())
293+
t.Fatal(err.Error())
294294
}
295295
}
296296

0 commit comments

Comments
 (0)