repowiserepowise
Sign in
gohugoio/hugo
OverviewDocsArchitectureKnowledge GraphFilesCode HealthSecurityRefactoring

People & History

CommitsContributorsDecisions
Chat
Stats
repowiserepowise
ExplorePricingDocs
Sign in
repowisegohugoio/hugo
HU
HU

gohugoio / hugo

gomastera05736c240.2K linessynced 1mo ago

Code health

6.8out of 10Fair

This codebase scores 6.8 out of 10 for code health, which we rate fair. It also scores maintainability 8.2 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: 25 of 2,110 files are git hotspots, and they average 4.0 — which is where the fixes pay off most.

Full health report →
Documentation1,685pages0 with model-written prose, 1,685 built from the indexScore validation11/209.3× baselineTop-ranked files that did go on to need a bug fixDead code110exportsUnused exports that nothing in the graph reaches

Do next

4 things worth doing this quarter.

Worth planning

  • Break up handleEvents (CCN 87, 268 lines)

    commands/hugobuilder.go:696

    handleEvents nests its control flow deeply; 3 files import it, 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
  • Break up Sort (CCN 26, 97 lines)

    tpl/collections/sort.go:61

    Sort nests its control flow deeply, and part of it is duplicated, so splitting it also removes a copy; 2 files import it.

    gain
    up to +1.6 health on this file(inferred)
    finding
    Nested complexity
    size
    CCN 26, 97 lines, nests 6 deep
    severity
    high
    Medium effort, worth a check
  • Delete 11 unused symbols and files (52 lines)

    Nothing in the graph reaches them, across 8 files; every reader and agent pays to skip them.

    symbols
    11
    lines
    52
    safe to delete
    Yes(inferred)
    Small effort
  • Flatten the nesting in DoArithmetic

    common/math/math.go:42

    DoArithmetic nests its control flow deeply, and part of it is duplicated, so splitting it also removes a copy; 2 files import it.

    gain
    up to +1.6 health on this file(inferred)
    finding
    Nested complexity
    size
    CCN 36, 110 lines, nests 5 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
240.2K
Files
2,110
Symbols
11,448
Modules
38
Languages
7

Recent activity

All commits →

Commits

  • a05736cbtpl/resources: Add resources.Publish1mo ago
  • 49dceb19hugolib: Fix slice bounds panic when deleting multiple nodes at same path1mo ago
  • 5e709925hugolib: Fix ReadingTime and FuzzyWordCount calculations1mo ago
  • 0805c734releaser: Prepare repository for 0.166.0-DEV1mo ago
  • 76a5e188releaser: Bump versions for release of 0.165.01mo ago
  • 0bb337b2build(deps): bump github.com/bep/imagemeta from 0.17.3 to 1.0.01mo ago

Decisions

  • Fix raw TOML dates in where/eqproposed · 1mo ago
  • Merge slice-valued module config into site configproposed · 1mo ago
  • Harden Node tool execution with --permission flagproposed · 1mo ago
  • Simplify page tree logicproposed · 1mo ago
  • Image resource refactorproposed · 1mo ago
  • Redo server error template and improve error contextproposed · 1mo ago
▸

Everything we found

3,080 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 critical severity. Code health1,947Untested hotspot · tpl/tplimpl/templatestore.go50 findings · 10.0 deducted→
  • worst item is medium severity. Refactoring285targetPathAlias+1.5 health, S effort · hugolib/alias.go→
  • worst item is medium severity. Decisions55hugolib/page_test.go30 awaiting review · 25 hotspots ungoverned→
  • worst item is medium severity. Ownership779common/hugo/version_current.go84% single-owner concentration, 15 commits in 90d→
  • worst item is low severity. Dead code14IntegrationTestDebugConfigUnreachable struct (8 lines)→

Composition

Open the graph →
go 96%
javascript 3%shell 1%c 0%makefile 0%Other 0%

Explore this codebase

  • Docs1,685 pages across 38 modules→
  • ChatAsk this codebase a question and get an answer with its sources.→
  • Files2,110 files with per-file docs, health and history→
  • ArchitectureDependency graph, layers, and 7 entry points→
  • Code healthPer-file scores, 2,451 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.→