We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6f8cac commit 586f9a0Copy full SHA for 586f9a0
Makefile
@@ -51,8 +51,8 @@ test-coverage: ; $(info $(M) running coverage tests…) @ ## Run coverage tests
51
-coverprofile=test/profile.out $(PKGS)
52
$Q $(GO) tool cover -html=test/profile.out -o test/coverage.html
53
$Q $(GO) tool gocover-cobertura < test/profile.out > test/coverage.xml # Inaccurate?
54
- @echo -n "Code coverage: "; \
55
- echo "scale=1;$$(sed -En 's/^<coverage line-rate="([0-9.]+)".*/\1/p' test/coverage.xml) * 100 / 1" | bc -q
+ @printf "Code coverage: "; \
+ go tool cover -func test/profile.out | awk '($$1 == "total:") { print $$NF}'
56
57
.PHONY: lint
58
lint: ; $(info $(M) running golint…) @ ## Run golint
0 commit comments