Loading...
Loading...
Compare original and translation side by side
Language(s): TypeScript, Python
Entry points: src/index.ts, src/cli.ts
Build: esbuild via package.json scripts
Packages: 1 (single package)
Estimated LOC: ~4,200Language(s): TypeScript, Python
Entry points: src/index.ts, src/cli.ts
Build: esbuild via package.json scripts
Packages: 1 (single package)
Estimated LOC: ~4,200references/cruft-patterns.md| Track | What It Finds |
|---|---|
| Orphaned files | Files not imported, required, or referenced by any other file |
| Unused exports | Exported symbols (functions, classes, types, constants) never imported elsewhere |
| Redundant implementations | Multiple functions/classes doing the same thing under different names |
| Stale compatibility code | Shims, adapters, wrappers, and re-exports that bridge interfaces that no longer differ |
| Dead branches | Conditional paths that can never execute (always-true/false guards, unreachable returns) |
| Orphaned tests | Test files testing functions or modules that no longer exist |
| Orphaned dependencies | Packages in dependency manifests not imported anywhere in source |
references/cruft-patterns.mdbinreferences/cruft-patterns.md| 任务轨道 | 检测内容 |
|---|---|
| 孤立文件 | 未被任何其他文件导入、引用的文件 |
| 未使用的导出符号 | 导出后未在其他地方导入的符号(函数、类、类型、常量) |
| 冗余实现 | 不同名称但功能相同的多个函数/类 |
| 过时兼容性代码 | 用于桥接已无差异接口的垫片、适配器、包装器和重导出代码 |
| 无效分支 | 永远无法执行的条件路径(始终为真/假的判断、不可达的返回语句) |
| 孤立测试用例 | 测试已不存在的函数或模块的测试文件 |
| 孤立依赖 | 依赖清单中存在但源代码中从未导入的包 |
references/cruft-patterns.mdbin.claude/dead-code-report.mdundefined.claude/dead-code-report.mdundefinedsrc/utils/old-parser.tssrc/parser/index.tssrc/utils/old-parser.tssrc/parser/index.tsformatDate()src/helpers.ts:42-58src/helpers.ts:42-58formatDate()handleLegacyEvent()src/events.ts:91
For each finding, include:
- **File path and line range**
- **What it is** (function, class, file, type, constant, dependency)
- **Why it appears dead** (no imports, no references, superseded by X)
- **Confidence** (confirmed / needs review)src/events.ts:91handleLegacyEvent()
每个检测结果需包含:
- **文件路径和行号范围**
- **类型**(函数、类、文件、类型、常量、依赖)
- **判定为死代码的原因**(无导入、无引用、被X取代)
- **置信度**(确认/需要复核)Found 12 confirmed dead items and 3 needing review.
Confirmed dead by category:
- 3 orphaned files (~280 lines)
- 5 unused exports (~120 lines)
- 2 redundant implementations (~90 lines)
- 2 orphaned dependencies
Which categories should I clean up?Found 12 confirmed dead items and 3 needing review.
Confirmed dead by category:
- 3 orphaned files (~280 lines)
- 5 unused exports (~120 lines)
- 2 redundant implementations (~90 lines)
- 2 orphaned dependencies
Which categories should I clean up?git log --followgit log --follow