Skip to content

Commit b623202

Browse files
committed
Revert "Update common Prometheus files (prometheus-community#873)"
This reverts commit 2fa81a6.
1 parent 636faaf commit b623202

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ jobs:
3333
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
3434
if: github.repository == 'prometheus/snmp_exporter'
3535
- name: Lint
36-
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
36+
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
3737
with:
3838
version: v1.55.2

Makefile.common

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,12 @@ common-vet:
169169
common-lint: $(GOLANGCI_LINT)
170170
ifdef GOLANGCI_LINT
171171
@echo ">> running golangci-lint"
172+
# 'go list' needs to be executed before staticcheck to prepopulate the modules cache.
173+
# Otherwise staticcheck might fail randomly for some reason not yet explained.
174+
$(GO) list -e -compiled -test=true -export=false -deps=true -find=false -tags= -- ./... > /dev/null
172175
$(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs)
173176
endif
174177

175-
.PHONY: common-lint-fix
176-
common-lint-fix: $(GOLANGCI_LINT)
177-
ifdef GOLANGCI_LINT
178-
@echo ">> running golangci-lint fix"
179-
$(GOLANGCI_LINT) run --fix $(GOLANGCI_LINT_OPTS) $(pkgs)
180-
endif
181-
182178
.PHONY: common-yamllint
183179
common-yamllint:
184180
@echo ">> running yamllint on all YAML files in the repository"
@@ -208,10 +204,6 @@ common-tarball: promu
208204
@echo ">> building release tarball"
209205
$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)
210206

211-
.PHONY: common-docker-repo-name
212-
common-docker-repo-name:
213-
@echo "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)"
214-
215207
.PHONY: common-docker $(BUILD_DOCKER_ARCHS)
216208
common-docker: $(BUILD_DOCKER_ARCHS)
217209
$(BUILD_DOCKER_ARCHS): common-docker-%:

0 commit comments

Comments
 (0)