From 3fb348df1dcc3ce912973fdd1441e508fa588e61 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Mon, 13 Jul 2026 10:18:25 +0530 Subject: [PATCH 1/2] ci: load ecosystem for deadcode analysis --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9cc02e44..62422d49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -306,6 +306,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + - uses: ./.github/actions/checkout-eyrie + with: + ref: ${{ github.head_ref || github.ref_name }} - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c with: go-version: "${{ env.GO_VERSION }}" @@ -313,7 +316,10 @@ jobs: - name: deadcode run: | go install golang.org/x/tools/cmd/deadcode@v0.30.0 - deadcode ./... 2>&1 | head -50 + output=$(mktemp) + trap 'rm -f "$output"' EXIT + deadcode ./... >"$output" + head -50 "$output" # ------------------------------------------------------------------------- # Duplication detection — jscpd. From 572abbff367fef0d0cfd3cc27cc45e1316d15e91 Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Mon, 13 Jul 2026 10:21:41 +0530 Subject: [PATCH 2/2] ci: summarize deadcode inventory --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62422d49..2b2931d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -319,7 +319,15 @@ jobs: output=$(mktemp) trap 'rm -f "$output"' EXIT deadcode ./... >"$output" - head -50 "$output" + count=$(wc -l <"$output" | tr -d ' ') + echo "deadcode inventory: ${count} unreachable functions" + { + echo "### Deadcode inventory (${count} findings; first 50 shown)" + echo + echo '```text' + head -50 "$output" + echo '```' + } >>"$GITHUB_STEP_SUMMARY" # ------------------------------------------------------------------------- # Duplication detection — jscpd.