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 34
34
- name : Install snmp_exporter/generator dependencies
35
35
run : sudo apt-get update && sudo apt-get -y install libsnmp-dev
36
36
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
37
40
- name : Lint
38
41
uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
39
42
with :
40
43
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_
61
61
SKIP_GOLANGCI_LINT :=
62
62
GOLANGCI_LINT :=
63
63
GOLANGCI_LINT_OPTS ?=
64
- GOLANGCI_LINT_VERSION ?= v2.2.1
64
+ GOLANGCI_LINT_VERSION ?= v2.4.0
65
65
GOLANGCI_FMT_OPTS ?=
66
66
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
67
67
# windows isn't included here because of the path separator being different.
@@ -266,6 +266,10 @@ $(GOLANGCI_LINT):
266
266
| sh -s -- -b $(FIRST_GOPATH)/bin $(GOLANGCI_LINT_VERSION)
267
267
endif
268
268
269
+ .PHONY: common-print-golangci-lint-version
270
+ common-print-golangci-lint-version:
271
+ @echo $(GOLANGCI_LINT_VERSION)
272
+
269
273
.PHONY: precheck
270
274
precheck::
271
275
You can’t perform that action at this time.
0 commit comments