File tree 2 files changed +4
-12
lines changed
2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change 33
33
run : sudo apt-get update && sudo apt-get -y install libsnmp-dev
34
34
if : github.repository == 'prometheus/snmp_exporter'
35
35
- name : Lint
36
- uses : golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0 .0
36
+ uses : golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7 .0
37
37
with :
38
38
version : v1.55.2
Original file line number Diff line number Diff line change @@ -169,16 +169,12 @@ common-vet:
169
169
common-lint: $(GOLANGCI_LINT)
170
170
ifdef GOLANGCI_LINT
171
171
@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
172
175
$(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs)
173
176
endif
174
177
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
-
182
178
.PHONY: common-yamllint
183
179
common-yamllint:
184
180
@echo ">> running yamllint on all YAML files in the repository"
@@ -208,10 +204,6 @@ common-tarball: promu
208
204
@echo ">> building release tarball"
209
205
$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)
210
206
211
- .PHONY: common-docker-repo-name
212
- common-docker-repo-name:
213
- @echo "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)"
214
-
215
207
.PHONY: common-docker $(BUILD_DOCKER_ARCHS)
216
208
common-docker: $(BUILD_DOCKER_ARCHS)
217
209
$(BUILD_DOCKER_ARCHS): common-docker-%:
You can’t perform that action at this time.
0 commit comments