File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 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@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7 .0
36+ uses : golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0 .0
3737 with :
3838 version : v1.55.2
Original file line number Diff line number Diff line change @@ -169,12 +169,16 @@ common-vet:
169169common-lint: $(GOLANGCI_LINT)
170170ifdef 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
175172 $(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs)
176173endif
177174
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+
178182.PHONY: common-yamllint
179183common-yamllint:
180184 @echo ">> running yamllint on all YAML files in the repository"
@@ -204,6 +208,10 @@ common-tarball: promu
204208 @echo ">> building release tarball"
205209 $(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)
206210
211+ .PHONY: common-docker-repo-name
212+ common-docker-repo-name:
213+ @echo "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)"
214+
207215.PHONY: common-docker $(BUILD_DOCKER_ARCHS)
208216common-docker: $(BUILD_DOCKER_ARCHS)
209217$(BUILD_DOCKER_ARCHS): common-docker-%:
You can’t perform that action at this time.
0 commit comments