Browse Source

add a makefile target to generate an html file representing test coverage. (yes, our current test coverage is awful)

sungo 9 months ago
parent
commit
4e301a9b8e
2 changed files with 6 additions and 0 deletions
  1. 1 0
      .gitignore
  2. 5 0
      Makefile

+ 1 - 0
.gitignore

@@ -6,3 +6,4 @@ release
 *.test
 vendor
 *.yml
+*.out

+ 5 - 0
Makefile

@@ -39,6 +39,11 @@ tools: ## Download and install all dev/code tools
 	go get -u github.com/golang/dep/cmd/dep
 	go get -u honnef.co/go/tools/cmd/staticcheck
 
+.PHONY: tools
+cover_html:
+	go test -coverprofile=/tmp/count.out -covermode=count ./pkg/conch
+	go tool cover -html=/tmp/count.out
+
 
 ################################
 # Dynamic Fanciness            #