From c2be286dfed9e7b8c9c026482eacabb5ff04cd18 Mon Sep 17 00:00:00 2001 From: prombot Date: Thu, 20 Nov 2025 17:49:57 +0000 Subject: [PATCH 1/2] Update common Prometheus files Signed-off-by: prombot --- Makefile.common | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.common b/Makefile.common index 6762d0f8..3ed717b4 100644 --- a/Makefile.common +++ b/Makefile.common @@ -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 ?= v2.4.0 +GOLANGCI_LINT_VERSION ?= v2.6.0 GOLANGCI_FMT_OPTS ?= # 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. @@ -112,7 +112,7 @@ common-all: precheck style check_license lint yamllint unused build test .PHONY: common-style common-style: @echo ">> checking code style" - @fmtRes=$$($(GOFMT) -d $$(find . -path ./vendor -prune -o -name '*.go' -print)); \ + @fmtRes=$$($(GOFMT) -d $$(git ls-files '*.go' ':!:vendor/*' || find . -path ./vendor -prune -o -name '*.go' -print)); \ if [ -n "$${fmtRes}" ]; then \ echo "gofmt checking failed!"; echo "$${fmtRes}"; echo; \ echo "Please ensure you are using $$($(GO) version) for formatting code."; \ @@ -122,7 +122,7 @@ common-style: .PHONY: common-check_license common-check_license: @echo ">> checking license header" - @licRes=$$(for file in $$(find . -type f -iname '*.go' ! -path './vendor/*') ; do \ + @licRes=$$(for file in $$(git ls-files '*.go' ':!:vendor/*' || find . -path ./vendor -prune -o -type f -iname '*.go' -print) ; do \ awk 'NR<=3' $$file | grep -Eq "(Copyright|generated|GENERATED)" || echo $$file; \ done); \ if [ -n "$${licRes}" ]; then \ From f73c6635682ddf82b6ce5a622cfefb511190b880 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Mon, 5 Jan 2026 14:46:10 +0100 Subject: [PATCH 2/2] Fixup linting issues. Signed-off-by: SuperQ --- config/generate.go | 1 - expfmt/expfmt.go | 1 + expfmt/fuzz.go | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/config/generate.go b/config/generate.go index dbcf9be5..1f99dab0 100644 --- a/config/generate.go +++ b/config/generate.go @@ -14,7 +14,6 @@ // limitations under the License. //go:build ignore -// +build ignore // Program generating TLS certificates and keys for the tests. package main diff --git a/expfmt/expfmt.go b/expfmt/expfmt.go index c34c7de4..4e4c13e7 100644 --- a/expfmt/expfmt.go +++ b/expfmt/expfmt.go @@ -45,6 +45,7 @@ const ( // The Content-Type values for the different wire protocols. Do not do direct // comparisons to these constants, instead use the comparison functions. + // // Deprecated: Use expfmt.NewFormat(expfmt.TypeUnknown) instead. FmtUnknown Format = `` // Deprecated: Use expfmt.NewFormat(expfmt.TypeTextPlain) instead. diff --git a/expfmt/fuzz.go b/expfmt/fuzz.go index 0290f6ab..872c0c15 100644 --- a/expfmt/fuzz.go +++ b/expfmt/fuzz.go @@ -13,7 +13,6 @@ // Build only when actually fuzzing //go:build gofuzz -// +build gofuzz package expfmt