diff --git a/.golangci.yml b/.golangci.yml index 671a02d3..2de32fcb 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -31,7 +31,7 @@ linters: - goconst #- gocritic #- gocyclo - #- gofmt + - gofmt - goimports - golint #- gomnd diff --git a/Makefile b/Makefile index 0da8d7aa..8e9b796d 100644 --- a/Makefile +++ b/Makefile @@ -5,19 +5,15 @@ ifeq (, $(shell which golangci-lint)) $(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh") endif -.PHONY: fmt lint test install_deps clean +.PHONY: lint test install_deps clean default: all -all: fmt test +all: test -fmt: - $(info ******************** checking formatting ********************) - @test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1) - -lint: - $(info ******************** running lint tools ********************) - golangci-lint run -v +install_deps: + $(info ******************** downloading dependencies ********************) + go get -v ./... test: install_deps $(info ******************** running tests ********************) @@ -27,9 +23,9 @@ richtest: install_deps $(info ******************** running tests with kyoh86/richgo ********************) richgo test -v ./... -install_deps: - $(info ******************** downloading dependencies ********************) - go get -v ./... +lint: + $(info ******************** running lint tools ********************) + golangci-lint run -v clean: rm -rf $(BIN)