Makefile 695 B

123456789101112131415161718192021222324252627
  1. .PHONY: build
  2. build:
  3. clear
  4. go fmt ./...
  5. go build -o ./bin/prolet ./cmd/prolet/main.go
  6. .PHONY: test
  7. test:
  8. clear
  9. go fmt ./...
  10. go test -race -shuffle=on -timeout=30s -coverprofile=./cover.out ./...
  11. go tool cover -func=./cover.out
  12. .PHONY: lint
  13. lint:
  14. clear
  15. go fmt ./...
  16. go vet ./...
  17. # go install honnef.co/go/tools/cmd/staticcheck@latest
  18. # staticcheck ./...
  19. # go install github.com/MakeNowJust/enumcase/cmd/enumcase@latest
  20. # enumcase ./...
  21. # go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
  22. # golangci-lint run ./...
  23. go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
  24. gocyclo -over 11 .
  25. go install github.com/securego/gosec/cmd/gosec@latest
  26. gosec ./...