-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Two related metric quality issues where test files pollute rankings meant for source files.
1. Coverage metric includes test files as "uncovered"
find_hotspots(metric='coverage') returns test files with score: 1 and reason "no test file found":
analyzer/index.test.ts → score: 1 → "no test file found"
graph/index.test.ts → score: 1 → "no test file found"
parser/index.test.ts → score: 1 → "no test file found"
These files ARE tests. They shouldn't appear in the "needs tests" list.
Location: src/mcp/index.ts:248-251
Fix: Filter files matching *.test.ts / *.spec.ts from coverage hotspot results.
2. Coupling metric — test files and entry points always rank highest
analyzer/index.test.ts → coupling: 1.0 (fan_in: 0, fan_out: 4)
cli.ts → coupling: 1.0 (fan_in: 0, fan_out: 6)
Files with fan_in: 0 always get coupling: 1.0. Test files and entry points are leaf consumers by design — ranking them as "most coupled" is misleading.
Fix options:
- Exclude test files from coupling rankings
- Or separate "source coupling" vs "test coupling" views
- Or weight coupling to deprioritize leaf consumers (fan_in=0)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working