-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (38 loc) · 1.57 KB
/
Makefile
File metadata and controls
47 lines (38 loc) · 1.57 KB
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
39
40
41
42
43
44
45
46
47
# =================================================================
#
# Copyright (C) 2019 Spatial Current, Inc. - All Rights Reserved
# Released as open source under the MIT License. See LICENSE file.
#
# =================================================================
.PHONY: help
help: ## Print the help documentation
@grep -E '^[a-zA-Z0-9_-\]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
#
# Dependencies
#
deps_go: ## Install Go dependencies
go get -d -t ./...
.PHONY: deps_go_test
deps_go_test: ## Download Go dependencies for tests
go get golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow # download shadow
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow # install shadow
go get -u github.com/kisielk/errcheck # download and install errcheck
go get -u github.com/client9/misspell/cmd/misspell # download and install misspell
go get -u github.com/gordonklaus/ineffassign # download and install ineffassign
go get -u honnef.co/go/tools/cmd/staticcheck # download and instal staticcheck
go get -u golang.org/x/tools/cmd/goimports # download and install goimports
#
# Go building, formatting, testing, and installing
#
.PHONY: fmt
fmt: ## Format Go source code
go fmt $$(go list ./... )
.PHONY: imports
imports: ## Update imports in Go source code
goimports -w -local github.com/spatialcurrent/go-syc-logger,github.com/spatialcurrent/ $$(find . -iname '*.go')
.PHONY: vet
vet: ## Vet Go source code
go vet $$(go list ./... )
.PHONY: test_go
test: ## Run Go tests
bash scripts/test.sh