emdash-cms / emdash
Code health
Hotspots average 4.8, the place fixes pay off most.
Explore this codebase
- Code health map219hotspots across 2,388 files
- Ownership1,285sole-owned files: one author, no second reader
- Architecture12modules, 197 entry points
- Decisions61recorded, of which 0 in force and 61 background
- Refactoring234open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 3
4 things worth doing in the week to Jul 13, the last indexed commit, 1 of them now.
Worth planning
Start breaking up applySeed (CCN 113, 628 lines): first lift lines 617-685
packages/core/src/seed/apply.ts:617
applySeed nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 12 commits; its file is imported by 15 files, changed 11 times in 90 days.
- gain
- up to +0.1 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 113, 628 lines, nests 9 deep
- severity
- high
Medium effort, worth a checkStart breaking up validateElement (CCN 121, 445 lines): first lift lines 496-554
packages/blocks/src/validation.ts:496
validateElement nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 4 commits; its file is imported by 3 files, changed 5 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 121, 445 lines, nests 6 deep
- severity
- high
Medium effort, worth a checkStart breaking up convertPMNode (CCN 59, 182 lines): first lift lines 264-282
packages/admin/src/components/PortableTextEditor.tsx:264
convertPMNode nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 6 commits; its file is imported by 20 files, changed 27 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 59, 182 lines, nests 6 deep
- severity
- high
Medium effort, worth a check
Improve what Repowise can see
Add a test coverage report
Without one, Repowise cannot tell tested code from untested code, so every test-related action says “unknown”.
- line coverage
- Unknown, no report
Small effort
Everything we found
5 areas
Every detector's open count by area. The actions above are the part worth doing.
- Code health3,545 open findingsCriticalUntested hotspot · packages/core/src/emdash-runtime.ts72 findings · 10.0 deducted
- Refactoring234 open opportunitiesMediumhandleSave+1.5 health, M effort · packages/admin/src/components/FieldEditor.tsx
- Decisions0 drifting from the codeMediumpackages/core/src/emdash-runtime.tsHigh-churn file with no governing decision
- Ownership1,285 sole-owned filesMediumpackages/core/src/astro/middleware.tsOne author, no second reader
- Dead code342LowrouteUnreachable function (0 lines)