diff options
| author | Paul Buetow <paul@buetow.org> | 2025-09-07 11:51:41 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-09-07 11:51:41 +0300 |
| commit | 148a1e7ef842cee65b7cda842548b91eb56c8de0 (patch) | |
| tree | 2f9207907a9c9e0244e196eff2c1534b387f5cb6 | |
| parent | 5ed470a093ffb7d28c88f9687429f238959935da (diff) | |
no need of this script
| -rwxr-xr-x | scripts/coverage.sh | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/scripts/coverage.sh b/scripts/coverage.sh deleted file mode 100755 index c57c838..0000000 --- a/scripts/coverage.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Simple coverage helper focusing on new/modified packages. -# Usage: scripts/coverage.sh [packages...] - -pkgs=("$@") -if [ ${#pkgs[@]} -eq 0 ]; then - pkgs=( - "codeberg.org/snonux/hexai/internal/tmux" - "codeberg.org/snonux/hexai/internal/hexaiaction" - ) -fi - -cover_dir="$(mktemp -d)" -trap 'rm -rf "$cover_dir"' EXIT - -echo "Running coverage for packages:" "${pkgs[@]}" - -total=0 -for p in "${pkgs[@]}"; do - out="$cover_dir/$(echo "$p" | tr '/' '_').out" - go test -coverprofile="$out" -covermode=atomic "$p" - echo "--- $p ---" - go tool cover -func="$out" | tail -n1 -done - -echo -echo "Hint: combine coverage across all packages with:" -echo " go test ./... -coverprofile=cover.out && go tool cover -func=cover.out" |
