diff --git a/.gitignore b/.gitignore index 1331957f4..78297164b 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,7 @@ blockchains/ # patch *.orig *.rej + +# Coverage +coverage.txt +coverage.html diff --git a/Makefile b/Makefile index 13d47163e..65d33e2eb 100644 --- a/Makefile +++ b/Makefile @@ -60,3 +60,13 @@ test: vet: @go vet ./... + +lint: + @go list ./... | xargs -L1 golint -set_exit_status + +fmt: + @gofmt -l -w -s $$(find . -type f -name '*.go'| grep -v "/vendor/") + +cover: + @go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic + @go tool cover -html=coverage.txt -o coverage.html