# Files changed · PR \#9962 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/9962/diffs)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

[ci: reject unused files and dependencies with Knip](https://git.cafe/pingdotgg/t3code/pull/9962.md)

Version: 2

Head commit: 1f344a043335b7364e8ff13ec79924cc1abd473b

Base commit: 1f0ae2d3f21ea2c4a9f0c238898a64ad052f74d3

Comparison base: 1f0ae2d3f21ea2c4a9f0c238898a64ad052f74d3

Showing up to 20 entries from this revision. If the pull request changes, reopen the first page before continuing.

## \.github/workflows/ci.yml

Status: modified; +4; −0

```diff
@@ -45,6 +45,10 @@
       - name: Ensure Electron runtime is installed
         run: vp run --filter @t3tools/desktop ensure:electron
 
+      # Export cleanup is still a manual audit; files and dependencies have no baseline.
+      - name: Check unused files and dependencies
+        run: vp run knip:check
+
       - name: Check
         run: vp check
 
```

## docs/operations/development.md

Status: modified; +9; −0

```diff
@@ -69,6 +69,15 @@
 The [manual Windows lane](../../.github/workflows/windows-tests.yml) is available for focused
 Windows investigation while that suite is not a required gate.
 
+### Unused code
+
+`vp run knip:check` runs the unused-file and dependency check enforced by CI.
+Use `vp run knip --workspace apps/web` to audit one workspace, including exports,
+or `vp run knip:production --workspace apps/web` to find code kept alive only by tests.
+The full export audit still has findings and is not a CI gate. Review callers before
+deleting code; production mode can also report development scripts and test fixtures.
+Runtime-discovered entrypoints and dependency exceptions belong in [knip.jsonc](../../knip.jsonc).
+
 ## Desktop artifacts
 
 Local artifact builds are unsigned by default and write to `release/`:
```

## package.json

Status: modified; +1; −0

```diff
@@ -26,6 +26,7 @@
     "tc": "vp run -r --concurrency-limit 2 typecheck",
     "lint": "vp lint --report-unused-disable-directives",
     "knip": "knip",
+    "knip:check": "knip --include files,dependencies --no-config-hints",
     "knip:production": "knip --production",
     "lint:mobile": "node scripts/mobile-native-static-check.ts",
     "test": "vp run -r test",
```
