# Makefile helper functions for tools # TOOLS ?=$(BLOCKER_TOOLS) $(CRITICAL_TOOLS) $(TRIVIAL_TOOLS) .PHONY: tools.install tools.install: $(addprefix tools.install., $(TOOLS)) .PHONY: tools.install.% tools.install.%: @echo "===========> Installing $*" @$(MAKE) install.$* .PHONY: tools.verify.% tools.verify.%: @if ! which $* &>/dev/null; then $(MAKE) tools.install.$*; fi .PHONY: install.golangci-lint install.golangci-lint: @$(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.0 @golangci-lint completion bash > $(HOME)/.golangci-lint.bash @if ! grep -q .golangci-lint.bash $(HOME)/.bashrc; then echo "source \$$HOME/.golangci-lint.bash" >> $(HOME)/.bashrc; fi .PHONY: install.go-gitlint install.go-gitlint: @$(GO) install github.com/llorllale/go-gitlint/cmd/go-gitlint@latest .PHONY: install.goimports install.goimports: @$(GO) install golang.org/x/tools/cmd/goimports@latest .PHONY: install.gofumpt install.gofumpt: @$(GO) install mvdan.cc/gofumpt@latest