github.com/cloudwego/hertz@v0.9.3/Makefile (about) 1 SHELL := /bin/bash 2 3 .PHONY: \ 4 help \ 5 coverage \ 6 vet \ 7 lint \ 8 fmt \ 9 version 10 11 all: imports fmt lint vet errors build 12 13 help: 14 @echo 'Usage: make <OPTIONS> ... <TARGETS>' 15 @echo '' 16 @echo 'Available targets are:' 17 @echo '' 18 @echo ' help Show this help screen.' 19 @echo ' coverage Report code tests coverage.' 20 @echo ' vet Run go vet.' 21 @echo ' lint Run golint.' 22 @echo ' fmt Run go fmt.' 23 @echo ' version Display Go version.' 24 @echo '' 25 @echo 'Targets run by default are: lint, vet.' 26 @echo '' 27 28 print-%: 29 @echo $* = $($*) 30 31 deps: 32 go get golang.org/x/lint/golint 33 34 coverage: 35 go test $(go list ./... | grep -v examples) -coverprofile coverage.txt ./... 36 37 vet: 38 go vet ./... 39 40 lint: deps 41 golint ./... 42 43 fmt: 44 go install mvdan.cc/gofumpt@latest 45 gofumpt -l -w -extra . 46 47 pre-dev: 48 make pre-commit 49 50 pre-commit: 51 bash script/pre-commit-hook 52 53 release: package-release sign-release 54 55 version: 56 @go version