gohugoio / hugo
Code health
Hotspots average 4.0, the place fixes pay off most.
Explore this codebase
- Code health map25hotspots across 2,110 files
- Ownership694sole-owned files: one author, no second reader
- Architecture38modules, 7 entry points
- Decisions30recorded, of which 0 accepted and 30 awaiting review
- Refactoring197open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 3
3 things worth doing in the week to Aug 19, the last indexed commit.
Worth planning
Start breaking up processPartialFileEvents (CCN 78, 319 lines): first lift lines 1131-1165
hugolib/hugo_sites_build.go:1131
processPartialFileEvents nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 22 commits; its file is imported by 106 files, changed 3 times in 90 days.
- gain
- up to +0.3 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 78, 319 lines, nests 5 deep
- severity
- high
Medium effort, worth a checkStart breaking up setMetaPostParams (CCN 72, 249 lines): first lift lines 848-868
hugolib/page__meta.go:848
setMetaPostParams nests deeply; easier to read and change once split; function changed in 21 commits; its file is imported by 113 files, changed 4 times in 90 days.
- gain
- up to +0.8 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 72, 249 lines, nests 8 deep
- severity
- high
Medium effort, worth a checkStart breaking up handleEvents (CCN 87, 268 lines): first lift lines 696-730
commands/hugobuilder.go:696
handleEvents nests deeply; easier to read and change once split; function changed in 37 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 87, 268 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 health2,350 open findingsCriticalUntested hotspot · tpl/tplimpl/templatestore.go50 findings · 10.0 deducted
- Refactoring197 open opportunitiesMediumtargetPathAlias+1.5 health, S effort · hugolib/alias.go
- Decisions30 to reviewMediumhugolib/page_test.go30 awaiting review, 0 drifting from the code
- Ownership694 sole-owned filesMediumcommon/hugo/version_current.goOne author, no second reader
- Dead code14LowIntegrationTestDebugConfigUnreachable struct (8 lines)