From 03771c136c99d7fa2892ea7336bd90649e9890c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D7=A0=CF=85=CE=B1=CE=B7=20=D7=A0=CF=85=CE=B1=CE=B7=D1=95?= =?UTF-8?q?=CF=83=CE=B7?= Date: Sun, 22 Mar 2026 09:48:42 -0700 Subject: [PATCH 1/2] feat(go): add unit-cov-gaps recipe for coverage gap heatmap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Filters the coverage profile to only files without 100% coverage and opens an HTML heatmap showing just those files. Useful for quickly verifying which specific lines are uncovered. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- go.just | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/go.just b/go.just index 547722a..d7761c1 100644 --- a/go.just +++ b/go.just @@ -101,6 +101,16 @@ unit-cov: _cov-deps go tool github.com/boumenot/gocover-cobertura < {{ coverage_dir }}/cover.out > {{ coverage_dir }}/cobertura.xml go tool cover -func={{ coverage_dir }}/cover.out +# Show files without 100% coverage and open heatmap of only those files +[group('test')] +unit-cov-gaps: unit-cov + #!/usr/bin/env bash + set -euo pipefail + gap_files=$(go tool cover -func={{ coverage_dir }}/cover.out | grep -v '100.0%' | grep -v '^total:' | awk -F: '{print $1}' | sort -u) + if [ -z "$gap_files" ]; then echo "No coverage gaps found."; exit 0; fi + { head -1 {{ coverage_dir }}/cover.out; grep -F -f <(echo "$gap_files") {{ coverage_dir }}/cover.out; } > {{ coverage_dir }}/gaps.out + go tool cover -html={{ coverage_dir }}/gaps.out + # Generate coverage and show heatmap [group('test')] unit-cov-map: unit-cov From b39f0274c42b926eaaf6c41da9b0da3a95cf7a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D7=A0=CF=85=CE=B1=CE=B7=20=D7=A0=CF=85=CE=B1=CE=B7=D1=95?= =?UTF-8?q?=CF=83=CE=B7?= Date: Sun, 22 Mar 2026 09:49:30 -0700 Subject: [PATCH 2/2] docs: add unit-cov-gaps to README recipe table Co-Authored-By: Claude --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 75a48ed..989a156 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ test: go::test go::docs-check bats::test | `unit` | Run unit tests | | `unit-int` | Run integration tests (requires running service) | | `unit-cov` | Run tests with coverage | +| `unit-cov-gaps` | Coverage gaps only with HTML heatmap | | `unit-cov-map` | Coverage with HTML heatmap | | `test` | Run all checks (mod, fmt, vet, coverage) | | `fmt` | Auto-format with gofumpt + golines |