File tree Expand file tree Collapse file tree 4 files changed +4
-5
lines changed
Expand file tree Collapse file tree 4 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
6161SKIP_GOLANGCI_LINT :=
6262GOLANGCI_LINT :=
6363GOLANGCI_LINT_OPTS ?=
64- GOLANGCI_LINT_VERSION ?= v2.4 .0
64+ GOLANGCI_LINT_VERSION ?= v2.6 .0
6565GOLANGCI_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
113113common-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
123123common-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 \
Original file line number Diff line number Diff line change 1414// limitations under the License.
1515
1616//go:build ignore
17- // +build ignore
1817
1918// Program generating TLS certificates and keys for the tests.
2019package main
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff line change 1313
1414// Build only when actually fuzzing
1515//go:build gofuzz
16- // +build gofuzz
1716
1817package expfmt
1918
You can’t perform that action at this time.
0 commit comments