github.com/m4gshm/gollections@v0.0.10/Makefile (about) 1 2 .PHONY: all 3 all: clean build test readme lint bench 4 5 .PHONY: test 6 test: 7 $(info #Running tests...) 8 go test ./... 9 10 .PHONY: cover 11 cover: 12 $(info #Running cover tests...) 13 go test -coverprofile=coverage.out -coverpkg=github.com/m4gshm/gollections/... ./... 14 go tool cover -html=coverage.out 15 16 .PHONY: cover-console-out 17 cover-console-out: 18 $(info #Running cover tests...) 19 go test -coverprofile=coverage.out -coverpkg=github.com/m4gshm/gollections/... ./... 20 go tool cover -func=coverage.out 21 22 .PHONY: clean 23 clean: 24 $(info #Building...) 25 go clean -cache 26 go clean -testcache 27 28 .PHONY: build 29 build: 30 $(info #Building...) 31 go build ./... 32 33 .PHONY: builda 34 builda: 35 $(info #Building...) 36 go clean -cache 37 go build -gcflags -m ./... 38 39 .PHONY: bench 40 bench: 41 $(info #Running benchmarks...) 42 go test -benchtime 1s -bench . -benchmem ./... 43 44 .PHONY: update 45 update: 46 $(info #Undate tools...) 47 go install github.com/go-delve/delve/cmd/dlv@latest 48 go install golang.org/x/tools/gopls@latest 49 50 .PHONY: lint 51 lint: 52 $(info #Lints...) 53 go install golang.org/x/tools/cmd/goimports@latest 54 goimports -w . 55 # go vet ./... 56 # go install github.com/tetafro/godot/cmd/godot@latest 57 # godot ./: 58 go install github.com/kisielk/errcheck@latest 59 errcheck -ignoretests ./... 60 go install github.com/alexkohler/nakedret/cmd/nakedret@latest 61 nakedret ./... 62 # go install golang.org/x/lint/golint@latest 63 # golint ./... 64 go install github.com/mgechev/revive@latest 65 revive ./... 66 67 .PHONY: readme 68 readme: 69 $(info #README.md...) 70 asciidoctor -b docbook internal/docs/readme.adoc 71 pandoc -f docbook -t gfm internal/docs/readme.xml -o README.md