Skip to content

Commit

Permalink
Update golangci lint (#679)
Browse files Browse the repository at this point in the history
* Update common Prometheus files

Signed-off-by: prombot <prometheus-team@googlegroups.com>

* Fix golint ci

Signed-off-by: Julien <roidelapluie@o11y.eu>

---------

Signed-off-by: prombot <prometheus-team@googlegroups.com>
Signed-off-by: Julien <roidelapluie@o11y.eu>
Co-authored-by: prombot <prometheus-team@googlegroups.com>
  • Loading branch information
roidelapluie and prombot committed Aug 20, 2024
1 parent 2cac84e commit cd4bcc0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
args: --verbose
version: v1.59.1
version: v1.60.1
2 changes: 1 addition & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
SKIP_GOLANGCI_LINT :=
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_VERSION ?= v1.59.1
GOLANGCI_LINT_VERSION ?= v1.60.1
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
# windows isn't included here because of the path separator being different.
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
Expand Down
2 changes: 1 addition & 1 deletion model/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,6 @@ func ToEscapingScheme(s string) (EscapingScheme, error) {
case EscapeValues:
return ValueEncodingEscaping, nil
default:
return NoEscaping, fmt.Errorf("unknown format scheme " + s)
return NoEscaping, fmt.Errorf("unknown format scheme %s", s)
}
}
4 changes: 2 additions & 2 deletions model/metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,10 @@ func TestEscapeMetricFamily(t *testing.T) {
original := proto.Clone(scenario.input)
got := EscapeMetricFamily(scenario.input, scenario.scheme)
if !cmp.Equal(scenario.expected, got, cmpopts.IgnoreUnexported(unexportList...)) {
t.Errorf("unexpected difference in escaped output:" + cmp.Diff(scenario.expected, got, cmpopts.IgnoreUnexported(unexportList...)))
t.Errorf("unexpected difference in escaped output:\n%s", cmp.Diff(scenario.expected, got, cmpopts.IgnoreUnexported(unexportList...)))
}
if !cmp.Equal(scenario.input, original, cmpopts.IgnoreUnexported(unexportList...)) {
t.Errorf("input was mutated during escaping" + cmp.Diff(scenario.expected, got, cmpopts.IgnoreUnexported(unexportList...)))
t.Errorf("input was mutated during escaping:\n%s", cmp.Diff(scenario.expected, got, cmpopts.IgnoreUnexported(unexportList...)))
}
})
}
Expand Down

0 comments on commit cd4bcc0

Please sign in to comment.