-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from skycoin/develop
v1.0.0
- Loading branch information
Showing
1,031 changed files
with
182,162 additions
and
13,111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
.vscode | ||
.DS_Store | ||
*.log | ||
*.out | ||
cert-cache | ||
*.ignore.* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,43 @@ | ||
.DEFAULT_GOAL := help | ||
.PHONY: proxy teller install-skycoin-cli test lint check help | ||
.PHONY: teller test lint lint-fast check format cover help | ||
|
||
proxy: ## Run the teller proxy. To add arguments, do 'make ARGS="--foo" proxy'. | ||
go run cmd/proxy/proxy.go ${ARGS} | ||
PACKAGES = $(shell find ./src -type d -not -path '\./src') | ||
|
||
teller: SKYCOIN-CLI-exists ## Run teller. To add arguments, do 'make ARGS="--foo" teller'. | ||
teller: ## Run teller. To add arguments, do 'make ARGS="--foo" teller'. | ||
go run cmd/teller/teller.go ${ARGS} | ||
|
||
install-skycoin-cli: ## Install skycoin-cli | ||
go get github.com/skycoin/skycoin/cmd/cli | ||
@mv $$GOPATH/bin/cli $$GOPATH/bin/skycoin-cli | ||
|
||
test: ## Run tests | ||
go test ./cmd/... | ||
go test ./src/... | ||
go test ./cmd/... -timeout=1m -cover | ||
go test ./src/... -timeout=1m -cover | ||
|
||
lint: ## Run linters | ||
gometalinter --disable-all -E goimports --tests --vendor ./... | ||
lint: ## Run linters. Use make install-linters first. | ||
vendorcheck ./... | ||
gometalinter --deadline=2m --disable-all -E goimports -E unparam --tests --vendor ./... | ||
|
||
lint-fast: ## Run linters. Use make install-linters first. Skips slow linters. | ||
vendorcheck ./... | ||
gometalinter --disable-all -E goimports --tests --vendor ./... | ||
|
||
check: lint test ## Run tests and linters | ||
|
||
cover: ## Runs tests on ./src/ with HTML code coverage | ||
@echo "mode: count" > coverage-all.out | ||
$(foreach pkg,$(PACKAGES),\ | ||
go test -coverprofile=coverage.out $(pkg);\ | ||
tail -n +2 coverage.out >> coverage-all.out;) | ||
go tool cover -html=coverage-all.out | ||
|
||
install-linters: ## Install linters | ||
go get -u -f github.com/golang/lint/golint | ||
go get -u -f golang.org/x/tools/cmd/goimports | ||
go get -u github.com/alecthomas/gometalinter | ||
go get -u github.com/FiloSottile/vendorcheck | ||
go get -u github.com/alecthomas/gometalinter | ||
gometalinter --vendored-linters --install | ||
|
||
format: # Formats the code. Must have goimports installed (use make install-linters). | ||
# This sorts imports by [stdlib, 3rdpart, skycoin/skycoin, skycoin/teller] | ||
goimports -w -local github.com/skycoin/teller ./cmd | ||
goimports -w -local github.com/skycoin/teller ./src | ||
goimports -w -local github.com/skycoin/skycoin ./cmd | ||
goimports -w -local github.com/skycoin/skycoin ./src | ||
|
||
help: | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
Oops, something went wrong.