From cde9e25897a805402c906e5487ed4774353a37a2 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, 29 Mar 2026 13:21:57 -0700 Subject: [PATCH] fix(go): handle 100% coverage in unit-cov-gaps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With `set -euo pipefail`, the `grep -v` pipeline returns exit code 1 when no lines match (i.e., when coverage is 100%), killing the script before the empty-check on line 105. Append `|| true` so the empty result flows through to the existing `if [ -z ]` guard. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- go.just | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.just b/go.just index 9cd9322..f734af1 100644 --- a/go.just +++ b/go.just @@ -101,7 +101,7 @@ unit-cov: _cov-deps 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) + gap_files=$(go tool cover -func={{ coverage_dir }}/cover.out | grep -v '100.0%' | grep -v '^total:' | awk -F: '{print $1}' | sort -u || true) 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