diff --git a/Makefile b/Makefile index 0e4b21bcb4b3d..2d19dd19fc4c1 100644 --- a/Makefile +++ b/Makefile @@ -150,18 +150,17 @@ lint-install: .PHONY: lint lint: - ifeq (, $(shell which golangci-lint)) - $(info golangci-lint can't be found, please run: make lint-install) - exit 1 - endif - - golangci-lint run - - ifeq (, $(shell which markdownlint-cli)) - $(info markdownlint-cli can't be found, please run: make lint-install) - exit 1 - endif - markdownlint-cli + @which golangci-lint >/dev/null 2>&1 || { \ + echo "golangci-lint not found, please run: make lint-install"; \ + exit 1; \ + } + golangci-lint run + + @which markdownlint >/dev/null 2>&1 || { \ + echo "markdownlint not found, please run: make lint-install"; \ + exit 1; \ + } + markdownlint . .PHONY: lint-branch lint-branch: