Makefile 509 B

123456789101112131415161718192021222324252627
  1. tidy:
  2. #go install honnef.co/go/tools/cmd/staticcheck@latest
  3. go mod tidy
  4. generate: tidy
  5. go generate ./...
  6. # Coding style static check.
  7. lint: tidy
  8. @echo "Please setup a linter!"
  9. #golangci-lint run
  10. #staticcheck go list ./...
  11. vet: tidy
  12. go vet ./...
  13. test: tidy
  14. go test ./...
  15. coverage: tidy
  16. go test -json -covermode=count -coverprofile=profile.cov ./... > report.json
  17. # target to run all the possible checks; it's a good habit to run it before
  18. # pushing code
  19. check: lint vet test
  20. echo "check done"