repowisegohugoio/hugo

gohugoio / hugo

gomastera05736c240.2K linessynced 2mo ago

Code health

6.8out of 10Fair

Hotspots average 4.0, the place fixes pay off most.

Explore this codebase

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
    worth a check
  • Start 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
    worth a check
  • Start 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
    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

Everything we found

5 areas