File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 3434 - name : Install snmp_exporter/generator dependencies
3535 run : sudo apt-get update && sudo apt-get -y install libsnmp-dev
3636 if : github.repository == 'prometheus/snmp_exporter'
37+ - name : Get golangci-lint version
38+ id : golangci-lint-version
39+ run : echo "version=$(make print-golangci-lint-version)" >> $GITHUB_OUTPUT
3740 - name : Lint
3841 uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
3942 with :
4043 args : --verbose
41- version : v2.2.1
44+ version : ${{ steps.golangci-lint-version.outputs.version }}
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.2.1
64+ GOLANGCI_LINT_VERSION ?= v2.4.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.
@@ -266,6 +266,10 @@ $(GOLANGCI_LINT):
266266 | sh -s -- -b $(FIRST_GOPATH)/bin $(GOLANGCI_LINT_VERSION)
267267endif
268268
269+ .PHONY: common-print-golangci-lint-version
270+ common-print-golangci-lint-version:
271+ @echo $(GOLANGCI_LINT_VERSION)
272+
269273.PHONY: precheck
270274precheck::
271275
You can’t perform that action at this time.
0 commit comments