Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / github.com / sergi / go-diff@v1.1.0 / Makefile
1 .PHONY: all clean clean-coverage install install-dependencies install-tools lint test test-verbose test-with-coverage
2
3 export ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
4 export PKG := github.com/sergi/go-diff
5 export ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
6
7 $(eval $(ARGS):;@:) # turn arguments into do-nothing targets
8 export ARGS
9
10 ifdef ARGS
11         PKG_TEST := $(ARGS)
12 else
13         PKG_TEST := $(PKG)/...
14 endif
15
16 all: install-tools install-dependencies install lint test
17
18 clean:
19         go clean -i $(PKG)/...
20         go clean -i -race $(PKG)/...
21 clean-coverage:
22         find $(ROOT_DIR) | grep .coverprofile | xargs rm
23 install:
24         go install -v $(PKG)/...
25 install-dependencies:
26         go get -t -v $(PKG)/...
27         go build -v $(PKG)/...
28 install-tools:
29         # Install linting tools
30         go get -u -v golang.org/x/lint/...
31         go get -u -v github.com/kisielk/errcheck/...
32
33         # Install code coverage tools
34         go get -u -v github.com/onsi/ginkgo/ginkgo/...
35         go get -u -v github.com/modocache/gover/...
36         go get -u -v github.com/mattn/goveralls/...
37 lint:
38         $(ROOT_DIR)/scripts/lint.sh
39 test:
40         go test -race -test.timeout 120s $(PKG_TEST)
41 test-verbose:
42         go test -race -test.timeout 120s -v $(PKG_TEST)
43 test-with-coverage:
44         ginkgo -r -cover -race -skipPackage="testdata"