generated from rudderlabs/rudder-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (21 loc) · 691 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
# Generate labels for all language runtimes
.PHONY: generate
generate: run fmt
.PHONY: test
test:
go test -v -count 1 ./...
.PHONY: lint
lint: fmt ## Run linters on all go files
golangci-lint run -v --timeout 5m
install-tools:
go install mvdan.cc/gofumpt@latest
go install gotest.tools/gotestsum@v1.10.0
go install golang.org/x/tools/cmd/goimports@latest
bash ./scripts/install-golangci-lint.sh v1.55.2
.PHONY: fmt
fmt: install-tools ## Formats all go files
gofumpt -l -w -extra .
find . -type f -name '*.go' -exec grep -L -E 'Code generated by .*\. DO NOT EDIT.' {} + | xargs goimports -format-only -w -local=github.com/rudderlabs
.PHONY: run
run:
go run cmd/generate/main.go