dotnet / docfx
Code health
This codebase scores 9.1 out of 10 for code health, which we rate excellent. It also scores maintainability 9.1 and static performance 9.9 out of 10. The three are scored separately and never blended into one number. Risk is concentrated, as it usually is: 3 of 1,462 files are git hotspots, and they average 7.0 — which is where the fixes pay off most.
Do next
3 suggested
3 things worth doing in the week to Oct 4, the last indexed commit.
Worth planning
Break up CreatePdf (CCN 8, 221 lines)
src/Docfx.App/PdfBuilder.cs:155
CreatePdf nests deeply; easier to read and change once split; function changed in 10 commits; its file is imported by 3 files, changed 1 time in 90 days.
- gain
- up to +1.6 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 8, 221 lines, nests 5 deep
- severity
- high
Medium effort, worth a checkBreak up ResolveItemCore (CCN 44, 195 lines)
src/Docfx.Build/TableOfContents/TocResolver.cs:134
ResolveItemCore nests deeply; easier to read and change once split; its file is imported by 1 file.
- gain
- up to +1.1 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 44, 195 lines, nests 5 deep
- severity
- high
Medium effort, worth a checkStart breaking up <anonymous> (CCN 34, 283 lines): first lift lines 57-67
templates/common/RestApi.common.js:57
<anonymous> nests deeply; easier to read and change once split.
- gain
- up to +1.6 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 34, 283 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
- Lines of code
- 82.5K
Recent activity
All commitsCommits
- 96d08d8dbuild(deps-dev): bump brace-expansion from 1.1.18 to 1.1.21 in /templates (#11191)2w ago
- da17e325build(deps): bump dompurify from 3.4.13 to 3.4.16 in /templates (#11190)2w ago
- ba844df6chore: use Union types instead of OneOf library based implementation when targeting .NET 11 (#11182)3w ago
- 2878c528Bump Microsoft.Playwright from 1.62.0 to 1.63.0 (#11186)3w ago
- 220e9777test: remove brittle CI configuration and script tests (#11185)3w ago
- b132125adeps: Update ICSharpCode.Decompiler version (#11184)3w ago
Decisions
- Add Swagger 2.0 compatibility coverage tests for existing parsing/outputproposed · 1w ago
- Restore partial type source links and add configurable PDB source link exclusionsproposed · 1w ago
- Optimize Jint-backed template preprocessor: hidden-class models, single parse, bounded executionproposed · 1w ago
- Optimize Jint-backed template preprocessing via hidden-class models and single-pass parsingproposed · 1w ago
- Migrate test assertion library from FluentAssertions to AwesomeAssertionsproposed · 1w ago
- Reformat YouTube videos to embed URL from pasteable watch URLsproposed · 1w ago
Everything we found
907 open
Every detector's open count by area, each with its worst example. An inventory, not a to-do list: the actions above are the part worth doing.
- worst item is high severity. Code health346Nested complexity · src/Docfx.App/PdfBuilder.cs8 findings · 4.6 deducted
- worst item is low severity. Refactoring27HostService+0.3 health, M effort · src/Docfx.Build/HostService.cs
- worst item is medium severity. Doc drift19docs/docs/markdown.mdLink points at #tab/typescript/windows, which docs/docs/markdown.md no longer declares.
- worst item is medium severity. Decisions12test/compatibility/report.test.mjs9 awaiting review · 3 hotspots ungoverned
- worst item is medium severity. Ownership503docs/template/public/sdk-compatibility.mjs100% single-owner concentration, 2 commits in 90d
Composition
Open the graph- csharp94%
- javascript4%
- typescript1%
- dockerfile<1%
- vbnet<1%
Explore this codebase
- Docs1,250 pages across 6 modules
- ChatAsk this codebase a question and get an answer with its sources.
- Files1,462 files with per-file docs, health and history
- ArchitectureDependency graph, layers, and 8 entry points
- Code healthPer-file scores, 381 open findings, coverage and refactoring targets
- Knowledge graphEntities, communities, and the paths between them
- Change couplingFiles that keep changing together, mined from commit history
- CommitsChange-risk ranked history with agent provenance
- ContributorsBus factor, per-file maintainers, and the human/agent split
- StatsSize class, origin, lifetime churn, rhythm and records
- CostsWhat indexing this snapshot cost, by model and by run.