Skip to content

Commit e2ba6ab

Browse files
committed
Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
1 parent 1c6854e commit e2ba6ab

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ jobs:
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 }}

Makefile.common

Lines changed: 5 additions & 1 deletion
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.2.1
64+
GOLANGCI_LINT_VERSION ?= v2.4.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.
@@ -266,6 +266,10 @@ $(GOLANGCI_LINT):
266266
| sh -s -- -b $(FIRST_GOPATH)/bin $(GOLANGCI_LINT_VERSION)
267267
endif
268268

269+
.PHONY: common-print-golangci-lint-version
270+
common-print-golangci-lint-version:
271+
@echo $(GOLANGCI_LINT_VERSION)
272+
269273
.PHONY: precheck
270274
precheck::
271275

0 commit comments

Comments
 (0)