forked from go-critic/go-critic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (26 loc) · 1005 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
.PHONY: test test-checker ci cover tools docs
%: # stubs to get makefile param for `test-checker` command
@: # see: https://stackoverflow.com/a/6273809/433041
test:
go test -v -count=1 ./...
test-checker:
go test -v -count=1 -run=/$(filter-out $@,$(MAKECMDGOALS)) ./...
test-goroot:
go run cmd/gocritic/main.go check-project -enable=$(filter-out $@,$(MAKECMDGOALS)) ${GOROOT}/src
docs:
cd ./cmd/makedocs && go run main.go
ci:
go get -t -v ./...
@if [ "$(TEST_SUITE)" = "linter" ]; then make ci-linter; else make ci-tests; fi
ci-tests:
go vet $(shell go list ./... | grep -v /vendor/)
go test -v -race -count=1 ./...
ci-linter:
gocritic check-project `pwd`
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b ${GOPATH}/bin v1.9.1
golangci-lint run -v
cover:
go get -u github.com/mattn/goveralls
goveralls -package github.com/go-critic/go-critic/lint -service travis-ci -repotoken ${COVERALLS_TOKEN}
install:
go install ./cmd/gocritic