authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 00:42:26-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 00:42:26-07:00
logcd92a7e7ae68a9b0c01938e1f69c2044b6c455ac
treee9777dfbe0424bf48ceb0dca9e4e88dfe7610a91
parent1d58f2ecc4b2f6cea9897dcf46734af6210d053e
signature Signed by PGP key B5690EEEBB952194

ci: reject unused tailscale exports with Knip (#10012)


3 files changed, 7 insertions(+), 5 deletions(-)

.github/workflows/ci.yml+2-2
......@@ -45,8 +45,8 @@ jobs:
4545 - name: Ensure Electron runtime is installed
4646 run: vp run --filter @t3tools/desktop ensure:electron
4747
48 # Export cleanup is still a manual audit; files and dependencies have no baseline.
49 - name: Check unused files and dependencies
48 # Files/dependencies are repo-wide; export checks cover clean workspaces only.
49 - name: Check unused code
5050 run: vp run knip:check
5151
5252 - name: Check
docs/operations/development.md+4-2
......@@ -71,10 +71,12 @@ Windows investigation while that suite is not a required gate.
7171
7272### Unused code
7373
74`vp run knip:check` runs the unused-file and dependency check enforced by CI.
74`vp run knip:check` checks unused files and dependencies across the repo, then
75unused exports and types in `packages/tailscale`. CI enforces both checks.
7576Use `vp run knip --workspace apps/web` to audit one workspace, including exports,
7677or `vp run knip:production --workspace apps/web` to find code kept alive only by tests.
77The full export audit still has findings and is not a CI gate. Review callers before
78The full export audit still has findings and is not a repo-wide CI gate. Extend the
79export check's workspace selectors as more workspaces become clean. Review callers before
7880deleting code; production mode can also report development scripts and test fixtures.
7981Runtime-discovered entrypoints and dependency exceptions belong in [knip.jsonc](../../knip.jsonc).
8082
package.json+1-1
......@@ -26,7 +26,7 @@
2626 "tc": "vp run -r --concurrency-limit 2 typecheck",
2727 "lint": "vp lint --report-unused-disable-directives",
2828 "knip": "knip",
29 "knip:check": "knip --include files,dependencies --no-config-hints",
29 "knip:check": "knip --include files,dependencies --no-config-hints && knip --workspace packages/tailscale --exports --no-config-hints",
3030 "knip:production": "knip --production",
3131 "lint:mobile": "node scripts/mobile-native-static-check.ts",
3232 "test": "vp run -r test",