diff options
| author | Jeroen Wijenbergh <jeroenwijenbergh@protonmail.com> | 2024-05-02 11:05:37 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-05-24 13:25:11 +0200 |
| commit | a7bae0355bcd244afaa9122826e08bd4e5853227 (patch) | |
| tree | 1a2c8af21c290d967cda99ab5ca4a794d3262970 /Makefile | |
| parent | aa91c254133acfb5e9248fd8fceb8c789a7c5a5d (diff) | |
Makefile: Add a coverage target
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,5 @@ .DEFAULT_GOAL := build -.PHONY: build fmt cli clean +.PHONY: build fmt cli clean coverage VERSION := $(shell grep -o 'const Version = "[^"]*' internal/version/version.go | cut -d '"' -f 2) @@ -23,3 +23,6 @@ test: clean: rm -rf lib go clean +coverage: + go test -v -coverpkg=./... -coverprofile=common.cov ./... + go tool cover -func common.cov |
