From 8c16524b901d6f0d4633e92ed8894360882c5c52 Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Sat, 20 Jun 2026 22:33:27 +0800 Subject: [PATCH] chore(knip): drop dead entry pattern and fail on config hints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit examples/acp-agent has no src/ directory — its plugins come from real packages wired via cordis.yml, and its only local entry (start.ts) is already auto-discovered. The examples/acp-agent/src/*.ts entry pattern matched nothing, which knip surfaced as a config hint that exited 0 and so went unnoticed. Remove the dead pattern, and pass --treat-config-hints-as-errors so a future stale entry (a renamed/removed path) fails the hygiene gate instead of degrading to a silent hint. --- knip.json | 1 - package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/knip.json b/knip.json index f0ca39d57e..44dd3d37bb 100644 --- a/knip.json +++ b/knip.json @@ -8,7 +8,6 @@ "examples/echo-agent/src/*.ts", "examples/echo-agent/tests/**/*.e2e.ts", "examples/coding-agent/tests/**/*.e2e.ts", - "examples/acp-agent/src/*.ts", "examples/acp-agent/tests/**/*.e2e.ts", "examples/acp-agent/tests/**/*.snapshot.ts" ], diff --git a/package.json b/package.json index fadc903cbb..13e289df06 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "test:e2e": "vitest run --config vitest.e2e.config.ts", "test:snapshot": "vitest run --config vitest.snapshot.config.ts", "test:snapshot:record": "DSH_SNAPSHOT=record vitest run --config vitest.snapshot.config.ts --update", - "knip": "knip", + "knip": "knip --treat-config-hints-as-errors", "publint": "tsx scripts/publint-all.ts", "doc-typecheck": "tsx scripts/doc-typecheck.ts", "verify-md-wrap": "tsx scripts/verify-md-wrap.ts",