forked from twitchtv/circuitgen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (31 loc) · 752 Bytes
/
Makefile
File metadata and controls
39 lines (31 loc) · 752 Bytes
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
export SHELL := /bin/bash
export PATH := $(PWD)/bin:$(PWD):$(PATH)
export GOBIN := $(PWD)/bin
default: test
clean:
@find internal -name "*.gen.go" -exec rm {} \;
.PHONY: clean
generate: clean
go build
go generate ./...
.PHONY: generate
test: lint generate
go test -race ./...
.PHONY: test
install-tools:
@mkdir -p bin
go install github.com/kisielk/errcheck
go install golang.org/x/lint/golint
go install golang.org/x/tools/cmd/goimports
go install github.com/securego/gosec/cmd/gosec
.PHONY: install-tools
lint: install-tools
go vet ./...
errcheck -asserts -blank ./...
golint -set_exit_status ./...
gosec -quiet ./...
.PHONY: lint
fix: install-tools
go fmt ./...
find . -iname "*.go" -print0 | xargs -0 goimports -w
.PHONY: fix