Skip to content
Myr

Makefile

This file

Path

Makefile

35 lines · 903 bytes

Last changed by

Removes viper dependency by removing cobra/ CLI tool (#1604)John McBridebefore adoption5b2b9e9

History of this file

Take it

1BIN="./bin"2SRC=$(shell find . -name "*.go")34ifeq (, $(shell which golangci-lint))5$(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh")6endif78ifeq (, $(shell which richgo))9$(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo")10endif1112.PHONY: fmt lint test install_deps clean1314default: all1516all: fmt test1718fmt:19	$(info ******************** checking formatting ********************)20	@test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1)2122lint:23	$(info ******************** running lint tools ********************)24	golangci-lint run -v2526test: install_deps27	$(info ******************** running tests ********************)28	richgo test -v ./...2930install_deps:31	$(info ******************** downloading dependencies ********************)32	go get -v ./...3334clean:35	rm -rf $(BIN)