Skip to content

Commit b5cb3d2

Browse files
authored
Update common Prometheus files (#610)
Signed-off-by: prombot <[email protected]>
1 parent 6ae6f98 commit b5cb3d2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Makefile.common

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,16 @@ 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
175172
$(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs)
176173
endif
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
179183
common-yamllint:
180184
@echo ">> running yamllint on all YAML files in the repository"

0 commit comments

Comments
 (0)