-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
38 lines (30 loc) · 925 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.PHONY: build mocks format lint test test-unit govet govulncheck
build:
@echo Building...
@go build -o ./cli-plugin-network.app .
## mocks: generate mocks
mocks:
@echo Generating mocks
@go install github.com/vektra/mockery/v2@latest
@go generate ./...
## format: Install and run goimports and gofumpt
format:
@echo Formatting...
@go run mvdan.cc/gofumpt -w .
@go run golang.org/x/tools/cmd/goimports -w -local github.com/ignite/cli-plugin-network .
## lint: Run Golang CI Lint.
lint:
@echo Running golangci-lint...
@go run github.com/golangci/golangci-lint/cmd/golangci-lint run --out-format=tab --issues-exit-code=0
test: govet test-unit
## govet: Run go vet.
govet:
@echo Running go vet...
@go vet ./...
test-unit:
@echo Running unit tests...
@go test -race -failfast -v ./...
## govulncheck: Run govulncheck
govulncheck:
@echo Running govulncheck...
@go run golang.org/x/vuln/cmd/govulncheck ./...