Files
openclaude/knip.json
T
f4c3be850e chore: remove dead code and add knip gate to CI check (#1612)
Delete 32 unreferenced source files (~4,000 lines) verified dead by
import-specifier grep and knip: test-only token utilities, orphaned hooks
(useTaskListWatcher, useSkillImprovementSurvey + its component), the
removed DevBar and ConfigTool UIs, unregistered bundled skills (stuck,
verifyContent), unused analytics sinks, the benchmark command, and
stale migrations/helpers.

Remove unused dependencies code-excerpt, stack-utils, and tsx from
package.json plus their entries in build stub/external lists.

Add knip with a tuned knip.json (entrypoints, build-time stub targets,
subprocess-launched fixtures, and runtime-string-imported SDKs ignored;
providerAutoDetect kept intentionally as provider pre-wiring) and wire
`bun run deadcode` into the `check` script so dead code stays dead.

Co-authored-by: OpenClaude <openclaude@gitlawb.com>
2026-06-14 10:13:37 +08:00

37 lines
1.0 KiB
JSON

{
"$schema": "https://unpkg.com/knip@6/schema.json",
"entry": [
"src/entrypoints/cli.tsx",
"src/entrypoints/mcp.ts",
"src/entrypoints/init.ts",
"src/entrypoints/sdk/index.ts",
"src/main.tsx",
"scripts/**/*.ts",
"bin/openclaude",
"src/**/*.test.{ts,tsx}",
"src/**/__tests__/**/*.{ts,tsx}",
"tests/**/*.test.ts"
],
"project": ["src/**/*.{ts,tsx}", "scripts/**/*.ts"],
"ignore": [
"src/integrations/generated/**",
"src/services/internalLogging.ts",
"src/types/generated/**",
"src/test/fixtures/**",
"src/tools/REPLTool/**",
"src/tools/TungstenTool/**",
"src/tools/SuggestBackgroundPRTool/**",
"src/tools/VerifyPlanExecutionTool/**",
"src/commands/agents-platform/**",
"src/assistant/AssistantSessionChooser.tsx",
"src/commands/assistant/AssistantSessionChooser.ts",
"src/utils/protectedNamespace.ts",
"src/utils/providerAutoDetect.ts"
],
"ignoreDependencies": [
"@types/bun",
"@anthropic-ai/foundry-sdk",
"@anthropic-ai/vertex-sdk"
]
}