Skip to content

Commit d306cfa

Browse files
committed
update mkefile to exclude irrelevant packages
1 parent 799b278 commit d306cfa

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

Makefile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,16 @@ clean: check-go ## runs `go clean` and removes the bin/ dir
4343
$(GOCLEAN) --modcache
4444
rm -rf $(GOBIN)
4545

46-
# cover: check-go static ## runs test suite with coverage profiling
47-
cover: check-go static
48-
# First run tests with coverage on all packages
46+
cover: check-go static ## runs test suite with coverage profiling
47+
# Run tests with coverage on all packages
4948
$(GOTEST) ./... -coverprofile=$(COVER_FILE).tmp
50-
# Exclude statik.go (generated code) from coverage metrics
51-
# This is necessary because Go 1.24's coverage redesign counts generated code,
52-
# which artificially lowers coverage metrics and isn't meaningful to test
53-
grep -v "statik.go" $(COVER_FILE).tmp > $(COVER_FILE)
49+
# Exclude test helpers and utility files from coverage metrics:
50+
# - optimizelytest/ files are test helpers, not production code
51+
# - redis.go pubsub implementation is difficult to test in CI
52+
# - generate_secret is a utility command not part of core functionality
53+
grep -v -E "optimizelytest/|pubsub/redis.go|cmd/generate_secret/" $(COVER_FILE).tmp > $(COVER_FILE)
5454
rm $(COVER_FILE).tmp
5555

56-
cover-html: cover ## generates test coverage html report
57-
$(GOCMD) tool cover -html=$(COVER_FILE)
58-
5956
setup: check-go ## installs all dev and ci dependencies, but does not install golang
6057
# Install golangci-lint
6158
@echo "Installing golangci-lint v1.64.2..."

0 commit comments

Comments
 (0)