Investigate adding fallow for dead code and codebase health analysis
@EhabY đang làm issue này rồi.
Từ ngày 15/4/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Summary
fallow is a Rust-based codebase analysis tool that detects dead code, circular dependencies, code duplication, and complexity hotspots. It is much faster than Knip (5-41x in benchmarks) and works with zero configuration. It auto-detected our Electron + Vite + Vitest + TypeScript setup out of the box.
Trial run on this repo
I ran npx fallow against the current codebase. It analyzed 213 files in 0.34 seconds and found:
Dead code
- 2 unused files --
.vscode-test.mjsandtest/mocks/vscode.runtime.ts - 5 unused exports --
getEventName,AgentMetadataEventSchema,REMOTE_SSH_EXTENSION_IDS,RemoteSSHLogPortRegex,MockOAuthInterceptor - 15 unused type exports -- across
exec.ts,eventStreamConnection.ts,sshConfig.ts,remote.ts, and others - 119 unused class members -- mostly in test mock helpers (46 in
testHelpers.tsalone), but also 8 incoderApi.tsand 8 inpathResolver.ts
Circular dependencies (2 cycles)
cliCredentialManager.ts->cliExec.ts->cli.ts->cliCredentialManager.ts(11 files affected)- A shorter cycle through the same area
Code duplication
- 73 clone groups detected, including repeated patterns in test setup and SSH config handling
Complexity hotspots
extension.ts:activate-- cognitive complexity 30workspacesProvider.ts:getChildren-- cognitive complexity 37remote.ts:setup-- cognitive complexity 32
Maintainability
- Overall maintainability index: 91.0 (rated "good")
What would be useful
- Dead code cleanup -- the unused exports and types are low-hanging fruit. Fallow can auto-fix these with
fallow fix --dry-run. - CI integration -- fallow has a GitHub Action that can run on PRs with
--since mainto catch new dead code before it lands. - Circular dependency tracking -- the two cycles through
cliCredentialManager/cliExec/cliare flagged as the top refactoring targets.
Caveats
- Fallow does syntactic analysis only (no TypeScript type resolution), so some "unused" class members may actually be consumed through interfaces or dynamic access. The test mock findings in particular will need filtering.
- VS Code extension APIs use a lot of convention-based exports (e.g.
activate/deactivate) that fallow already handles via its Electron plugin, but edge cases are possible.
Suggested next steps
- Review the unused exports/types and clean up what is genuinely dead
- Decide if fallow should be added as a dev dependency or just run ad-hoc
- Consider adding a
pnpm fallowscript and/or CI check for new dead code on PRs
- Ngôn ngữ chính
- TypeScript
- Star
- 131
- Fork
- 48
- Merge trung bình
- 4 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 17
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/vscode-coder
-
coder/vscode-coder#1125 · 1 bình luận · 1 người được giao ·
-
Migrate CI setup to pnpm/setup Đang mởtech-debt
coder/vscode-coder#1119 · 1 bình luận · 1 người được giao ·
-
enhancement tech-debt
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
coder/vscode-coder#1118 · 1 bình luận ·
-
coder/vscode-coder#1113 · 3 bình luận · 1 người được giao ·
-
Flush the connection log buffer after N failed reconnect attempts against an unreachable server Đang mởenhancement tech-debt
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
coder/vscode-coder#1112 · 1 bình luận ·
Tất cả issue của coder/vscode-coder
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
mksglu/context-mode#1200 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/claude-code#96687 ·
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
AOSSIE-Org/DebateAI#582 · 2 bình luận ·