-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
31 lines (26 loc) · 812 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
SOURCES=$(shell find . -name "*.go" | grep -v vendor/)
PACKAGES=$(shell go list ./... | grep -v vendor/)
FGT := fgt
test:
go test -v $(PACKAGES)
build:
cd cmd/git-br && go build .
lint:
$(FGT) go fmt $(PACKAGES)
$(FGT) goimports -w $(SOURCES)
go list ./... | grep -v vendor/ | xargs -L1 $(FGT) golint
$(FGT) go vet $(PACKAGES)
$(FGT) errcheck -ignore Close $(PACKAGES)
staticcheck $(PACKAGES)
$(FGT) gosimple $(PACKAGES)
lint-deps:
go get -u github.com/GeertJohan/fgt
go get -u golang.org/x/tools/cmd/cover
go get -u golang.org/x/tools/cmd/goimports
go get -u github.com/golang/lint/golint
go get -u github.com/kisielk/errcheck
go get -u honnef.co/go/simple/cmd/gosimple
go get -u github.com/mvdan/interfacer/cmd/interfacer
go get -u honnef.co/go/tools/cmd/staticcheck
clean:
rm -f git-br