Skip to content

Commit 0bd1c40

Browse files
prombotSuperQ
andauthored
Synchronize common files from prometheus/prometheus (#866)
* Update common Prometheus files Signed-off-by: prombot <prometheus-team@googlegroups.com> * Fixup linting issues. Signed-off-by: SuperQ <superq@gmail.com> --------- Signed-off-by: prombot <prometheus-team@googlegroups.com> Signed-off-by: SuperQ <superq@gmail.com> Co-authored-by: SuperQ <superq@gmail.com>
1 parent b644201 commit 0bd1c40

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

Makefile.common

Lines changed: 3 additions & 3 deletions
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 ?= v2.4.0
64+
GOLANGCI_LINT_VERSION ?= v2.6.0
6565
GOLANGCI_FMT_OPTS ?=
6666
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
6767
# 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
112112
.PHONY: common-style
113113
common-style:
114114
@echo ">> checking code style"
115-
@fmtRes=$$($(GOFMT) -d $$(find . -path ./vendor -prune -o -name '*.go' -print)); \
115+
@fmtRes=$$($(GOFMT) -d $$(git ls-files '*.go' ':!:vendor/*' || find . -path ./vendor -prune -o -name '*.go' -print)); \
116116
if [ -n "$${fmtRes}" ]; then \
117117
echo "gofmt checking failed!"; echo "$${fmtRes}"; echo; \
118118
echo "Please ensure you are using $$($(GO) version) for formatting code."; \
@@ -122,7 +122,7 @@ common-style:
122122
.PHONY: common-check_license
123123
common-check_license:
124124
@echo ">> checking license header"
125-
@licRes=$$(for file in $$(find . -type f -iname '*.go' ! -path './vendor/*') ; do \
125+
@licRes=$$(for file in $$(git ls-files '*.go' ':!:vendor/*' || find . -path ./vendor -prune -o -type f -iname '*.go' -print) ; do \
126126
awk 'NR<=3' $$file | grep -Eq "(Copyright|generated|GENERATED)" || echo $$file; \
127127
done); \
128128
if [ -n "$${licRes}" ]; then \

config/generate.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// limitations under the License.
1515

1616
//go:build ignore
17-
// +build ignore
1817

1918
// Program generating TLS certificates and keys for the tests.
2019
package main

expfmt/expfmt.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const (
4545

4646
// The Content-Type values for the different wire protocols. Do not do direct
4747
// comparisons to these constants, instead use the comparison functions.
48+
//
4849
// Deprecated: Use expfmt.NewFormat(expfmt.TypeUnknown) instead.
4950
FmtUnknown Format = `<unknown>`
5051
// Deprecated: Use expfmt.NewFormat(expfmt.TypeTextPlain) instead.

expfmt/fuzz.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
// Build only when actually fuzzing
1515
//go:build gofuzz
16-
// +build gofuzz
1716

1817
package expfmt
1918

0 commit comments

Comments
 (0)