Public report of gohugoio/hugo, published 13 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.3). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 13 November 2026, 11:11 UTC · Survey ID cd_f060cd61e60c41b7b9bcd53d78a402db
gohugoio/hugo
Measured 13 November 2026, 11:10 UTC, at code version 4f8354e
Test reliability is not measured: The suite could not be re-run, but the repository declares tests of its own unreliable.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 1 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 109,315 lines of product code in 3 projects, tests not counted · Estimated rebuild effort: about 1.5 person-years · Weakest lens: Code Health, 35
Findings by how serious they are
16 critical927 serious53 minor
21 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 11:10 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
63of 63 dimensions measured by tools.
968of 996 findings point to an exact file and line, so you can open each one in the code. The other 28 concern the repository as a whole, such as missing documentation.
63dimensions across 7 lenses, read from 109,315 lines of product code in 3 projects.
gohugoio/hugo falls short of our standard for a preview release, held back most by its Code Health lens, the quality of the code itself. It scores 48 out of 100 and is rated Adequate, and 11 of its 16 critical findings are security problems.
Code Health, at 35, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the password or key in the code, worth about 5 points. Adding type checking would lift Code Health itself, worth about 6 points. Raising Code Health to 67 would lift the score to about 58.
Four passwords or keys in the code's history and one in the code are open to anyone who can read the repository. Three pipeline steps install packages that can change without warning, and one automatic update takes new releases before a bad one can be spotted. Replacing each exposed password or key, pinning what the pipeline installs and setting a waiting period for automatic updates would close these risks. Pinning each tool to an exact version would fix the pipeline tool referenced by a changeable name, and the pipeline step that runs a download without checking it needs each download checked against a known checksum first. The three tests the project itself marks as unreliable need fixing or deleting.
The product code is 109,315 lines, about €220,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 53 findings
These 53 critical or serious findings were in the previous survey, on 23 October 2026, and are gone from this one.
Exception handling · Swallowed exception (caught, then discarded) common/version/version.go
Exception handling · Swallowed exception (caught, then discarded) common/version/version.go
Exception handling · Swallowed exception (caught, then discarded) common/version/version.go
Exception handling · Swallowed exception (caught, then discarded) config/commonConfig.go
Exception handling · Swallowed exception (caught, then discarded) config/security/securityConfig.go
Exception handling · Swallowed exception (caught, then discarded) config/security/securityConfig.go
Exception handling · Swallowed exception (caught, then discarded) config/security/securityConfig.go
Exception handling · Swallowed exception (caught, then discarded) REDACTED
Exception handling · Swallowed exception (caught, then discarded) REDACTED
Exception handling · Swallowed exception (caught, then discarded) helpers/url.go
Exception handling · Swallowed exception (caught, then discarded) helpers/url.go
Exception handling · Swallowed exception (caught, then discarded) hugofs/rootmapping_fs.go
Exception handling · Swallowed exception (caught, then discarded) hugofs/fs.go
Exception handling · Swallowed exception (caught, then discarded) hugolib/page__ref.go
Exception handling · Swallowed exception (caught, then discarded) hugolib/filesystems/basefs.go
Exception handling · Swallowed exception (caught, then discarded) hugolib/filesystems/basefs.go
A11y enforcement · Accessibility enforcement below the top rung
Rebuild cost: about €220,000 · Estimate
Cost to rebuild
€73,000 to €370,000, for 1,218 to 3,863 hours of work, about 1.5 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 48. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 109,315 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 6 points · Medium effort · Type Safety
3
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
Raises the score by about 6 points · Medium effort · Dead Code
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €220,000 to build again, about 1.5 person-years of work. Its weakest lens is Code Health, at 35 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 1 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 15,290 lines over the last 90 days, which is about 62,009 lines a year. At that pace, the extra work comes to an estimated 6.3 to 38.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
197 modules, with 560 dependencies between them. 3 loops run through 14 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 157 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
com/gohugoio/hugo/cache/dynacache uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/cache/dynacache, while a change to com/gohugoio/hugo/cache/dynacache can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/cache/dynacache uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/cache/dynacache uses com/gohugoio/hugo/identity, so a change to com/gohugoio/hugo/identity can break com/gohugoio/hugo/cache/dynacache, while a change to com/gohugoio/hugo/cache/dynacache can't break com/gohugoio/hugo/identity.
Position
Below the diagonal: com/gohugoio/hugo/cache/dynacache uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/common/hmaps uses com/gohugoio/hugo/common/hstrings, so a change to com/gohugoio/hugo/common/hstrings can break com/gohugoio/hugo/common/hmaps, while a change to com/gohugoio/hugo/common/hmaps can't break com/gohugoio/hugo/common/hstrings.
Position
Below the diagonal: com/gohugoio/hugo/common/hmaps uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/common/hmaps uses com/gohugoio/hugo/common/types, so a change to com/gohugoio/hugo/common/types can break com/gohugoio/hugo/common/hmaps, while a change to com/gohugoio/hugo/common/hmaps can't break com/gohugoio/hugo/common/types.
Position
Below the diagonal: com/gohugoio/hugo/common/hmaps uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/converter/hooks uses com/gohugoio/hugo/common/hugio, so a change to com/gohugoio/hugo/common/hugio can break com/gohugoio/hugo/markup/converter/hooks, while a change to com/gohugoio/hugo/markup/converter/hooks can't break com/gohugoio/hugo/common/hugio.
Position
Below the diagonal: com/gohugoio/hugo/markup/converter/hooks uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/common/hexec uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/common/hexec, while a change to com/gohugoio/hugo/common/hexec can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/common/hexec uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/common/hexec uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/common/hexec, while a change to com/gohugoio/hugo/common/hexec can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/common/hexec uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/sitesmatrix uses com/gohugoio/hugo/common/predicate, so a change to com/gohugoio/hugo/common/predicate can break com/gohugoio/hugo/hugolib/sitesmatrix, while a change to com/gohugoio/hugo/hugolib/sitesmatrix can't break com/gohugoio/hugo/common/predicate.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/sitesmatrix uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/sitesmatrix uses com/gohugoio/hugo/common/types, so a change to com/gohugoio/hugo/common/types can break com/gohugoio/hugo/hugolib/sitesmatrix, while a change to com/gohugoio/hugo/hugolib/sitesmatrix can't break com/gohugoio/hugo/common/types.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/sitesmatrix uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/sitesmatrix uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/hugolib/sitesmatrix, while a change to com/gohugoio/hugo/hugolib/sitesmatrix can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/sitesmatrix uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/common/paths uses com/gohugoio/hugo/common/types, so a change to com/gohugoio/hugo/common/types can break com/gohugoio/hugo/common/paths, while a change to com/gohugoio/hugo/common/paths can't break com/gohugoio/hugo/common/types.
Position
Below the diagonal: com/gohugoio/hugo/common/paths uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/common/paths uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/common/paths, while a change to com/gohugoio/hugo/common/paths can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/common/paths uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/common/paths uses com/gohugoio/hugo/hugolib/sitesmatrix, so a change to com/gohugoio/hugo/hugolib/sitesmatrix can break com/gohugoio/hugo/common/paths, while a change to com/gohugoio/hugo/common/paths can't break com/gohugoio/hugo/hugolib/sitesmatrix.
Position
Below the diagonal: com/gohugoio/hugo/common/paths uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config uses com/gohugoio/hugo/common/hstrings, so a change to com/gohugoio/hugo/common/hstrings can break com/gohugoio/hugo/config, while a change to com/gohugoio/hugo/config can't break com/gohugoio/hugo/common/hstrings.
Position
Below the diagonal: com/gohugoio/hugo/config uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/config, while a change to com/gohugoio/hugo/config can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/config uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config uses com/gohugoio/hugo/common/predicate, so a change to com/gohugoio/hugo/common/predicate can break com/gohugoio/hugo/config, while a change to com/gohugoio/hugo/config can't break com/gohugoio/hugo/common/predicate.
Position
Below the diagonal: com/gohugoio/hugo/config uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config uses com/gohugoio/hugo/common/types, so a change to com/gohugoio/hugo/common/types can break com/gohugoio/hugo/config, while a change to com/gohugoio/hugo/config can't break com/gohugoio/hugo/common/types.
Position
Below the diagonal: com/gohugoio/hugo/config uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config uses com/gohugoio/hugo/identity, so a change to com/gohugoio/hugo/identity can break com/gohugoio/hugo/config, while a change to com/gohugoio/hugo/config can't break com/gohugoio/hugo/identity.
Position
Below the diagonal: com/gohugoio/hugo/config uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/config, while a change to com/gohugoio/hugo/config can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/config uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config uses com/gohugoio/hugo/hugolib/sitesmatrix, so a change to com/gohugoio/hugo/hugolib/sitesmatrix can break com/gohugoio/hugo/config, while a change to com/gohugoio/hugo/config can't break com/gohugoio/hugo/hugolib/sitesmatrix.
Position
Below the diagonal: com/gohugoio/hugo/config uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config uses com/gohugoio/hugo/common/paths, so a change to com/gohugoio/hugo/common/paths can break com/gohugoio/hugo/config, while a change to com/gohugoio/hugo/config can't break com/gohugoio/hugo/common/paths.
Position
Below the diagonal: com/gohugoio/hugo/config uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugofs uses com/gohugoio/hugo/common/hugio, so a change to com/gohugoio/hugo/common/hugio can break com/gohugoio/hugo/hugofs, while a change to com/gohugoio/hugo/hugofs can't break com/gohugoio/hugo/common/hugio.
Position
Below the diagonal: com/gohugoio/hugo/hugofs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugofs uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/hugofs, while a change to com/gohugoio/hugo/hugofs can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/hugofs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugofs uses com/gohugoio/hugo/common/types, so a change to com/gohugoio/hugo/common/types can break com/gohugoio/hugo/hugofs, while a change to com/gohugoio/hugo/hugofs can't break com/gohugoio/hugo/common/types.
Position
Below the diagonal: com/gohugoio/hugo/hugofs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugofs uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/hugofs, while a change to com/gohugoio/hugo/hugofs can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/hugofs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugofs uses com/gohugoio/hugo/hugolib/sitesmatrix, so a change to com/gohugoio/hugo/hugolib/sitesmatrix can break com/gohugoio/hugo/hugofs, while a change to com/gohugoio/hugo/hugofs can't break com/gohugoio/hugo/hugolib/sitesmatrix.
Position
Below the diagonal: com/gohugoio/hugo/hugofs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugofs uses com/gohugoio/hugo/common/paths, so a change to com/gohugoio/hugo/common/paths can break com/gohugoio/hugo/hugofs, while a change to com/gohugoio/hugo/hugofs can't break com/gohugoio/hugo/common/paths.
Position
Below the diagonal: com/gohugoio/hugo/hugofs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugofs uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/hugofs, while a change to com/gohugoio/hugo/hugofs can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/hugofs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/langs uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/langs, while a change to com/gohugoio/hugo/langs can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/langs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/langs uses com/gohugoio/hugo/common/predicate, so a change to com/gohugoio/hugo/common/predicate can break com/gohugoio/hugo/langs, while a change to com/gohugoio/hugo/langs can't break com/gohugoio/hugo/common/predicate.
Position
Below the diagonal: com/gohugoio/hugo/langs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/langs uses com/gohugoio/hugo/common/types, so a change to com/gohugoio/hugo/common/types can break com/gohugoio/hugo/langs, while a change to com/gohugoio/hugo/langs can't break com/gohugoio/hugo/common/types.
Position
Below the diagonal: com/gohugoio/hugo/langs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/langs uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/langs, while a change to com/gohugoio/hugo/langs can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/langs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/langs uses com/gohugoio/hugo/hugolib/sitesmatrix, so a change to com/gohugoio/hugo/hugolib/sitesmatrix can break com/gohugoio/hugo/langs, while a change to com/gohugoio/hugo/langs can't break com/gohugoio/hugo/hugolib/sitesmatrix.
Position
Below the diagonal: com/gohugoio/hugo/langs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/langs uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/langs, while a change to com/gohugoio/hugo/langs can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/langs uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/highlight uses com/gohugoio/hugo/common/hugio, so a change to com/gohugoio/hugo/common/hugio can break com/gohugoio/hugo/markup/highlight, while a change to com/gohugoio/hugo/markup/highlight can't break com/gohugoio/hugo/common/hugio.
Position
Below the diagonal: com/gohugoio/hugo/markup/highlight uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/highlight uses com/gohugoio/hugo/markup/converter/hooks, so a change to com/gohugoio/hugo/markup/converter/hooks can break com/gohugoio/hugo/markup/highlight, while a change to com/gohugoio/hugo/markup/highlight can't break com/gohugoio/hugo/markup/converter/hooks.
Position
Below the diagonal: com/gohugoio/hugo/markup/highlight uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/highlight uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/markup/highlight, while a change to com/gohugoio/hugo/markup/highlight can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/markup/highlight uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/media uses com/gohugoio/hugo/common/paths, so a change to com/gohugoio/hugo/common/paths can break com/gohugoio/hugo/media, while a change to com/gohugoio/hugo/media can't break com/gohugoio/hugo/common/paths.
Position
Below the diagonal: com/gohugoio/hugo/media uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/media uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/media, while a change to com/gohugoio/hugo/media can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/media uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/markup_config uses com/gohugoio/hugo/markup/tableofcontents, so a change to com/gohugoio/hugo/markup/tableofcontents can break com/gohugoio/hugo/markup/markup_config, while a change to com/gohugoio/hugo/markup/markup_config can't break com/gohugoio/hugo/markup/tableofcontents.
Position
Below the diagonal: com/gohugoio/hugo/markup/markup_config uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/markup_config uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/markup/markup_config, while a change to com/gohugoio/hugo/markup/markup_config can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/markup/markup_config uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/markup_config uses com/gohugoio/hugo/markup/highlight, so a change to com/gohugoio/hugo/markup/highlight can break com/gohugoio/hugo/markup/markup_config, while a change to com/gohugoio/hugo/markup/markup_config can't break com/gohugoio/hugo/markup/highlight.
Position
Below the diagonal: com/gohugoio/hugo/markup/markup_config uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/modules uses com/gohugoio/hugo/common/hstrings, so a change to com/gohugoio/hugo/common/hstrings can break com/gohugoio/hugo/modules, while a change to com/gohugoio/hugo/modules can't break com/gohugoio/hugo/common/hstrings.
Position
Below the diagonal: com/gohugoio/hugo/modules uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/modules uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/modules, while a change to com/gohugoio/hugo/modules can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/modules uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/modules uses com/gohugoio/hugo/common/hexec, so a change to com/gohugoio/hugo/common/hexec can break com/gohugoio/hugo/modules, while a change to com/gohugoio/hugo/modules can't break com/gohugoio/hugo/common/hexec.
Position
Below the diagonal: com/gohugoio/hugo/modules uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/modules uses com/gohugoio/hugo/hugolib/sitesmatrix, so a change to com/gohugoio/hugo/hugolib/sitesmatrix can break com/gohugoio/hugo/modules, while a change to com/gohugoio/hugo/modules can't break com/gohugoio/hugo/hugolib/sitesmatrix.
Position
Below the diagonal: com/gohugoio/hugo/modules uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/modules uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/modules, while a change to com/gohugoio/hugo/modules can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/modules uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/modules uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/modules, while a change to com/gohugoio/hugo/modules can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/modules uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/output uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/output, while a change to com/gohugoio/hugo/output can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/output uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/output uses com/gohugoio/hugo/media, so a change to com/gohugoio/hugo/media can break com/gohugoio/hugo/output, while a change to com/gohugoio/hugo/output can't break com/gohugoio/hugo/media.
Position
Below the diagonal: com/gohugoio/hugo/output uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/resource uses com/gohugoio/hugo/common/hugio, so a change to com/gohugoio/hugo/common/hugio can break com/gohugoio/hugo/resources/resource, while a change to com/gohugoio/hugo/resources/resource can't break com/gohugoio/hugo/common/hugio.
Position
Below the diagonal: com/gohugoio/hugo/resources/resource uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/resource uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/resources/resource, while a change to com/gohugoio/hugo/resources/resource can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/resources/resource uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/resource uses com/gohugoio/hugo/langs, so a change to com/gohugoio/hugo/langs can break com/gohugoio/hugo/resources/resource, while a change to com/gohugoio/hugo/resources/resource can't break com/gohugoio/hugo/langs.
Position
Below the diagonal: com/gohugoio/hugo/resources/resource uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/resource uses com/gohugoio/hugo/media, so a change to com/gohugoio/hugo/media can break com/gohugoio/hugo/resources/resource, while a change to com/gohugoio/hugo/resources/resource can't break com/gohugoio/hugo/media.
Position
Below the diagonal: com/gohugoio/hugo/resources/resource uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/filesystems uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/hugolib/filesystems, while a change to com/gohugoio/hugo/hugolib/filesystems can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/filesystems uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/filesystems uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/hugolib/filesystems, while a change to com/gohugoio/hugo/hugolib/filesystems can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/filesystems uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/filesystems uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/hugolib/filesystems, while a change to com/gohugoio/hugo/hugolib/filesystems can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/filesystems uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/filesystems uses com/gohugoio/hugo/modules, so a change to com/gohugoio/hugo/modules can break com/gohugoio/hugo/hugolib/filesystems, while a change to com/gohugoio/hugo/hugolib/filesystems can't break com/gohugoio/hugo/modules.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/filesystems uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/converter uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/markup/converter, while a change to com/gohugoio/hugo/markup/converter can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/markup/converter uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/converter uses com/gohugoio/hugo/identity, so a change to com/gohugoio/hugo/identity can break com/gohugoio/hugo/markup/converter, while a change to com/gohugoio/hugo/markup/converter can't break com/gohugoio/hugo/identity.
Position
Below the diagonal: com/gohugoio/hugo/markup/converter uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/converter uses com/gohugoio/hugo/markup/tableofcontents, so a change to com/gohugoio/hugo/markup/tableofcontents can break com/gohugoio/hugo/markup/converter, while a change to com/gohugoio/hugo/markup/converter can't break com/gohugoio/hugo/markup/tableofcontents.
Position
Below the diagonal: com/gohugoio/hugo/markup/converter uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/converter uses com/gohugoio/hugo/markup/converter/hooks, so a change to com/gohugoio/hugo/markup/converter/hooks can break com/gohugoio/hugo/markup/converter, while a change to com/gohugoio/hugo/markup/converter can't break com/gohugoio/hugo/markup/converter/hooks.
Position
Below the diagonal: com/gohugoio/hugo/markup/converter uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/converter uses com/gohugoio/hugo/common/hexec, so a change to com/gohugoio/hugo/common/hexec can break com/gohugoio/hugo/markup/converter, while a change to com/gohugoio/hugo/markup/converter can't break com/gohugoio/hugo/common/hexec.
Position
Below the diagonal: com/gohugoio/hugo/markup/converter uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/converter uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/markup/converter, while a change to com/gohugoio/hugo/markup/converter can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/markup/converter uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/converter uses com/gohugoio/hugo/markup/highlight, so a change to com/gohugoio/hugo/markup/highlight can break com/gohugoio/hugo/markup/converter, while a change to com/gohugoio/hugo/markup/converter can't break com/gohugoio/hugo/markup/highlight.
Position
Below the diagonal: com/gohugoio/hugo/markup/converter uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/markup/converter uses com/gohugoio/hugo/markup/markup_config, so a change to com/gohugoio/hugo/markup/markup_config can break com/gohugoio/hugo/markup/converter, while a change to com/gohugoio/hugo/markup/converter can't break com/gohugoio/hugo/markup/markup_config.
Position
Below the diagonal: com/gohugoio/hugo/markup/converter uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/images uses com/gohugoio/hugo/common/hugio, so a change to com/gohugoio/hugo/common/hugio can break com/gohugoio/hugo/resources/images, while a change to com/gohugoio/hugo/resources/images can't break com/gohugoio/hugo/common/hugio.
Position
Below the diagonal: com/gohugoio/hugo/resources/images uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/images uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/resources/images, while a change to com/gohugoio/hugo/resources/images can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/resources/images uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/images uses com/gohugoio/hugo/media, so a change to com/gohugoio/hugo/media can break com/gohugoio/hugo/resources/images, while a change to com/gohugoio/hugo/resources/images can't break com/gohugoio/hugo/media.
Position
Below the diagonal: com/gohugoio/hugo/resources/images uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/images uses com/gohugoio/hugo/resources/resource, so a change to com/gohugoio/hugo/resources/resource can break com/gohugoio/hugo/resources/images, while a change to com/gohugoio/hugo/resources/images can't break com/gohugoio/hugo/resources/resource.
Position
Below the diagonal: com/gohugoio/hugo/resources/images uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page/pagemeta uses com/gohugoio/hugo/common/hugio, so a change to com/gohugoio/hugo/common/hugio can break com/gohugoio/hugo/resources/page/pagemeta, while a change to com/gohugoio/hugo/resources/page/pagemeta can't break com/gohugoio/hugo/common/hugio.
Position
Below the diagonal: com/gohugoio/hugo/resources/page/pagemeta uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page/pagemeta uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/resources/page/pagemeta, while a change to com/gohugoio/hugo/resources/page/pagemeta can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/resources/page/pagemeta uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page/pagemeta uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/resources/page/pagemeta, while a change to com/gohugoio/hugo/resources/page/pagemeta can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/resources/page/pagemeta uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page/pagemeta uses com/gohugoio/hugo/hugolib/sitesmatrix, so a change to com/gohugoio/hugo/hugolib/sitesmatrix can break com/gohugoio/hugo/resources/page/pagemeta, while a change to com/gohugoio/hugo/resources/page/pagemeta can't break com/gohugoio/hugo/hugolib/sitesmatrix.
Position
Below the diagonal: com/gohugoio/hugo/resources/page/pagemeta uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page/pagemeta uses com/gohugoio/hugo/common/paths, so a change to com/gohugoio/hugo/common/paths can break com/gohugoio/hugo/resources/page/pagemeta, while a change to com/gohugoio/hugo/resources/page/pagemeta can't break com/gohugoio/hugo/common/paths.
Position
Below the diagonal: com/gohugoio/hugo/resources/page/pagemeta uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page/pagemeta uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/resources/page/pagemeta, while a change to com/gohugoio/hugo/resources/page/pagemeta can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/resources/page/pagemeta uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page/pagemeta uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/resources/page/pagemeta, while a change to com/gohugoio/hugo/resources/page/pagemeta can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/resources/page/pagemeta uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page/pagemeta uses com/gohugoio/hugo/media, so a change to com/gohugoio/hugo/media can break com/gohugoio/hugo/resources/page/pagemeta, while a change to com/gohugoio/hugo/resources/page/pagemeta can't break com/gohugoio/hugo/media.
Position
Below the diagonal: com/gohugoio/hugo/resources/page/pagemeta uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page/pagemeta uses com/gohugoio/hugo/output, so a change to com/gohugoio/hugo/output can break com/gohugoio/hugo/resources/page/pagemeta, while a change to com/gohugoio/hugo/resources/page/pagemeta can't break com/gohugoio/hugo/output.
Position
Below the diagonal: com/gohugoio/hugo/resources/page/pagemeta uses a module listed above it, which is the healthy direction.
26→38 com/gohugoio/hugo/resources/page/pagemeta uses com/gohugoio/hugo/resources/pagepart of a loop✕
Connections
1 pair of types, where a type in com/gohugoio/hugo/resources/page/pagemeta uses a type in com/gohugoio/hugo/resources/page.
com/gohugoio/hugo/resources/page/pagemeta uses com/gohugoio/hugo/resources/page, so a change to com/gohugoio/hugo/resources/page can break com/gohugoio/hugo/resources/page/pagemeta, while a change to com/gohugoio/hugo/resources/page/pagemeta can't break com/gohugoio/hugo/resources/page.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
com/gohugoio/hugo/tpl/tplimpl uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/tpl/tplimpl, while a change to com/gohugoio/hugo/tpl/tplimpl can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/tpl/tplimpl uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/tplimpl uses com/gohugoio/hugo/identity, so a change to com/gohugoio/hugo/identity can break com/gohugoio/hugo/tpl/tplimpl, while a change to com/gohugoio/hugo/tpl/tplimpl can't break com/gohugoio/hugo/identity.
Position
Below the diagonal: com/gohugoio/hugo/tpl/tplimpl uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/tplimpl uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/tpl/tplimpl, while a change to com/gohugoio/hugo/tpl/tplimpl can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/tpl/tplimpl uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/tplimpl uses com/gohugoio/hugo/hugolib/sitesmatrix, so a change to com/gohugoio/hugo/hugolib/sitesmatrix can break com/gohugoio/hugo/tpl/tplimpl, while a change to com/gohugoio/hugo/tpl/tplimpl can't break com/gohugoio/hugo/hugolib/sitesmatrix.
Position
Below the diagonal: com/gohugoio/hugo/tpl/tplimpl uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/tplimpl uses com/gohugoio/hugo/common/paths, so a change to com/gohugoio/hugo/common/paths can break com/gohugoio/hugo/tpl/tplimpl, while a change to com/gohugoio/hugo/tpl/tplimpl can't break com/gohugoio/hugo/common/paths.
Position
Below the diagonal: com/gohugoio/hugo/tpl/tplimpl uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/tplimpl uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/tpl/tplimpl, while a change to com/gohugoio/hugo/tpl/tplimpl can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/tpl/tplimpl uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/tplimpl uses com/gohugoio/hugo/media, so a change to com/gohugoio/hugo/media can break com/gohugoio/hugo/tpl/tplimpl, while a change to com/gohugoio/hugo/tpl/tplimpl can't break com/gohugoio/hugo/media.
Position
Below the diagonal: com/gohugoio/hugo/tpl/tplimpl uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/tplimpl uses com/gohugoio/hugo/output, so a change to com/gohugoio/hugo/output can break com/gohugoio/hugo/tpl/tplimpl, while a change to com/gohugoio/hugo/tpl/tplimpl can't break com/gohugoio/hugo/output.
Position
Below the diagonal: com/gohugoio/hugo/tpl/tplimpl uses a module listed above it, which is the healthy direction.
27→38 com/gohugoio/hugo/tpl/tplimpl uses com/gohugoio/hugo/resources/pagepart of a loop✕
Connections
2 pairs of types, where a type in com/gohugoio/hugo/tpl/tplimpl uses a type in com/gohugoio/hugo/resources/page.
com/gohugoio/hugo/tpl/tplimpl uses com/gohugoio/hugo/resources/page, so a change to com/gohugoio/hugo/resources/page can break com/gohugoio/hugo/tpl/tplimpl, while a change to com/gohugoio/hugo/tpl/tplimpl can't break com/gohugoio/hugo/resources/page.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
com/gohugoio/hugo/helpers uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/helpers, while a change to com/gohugoio/hugo/helpers can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/helpers uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/helpers uses com/gohugoio/hugo/common/hexec, so a change to com/gohugoio/hugo/common/hexec can break com/gohugoio/hugo/helpers, while a change to com/gohugoio/hugo/helpers can't break com/gohugoio/hugo/common/hexec.
Position
Below the diagonal: com/gohugoio/hugo/helpers uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/helpers uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/helpers, while a change to com/gohugoio/hugo/helpers can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/helpers uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/helpers uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/helpers, while a change to com/gohugoio/hugo/helpers can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/helpers uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/helpers uses com/gohugoio/hugo/hugolib/filesystems, so a change to com/gohugoio/hugo/hugolib/filesystems can break com/gohugoio/hugo/helpers, while a change to com/gohugoio/hugo/helpers can't break com/gohugoio/hugo/hugolib/filesystems.
Position
Below the diagonal: com/gohugoio/hugo/helpers uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/helpers uses com/gohugoio/hugo/markup/converter, so a change to com/gohugoio/hugo/markup/converter can break com/gohugoio/hugo/helpers, while a change to com/gohugoio/hugo/helpers can't break com/gohugoio/hugo/markup/converter.
Position
Below the diagonal: com/gohugoio/hugo/helpers uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/pagesfromdata uses com/gohugoio/hugo/identity, so a change to com/gohugoio/hugo/identity can break com/gohugoio/hugo/hugolib/pagesfromdata, while a change to com/gohugoio/hugo/hugolib/pagesfromdata can't break com/gohugoio/hugo/identity.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/pagesfromdata uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/pagesfromdata uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/hugolib/pagesfromdata, while a change to com/gohugoio/hugo/hugolib/pagesfromdata can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/pagesfromdata uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/pagesfromdata uses com/gohugoio/hugo/common/paths, so a change to com/gohugoio/hugo/common/paths can break com/gohugoio/hugo/hugolib/pagesfromdata, while a change to com/gohugoio/hugo/hugolib/pagesfromdata can't break com/gohugoio/hugo/common/paths.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/pagesfromdata uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/pagesfromdata uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/hugolib/pagesfromdata, while a change to com/gohugoio/hugo/hugolib/pagesfromdata can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/pagesfromdata uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/pagesfromdata uses com/gohugoio/hugo/resources/resource, so a change to com/gohugoio/hugo/resources/resource can break com/gohugoio/hugo/hugolib/pagesfromdata, while a change to com/gohugoio/hugo/hugolib/pagesfromdata can't break com/gohugoio/hugo/resources/resource.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/pagesfromdata uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib/pagesfromdata uses com/gohugoio/hugo/tpl/tplimpl, so a change to com/gohugoio/hugo/tpl/tplimpl can break com/gohugoio/hugo/hugolib/pagesfromdata, while a change to com/gohugoio/hugo/hugolib/pagesfromdata can't break com/gohugoio/hugo/tpl/tplimpl.
Position
Below the diagonal: com/gohugoio/hugo/hugolib/pagesfromdata uses a module listed above it, which is the healthy direction.
29→38 com/gohugoio/hugo/hugolib/pagesfromdata uses com/gohugoio/hugo/resources/pagepart of a loop✕
Connections
4 pairs of types, where a type in com/gohugoio/hugo/hugolib/pagesfromdata uses a type in com/gohugoio/hugo/resources/page.
com/gohugoio/hugo/hugolib/pagesfromdata uses com/gohugoio/hugo/resources/page, so a change to com/gohugoio/hugo/resources/page can break com/gohugoio/hugo/hugolib/pagesfromdata, while a change to com/gohugoio/hugo/hugolib/pagesfromdata can't break com/gohugoio/hugo/resources/page.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/common/hugio, so a change to com/gohugoio/hugo/common/hugio can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/common/hugio.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/common/types, so a change to com/gohugoio/hugo/common/types can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/common/types.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/identity, so a change to com/gohugoio/hugo/identity can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/identity.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/cache/dynacache, so a change to com/gohugoio/hugo/cache/dynacache can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/cache/dynacache.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/common/hexec, so a change to com/gohugoio/hugo/common/hexec can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/common/hexec.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/common/paths, so a change to com/gohugoio/hugo/common/paths can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/common/paths.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/media, so a change to com/gohugoio/hugo/media can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/media.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/output, so a change to com/gohugoio/hugo/output can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/output.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
67 pairs of types, where a type in com/gohugoio/hugo/resources uses a type in com/gohugoio/hugo/resources/resource. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/resources/resource, so a change to com/gohugoio/hugo/resources/resource can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/resources/resource.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/resources/images, so a change to com/gohugoio/hugo/resources/images can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/resources/images.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/resources/page/pagemeta, so a change to com/gohugoio/hugo/resources/page/pagemeta can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/resources/page/pagemeta.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/helpers, so a change to com/gohugoio/hugo/helpers can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/helpers.
Position
Below the diagonal: com/gohugoio/hugo/resources uses a module listed above it, which is the healthy direction.
30→34 com/gohugoio/hugo/resources uses com/gohugoio/hugo/hugolibpart of a loop✕
Connections
4 pairs of types, where a type in com/gohugoio/hugo/resources uses a type in com/gohugoio/hugo/hugolib.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/hugolib, so a change to com/gohugoio/hugo/hugolib can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/hugolib.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
30→38 com/gohugoio/hugo/resources uses com/gohugoio/hugo/resources/pagepart of a loop✕
Connections
4 pairs of types, where a type in com/gohugoio/hugo/resources uses a type in com/gohugoio/hugo/resources/page.
com/gohugoio/hugo/resources uses com/gohugoio/hugo/resources/page, so a change to com/gohugoio/hugo/resources/page can break com/gohugoio/hugo/resources, while a change to com/gohugoio/hugo/resources can't break com/gohugoio/hugo/resources/page.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
com/gohugoio/hugo/source uses com/gohugoio/hugo/common/hugio, so a change to com/gohugoio/hugo/common/hugio can break com/gohugoio/hugo/source, while a change to com/gohugoio/hugo/source can't break com/gohugoio/hugo/common/hugio.
Position
Below the diagonal: com/gohugoio/hugo/source uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/source uses com/gohugoio/hugo/common/paths, so a change to com/gohugoio/hugo/common/paths can break com/gohugoio/hugo/source, while a change to com/gohugoio/hugo/source can't break com/gohugoio/hugo/common/paths.
Position
Below the diagonal: com/gohugoio/hugo/source uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/source uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/source, while a change to com/gohugoio/hugo/source can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/source uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/source uses com/gohugoio/hugo/helpers, so a change to com/gohugoio/hugo/helpers can break com/gohugoio/hugo/source, while a change to com/gohugoio/hugo/source can't break com/gohugoio/hugo/helpers.
Position
Below the diagonal: com/gohugoio/hugo/source uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/deps uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/common/types, so a change to com/gohugoio/hugo/common/types can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/common/types.
Position
Below the diagonal: com/gohugoio/hugo/deps uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/identity, so a change to com/gohugoio/hugo/identity can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/identity.
Position
Below the diagonal: com/gohugoio/hugo/deps uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/cache/dynacache, so a change to com/gohugoio/hugo/cache/dynacache can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/cache/dynacache.
Position
Below the diagonal: com/gohugoio/hugo/deps uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/deps uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/common/hexec, so a change to com/gohugoio/hugo/common/hexec can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/common/hexec.
Position
Below the diagonal: com/gohugoio/hugo/deps uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/deps uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/deps uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/tpl/tplimpl, so a change to com/gohugoio/hugo/tpl/tplimpl can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/tpl/tplimpl.
Position
Below the diagonal: com/gohugoio/hugo/deps uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/resources, so a change to com/gohugoio/hugo/resources can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/resources.
Position
Below the diagonal: com/gohugoio/hugo/deps uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/source, so a change to com/gohugoio/hugo/source can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/source.
Position
Below the diagonal: com/gohugoio/hugo/deps uses a module listed above it, which is the healthy direction.
32→38 com/gohugoio/hugo/deps uses com/gohugoio/hugo/resources/pagepart of a loop✕
Connections
2 pairs of types, where a type in com/gohugoio/hugo/deps uses a type in com/gohugoio/hugo/resources/page.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/resources/page, so a change to com/gohugoio/hugo/resources/page can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/resources/page.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
32→39 com/gohugoio/hugo/deps uses com/gohugoio/hugo/config/allconfigpart of a loop✕
Connections
1 pair of types, where a type in com/gohugoio/hugo/deps uses a type in com/gohugoio/hugo/config/allconfig.
com/gohugoio/hugo/deps uses com/gohugoio/hugo/config/allconfig, so a change to com/gohugoio/hugo/config/allconfig can break com/gohugoio/hugo/deps, while a change to com/gohugoio/hugo/deps can't break com/gohugoio/hugo/config/allconfig.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
com/gohugoio/hugo/resources/resource_factories/create uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/resources/resource_factories/create, while a change to com/gohugoio/hugo/resources/resource_factories/create can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/resources/resource_factories/create uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/resource_factories/create uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/resources/resource_factories/create, while a change to com/gohugoio/hugo/resources/resource_factories/create can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/resources/resource_factories/create uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/resource_factories/create uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/resources/resource_factories/create, while a change to com/gohugoio/hugo/resources/resource_factories/create can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/resources/resource_factories/create uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/resource_factories/create uses com/gohugoio/hugo/resources/resource, so a change to com/gohugoio/hugo/resources/resource can break com/gohugoio/hugo/resources/resource_factories/create, while a change to com/gohugoio/hugo/resources/resource_factories/create can't break com/gohugoio/hugo/resources/resource.
Position
Below the diagonal: com/gohugoio/hugo/resources/resource_factories/create uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/resource_factories/create uses com/gohugoio/hugo/resources, so a change to com/gohugoio/hugo/resources can break com/gohugoio/hugo/resources/resource_factories/create, while a change to com/gohugoio/hugo/resources/resource_factories/create can't break com/gohugoio/hugo/resources.
Position
Below the diagonal: com/gohugoio/hugo/resources/resource_factories/create uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/common/hugio, so a change to com/gohugoio/hugo/common/hugio can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/common/hugio.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/common/predicate, so a change to com/gohugoio/hugo/common/predicate can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/common/predicate.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/common/types, so a change to com/gohugoio/hugo/common/types can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/common/types.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/identity, so a change to com/gohugoio/hugo/identity can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/identity.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/markup/tableofcontents, so a change to com/gohugoio/hugo/markup/tableofcontents can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/markup/tableofcontents.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/cache/dynacache, so a change to com/gohugoio/hugo/cache/dynacache can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/cache/dynacache.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/markup/converter/hooks, so a change to com/gohugoio/hugo/markup/converter/hooks can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/markup/converter/hooks.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/hugolib/sitesmatrix, so a change to com/gohugoio/hugo/hugolib/sitesmatrix can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/hugolib/sitesmatrix.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/common/paths, so a change to com/gohugoio/hugo/common/paths can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/common/paths.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/langs, so a change to com/gohugoio/hugo/langs can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/langs.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/modules, so a change to com/gohugoio/hugo/modules can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/modules.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/output, so a change to com/gohugoio/hugo/output can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/output.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
86 pairs of types, where a type in com/gohugoio/hugo/hugolib uses a type in com/gohugoio/hugo/resources/resource. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/resources/resource, so a change to com/gohugoio/hugo/resources/resource can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/resources/resource.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/markup/converter, so a change to com/gohugoio/hugo/markup/converter can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/markup/converter.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/resources/page/pagemeta, so a change to com/gohugoio/hugo/resources/page/pagemeta can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/resources/page/pagemeta.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/tpl/tplimpl, so a change to com/gohugoio/hugo/tpl/tplimpl can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/tpl/tplimpl.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/hugolib/pagesfromdata, so a change to com/gohugoio/hugo/hugolib/pagesfromdata can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/hugolib/pagesfromdata.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/resources, so a change to com/gohugoio/hugo/resources can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/resources.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/source, so a change to com/gohugoio/hugo/source can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/source.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/deps, so a change to com/gohugoio/hugo/deps can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/deps.
Position
Below the diagonal: com/gohugoio/hugo/hugolib uses a module listed above it, which is the healthy direction.
34→38 com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/resources/pagepart of a loop✕
Connections
215 pairs of types, where a type in com/gohugoio/hugo/hugolib uses a type in com/gohugoio/hugo/resources/page. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/resources/page, so a change to com/gohugoio/hugo/resources/page can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/resources/page.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
34→39 com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/config/allconfigpart of a loop✕
Connections
3 pairs of types, where a type in com/gohugoio/hugo/hugolib uses a type in com/gohugoio/hugo/config/allconfig.
com/gohugoio/hugo/hugolib uses com/gohugoio/hugo/config/allconfig, so a change to com/gohugoio/hugo/config/allconfig can break com/gohugoio/hugo/hugolib, while a change to com/gohugoio/hugo/hugolib can't break com/gohugoio/hugo/config/allconfig.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
com/gohugoio/hugo/internal/js/esbuild uses com/gohugoio/hugo/common/hugio, so a change to com/gohugoio/hugo/common/hugio can break com/gohugoio/hugo/internal/js/esbuild, while a change to com/gohugoio/hugo/internal/js/esbuild can't break com/gohugoio/hugo/common/hugio.
Position
Below the diagonal: com/gohugoio/hugo/internal/js/esbuild uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/internal/js/esbuild uses com/gohugoio/hugo/identity, so a change to com/gohugoio/hugo/identity can break com/gohugoio/hugo/internal/js/esbuild, while a change to com/gohugoio/hugo/internal/js/esbuild can't break com/gohugoio/hugo/identity.
Position
Below the diagonal: com/gohugoio/hugo/internal/js/esbuild uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/internal/js/esbuild uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/internal/js/esbuild, while a change to com/gohugoio/hugo/internal/js/esbuild can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/internal/js/esbuild uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/internal/js/esbuild uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/internal/js/esbuild, while a change to com/gohugoio/hugo/internal/js/esbuild can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/internal/js/esbuild uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/internal/js/esbuild uses com/gohugoio/hugo/media, so a change to com/gohugoio/hugo/media can break com/gohugoio/hugo/internal/js/esbuild, while a change to com/gohugoio/hugo/internal/js/esbuild can't break com/gohugoio/hugo/media.
Position
Below the diagonal: com/gohugoio/hugo/internal/js/esbuild uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/internal/js/esbuild uses com/gohugoio/hugo/resources/resource, so a change to com/gohugoio/hugo/resources/resource can break com/gohugoio/hugo/internal/js/esbuild, while a change to com/gohugoio/hugo/internal/js/esbuild can't break com/gohugoio/hugo/resources/resource.
Position
Below the diagonal: com/gohugoio/hugo/internal/js/esbuild uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/internal/js/esbuild uses com/gohugoio/hugo/hugolib/filesystems, so a change to com/gohugoio/hugo/hugolib/filesystems can break com/gohugoio/hugo/internal/js/esbuild, while a change to com/gohugoio/hugo/internal/js/esbuild can't break com/gohugoio/hugo/hugolib/filesystems.
Position
Below the diagonal: com/gohugoio/hugo/internal/js/esbuild uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/internal/js/esbuild uses com/gohugoio/hugo/tpl/tplimpl, so a change to com/gohugoio/hugo/tpl/tplimpl can break com/gohugoio/hugo/internal/js/esbuild, while a change to com/gohugoio/hugo/internal/js/esbuild can't break com/gohugoio/hugo/tpl/tplimpl.
Position
Below the diagonal: com/gohugoio/hugo/internal/js/esbuild uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/internal/js/esbuild uses com/gohugoio/hugo/resources, so a change to com/gohugoio/hugo/resources can break com/gohugoio/hugo/internal/js/esbuild, while a change to com/gohugoio/hugo/internal/js/esbuild can't break com/gohugoio/hugo/resources.
Position
Below the diagonal: com/gohugoio/hugo/internal/js/esbuild uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/internal/js/esbuild uses com/gohugoio/hugo/deps, so a change to com/gohugoio/hugo/deps can break com/gohugoio/hugo/internal/js/esbuild, while a change to com/gohugoio/hugo/internal/js/esbuild can't break com/gohugoio/hugo/deps.
Position
Below the diagonal: com/gohugoio/hugo/internal/js/esbuild uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/internal/js/esbuild uses com/gohugoio/hugo/resources/resource_factories/create, so a change to com/gohugoio/hugo/resources/resource_factories/create can break com/gohugoio/hugo/internal/js/esbuild, while a change to com/gohugoio/hugo/internal/js/esbuild can't break com/gohugoio/hugo/resources/resource_factories/create.
Position
Below the diagonal: com/gohugoio/hugo/internal/js/esbuild uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/css uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/tpl/css, while a change to com/gohugoio/hugo/tpl/css can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/tpl/css uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/css uses com/gohugoio/hugo/markup/highlight, so a change to com/gohugoio/hugo/markup/highlight can break com/gohugoio/hugo/tpl/css, while a change to com/gohugoio/hugo/tpl/css can't break com/gohugoio/hugo/markup/highlight.
Position
Below the diagonal: com/gohugoio/hugo/tpl/css uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/css uses com/gohugoio/hugo/resources/resource, so a change to com/gohugoio/hugo/resources/resource can break com/gohugoio/hugo/tpl/css, while a change to com/gohugoio/hugo/tpl/css can't break com/gohugoio/hugo/resources/resource.
Position
Below the diagonal: com/gohugoio/hugo/tpl/css uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/css uses com/gohugoio/hugo/deps, so a change to com/gohugoio/hugo/deps can break com/gohugoio/hugo/tpl/css, while a change to com/gohugoio/hugo/tpl/css can't break com/gohugoio/hugo/deps.
Position
Below the diagonal: com/gohugoio/hugo/tpl/css uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/resources uses com/gohugoio/hugo/resources/resource, so a change to com/gohugoio/hugo/resources/resource can break com/gohugoio/hugo/tpl/resources, while a change to com/gohugoio/hugo/tpl/resources can't break com/gohugoio/hugo/resources/resource.
Position
Below the diagonal: com/gohugoio/hugo/tpl/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/resources uses com/gohugoio/hugo/resources, so a change to com/gohugoio/hugo/resources can break com/gohugoio/hugo/tpl/resources, while a change to com/gohugoio/hugo/tpl/resources can't break com/gohugoio/hugo/resources.
Position
Below the diagonal: com/gohugoio/hugo/tpl/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/resources uses com/gohugoio/hugo/deps, so a change to com/gohugoio/hugo/deps can break com/gohugoio/hugo/tpl/resources, while a change to com/gohugoio/hugo/tpl/resources can't break com/gohugoio/hugo/deps.
Position
Below the diagonal: com/gohugoio/hugo/tpl/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/tpl/resources uses com/gohugoio/hugo/resources/resource_factories/create, so a change to com/gohugoio/hugo/resources/resource_factories/create can break com/gohugoio/hugo/tpl/resources, while a change to com/gohugoio/hugo/tpl/resources can't break com/gohugoio/hugo/resources/resource_factories/create.
Position
Below the diagonal: com/gohugoio/hugo/tpl/resources uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/common/hstrings, so a change to com/gohugoio/hugo/common/hstrings can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/common/hstrings.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/common/types, so a change to com/gohugoio/hugo/common/types can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/common/types.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/identity, so a change to com/gohugoio/hugo/identity can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/identity.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/markup/tableofcontents, so a change to com/gohugoio/hugo/markup/tableofcontents can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/markup/tableofcontents.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/hugolib/sitesmatrix, so a change to com/gohugoio/hugo/hugolib/sitesmatrix can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/hugolib/sitesmatrix.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/common/paths, so a change to com/gohugoio/hugo/common/paths can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/common/paths.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/langs, so a change to com/gohugoio/hugo/langs can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/langs.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/media, so a change to com/gohugoio/hugo/media can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/media.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/output, so a change to com/gohugoio/hugo/output can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/output.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
39 pairs of types, where a type in com/gohugoio/hugo/resources/page uses a type in com/gohugoio/hugo/resources/resource. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/resources/resource, so a change to com/gohugoio/hugo/resources/resource can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/resources/resource.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/markup/converter, so a change to com/gohugoio/hugo/markup/converter can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/markup/converter.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/helpers, so a change to com/gohugoio/hugo/helpers can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/helpers.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/resources, so a change to com/gohugoio/hugo/resources can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/resources.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/source, so a change to com/gohugoio/hugo/source can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/source.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/resources/page uses com/gohugoio/hugo/hugolib, so a change to com/gohugoio/hugo/hugolib can break com/gohugoio/hugo/resources/page, while a change to com/gohugoio/hugo/resources/page can't break com/gohugoio/hugo/hugolib.
Position
Below the diagonal: com/gohugoio/hugo/resources/page uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/identity, so a change to com/gohugoio/hugo/identity can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/identity.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/common/hmaps, so a change to com/gohugoio/hugo/common/hmaps can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/common/hmaps.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/hugolib/sitesmatrix, so a change to com/gohugoio/hugo/hugolib/sitesmatrix can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/hugolib/sitesmatrix.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/common/paths, so a change to com/gohugoio/hugo/common/paths can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/common/paths.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/langs, so a change to com/gohugoio/hugo/langs can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/langs.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/media, so a change to com/gohugoio/hugo/media can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/media.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/markup/markup_config, so a change to com/gohugoio/hugo/markup/markup_config can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/markup/markup_config.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/modules, so a change to com/gohugoio/hugo/modules can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/modules.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/output, so a change to com/gohugoio/hugo/output can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/output.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/resources/images, so a change to com/gohugoio/hugo/resources/images can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/resources/images.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/resources/page/pagemeta, so a change to com/gohugoio/hugo/resources/page/pagemeta can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/resources/page/pagemeta.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/config/allconfig uses com/gohugoio/hugo/resources/page, so a change to com/gohugoio/hugo/resources/page can break com/gohugoio/hugo/config/allconfig, while a change to com/gohugoio/hugo/config/allconfig can't break com/gohugoio/hugo/resources/page.
Position
Below the diagonal: com/gohugoio/hugo/config/allconfig uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/common/hugio, so a change to com/gohugoio/hugo/common/hugio can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/common/hugio.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/common/loggers, so a change to com/gohugoio/hugo/common/loggers can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/common/loggers.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/common/types, so a change to com/gohugoio/hugo/common/types can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/common/types.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/identity, so a change to com/gohugoio/hugo/identity can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/identity.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/hugolib/sitesmatrix, so a change to com/gohugoio/hugo/hugolib/sitesmatrix can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/hugolib/sitesmatrix.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/config, so a change to com/gohugoio/hugo/config can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/config.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/hugofs, so a change to com/gohugoio/hugo/hugofs can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/hugofs.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/modules, so a change to com/gohugoio/hugo/modules can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/modules.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/hugolib/filesystems, so a change to com/gohugoio/hugo/hugolib/filesystems can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/hugolib/filesystems.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/deps, so a change to com/gohugoio/hugo/deps can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/deps.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/hugolib, so a change to com/gohugoio/hugo/hugolib can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/hugolib.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/resources/page, so a change to com/gohugoio/hugo/resources/page can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/resources/page.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
com/gohugoio/hugo/commands uses com/gohugoio/hugo/config/allconfig, so a change to com/gohugoio/hugo/config/allconfig can break com/gohugoio/hugo/commands, while a change to com/gohugoio/hugo/commands can't break com/gohugoio/hugo/config/allconfig.
Position
Below the diagonal: com/gohugoio/hugo/commands uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 35% · Weak · gated by D2, R1, R7 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
52
High / Critical
A07:2025 — Authentication Failures
6
High / Critical
A02:2025 — Security Misconfiguration
6
Medium
A03:2025 — Software Supply Chain Failures
5
Medium
Roadmap
Top priorities: Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up; Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value; Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 16
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 927
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 53
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 21
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 63 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 63 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 968 of 996 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.go) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository declares 3 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.go), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its Go module dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `common/hmaps/maps.go`, `common/types/types.go`, `hugolib/doctree/simpletree.go`, `internal/warpc/js/renderkatex.bundle.js`, `tpl/collections/querify.go` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — 39 | >>> xx-verify /usr/bin/hugo 40 | >>> EOT 41 | -------------------- ERROR: failed to solve: process "/bin/sh -c set -ex\n xx-go build -tags \"$HUGO_BUILD_TAGS\" -ldflags \"-s -w -X github.com/gohugoio/hugo/common/hugo.vendorInfo=docker\" -o /usr/bin/hugo\n xx-verify /usr/bin/hugo\n" did not complete successfully: exit code: 1; runtime evidence skipped.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
ED5 Idempotency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Go, c is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Go, c is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's C, Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 35 further occurrence(s) are not listed individually; the score already reflects all 75.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's C is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations: 6 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
169 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was allPagesAssembler.doCreatePages at 147. A further 4 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being page.NamedPageMetaValue at 21 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: resources/page/page.go (page.NamedPageMetaValue at 21), common/paths/path.go (paths.isAllowedPathCharacter at 17), config/allconfig/configlanguage.go (ConfigLanguage.GetConfigSection at 17). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 164 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with allPagesAssembler.doCreatePages (cyclomatic 147). — Refactoring it lifts Cyclomatic Complexity from 4.7 to about 5.0/10.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 285 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 120 down to 120 or less in Cognitive Complexity — start with allPagesAssembler.doCreatePages (cognitive 243), hugoBuilder.handleEvents (cognitive 175), HugoSites.processPartialFileEvents (cognitive 137). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 2.0 to about 2.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.8 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 22 FileTooLong finding(s) in God Classes — start with templatestore.go, site.go, content_map_page_assembler.go. — One of this dimension's main actionable groups (22 warning-level).
Resolve the 21 MethodTooLong finding(s) in God Classes — start with hugo_sites_build.go (2), REDACTED (2), content_map_page_assembler.go. — One of this dimension's main actionable groups (21 warning-level).
Resolve the 20 TooManyMethods finding(s) in God Classes — start with site.go (3), page_nop.go, page.go. — One of this dimension's main actionable groups (20 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
76 duplicated block group(s) detected. A further 72 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
Duplicated block (7 lines × 2) · ×13REDACTED:237
Edited copy of a member (12 corresponding lines) · ×9resources/image.go:198
+ 64 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 13 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with createcounting_fs.go (2), hasbytes_fs.go (2), REDACTED. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 9 Edited copy of a member (12 corresponding lines) finding(s) in Code Duplication — start with image.go, vectorstores.go, urls.go. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 9 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with filecache_config.go, predicate.go, page__content.go. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
3 production modules (npm+Go), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 1 of the 3 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 23 Low cohesion finding(s) in Cohesion (LCOM4) — start with strings.go, REDACTED, page.go. — One of this dimension's main actionable groups (23 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
13 outdated, 0 author-deprecated direct Go module(s), 2 pinning or checksum defect(s). 79 of 79 direct requirement(s) were graded against proxy.golang.org (0 not served there, 3 publishing no tagged release to be behind). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.
Dependency pinned to a stale untagged commit: github.com/BurntSushi/locker · ×2
Outdated: github.com/aws/aws-sdk-go-v2 · ×13
What to do
Resolve the 2 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 178 required Go module(s) use a banned license. Licences were read per module version from the licence files pkg.go.dev detects (via api.deps.dev), over every module this repository's REDACTED requires, direct and indirect, at the version the build uses. Go records no test-only scope at module level, so modules only this repository's own tests import are included. ★ COVERAGE OF THIS VERDICT: it grades this repository's Go module dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 13 Hotspot finding(s) in Churn × Complexity Hotspots — start with hugobuilder.go, allconfig.go, REDACTED. — One of this dimension's main actionable groups (13 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor6.6 / 10Adequate✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
114 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is tpl/internal/go_templates/texttemplate/exec.go. Counted over 342 of the 500 production source files in this repository: 157 are under the ~2,400-byte size floor this dimension measures over, and the remaining 1 have no attributable history left to measure.
Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)
What to do
Resolve the 2 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
87 deducted task-comment markers across 109315 LoC (0.1/KLoC) → score 9.8. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoComment · ×87magefile.go:102
What to do
Resolve the 87 TodoComment finding(s) in Explicit Debt — start with exec_test.go (5), node.go (4), convert.go (3). — One of this dimension's main actionable groups (87 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
2 of 2 documentation facets pass in full. 986 document(s) read across 4 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with magefile.go. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
1 of 3 build units (Go, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D27 · Navigability8.1 / 10Strong✓ Tool-verified
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
47 % of calls cross a namespace and 20 % go through an interface, but 63 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
4 finding(s): 0 critical, 4 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 4 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
52 finding(s): 0 critical, 6 high, 45 medium, 1 low. semgrep hit a parse error in 40 file(s) — `REDACTED`, `common/hmaps/maps.go` (line 118), `common/types/types.go` (line 121), `create/skeletons/theme/layouts/_partials/head/css.html` (lines 1–7), `create/skeletons/theme/layouts/_partials/menu.html` (lines 1–13, lines 19–35, line 40, …), … (+35 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 15 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 5 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (5). — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
2 of 343 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is REDACTED. Counted over 343 of the 500 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned knowledgeREDACTED:1
Further orphaned files (smaller)
Orphaned fileresources/images/text.go:1
What to do
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 Orphaned file finding(s) in Knowledge Freshness — start with text.go. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 3 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Do you agree with this assessment?
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — tpl/tplimpl/embedded/templates/_server/error.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
`fileServer` serves requests (request-handler function literals run on a goroutine per request, and every one shares the single `fileServer` value the router holds) but writes its fields outside any lock (port; e.g. `port` in `createEndpoint` at line 284). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process. — REDACTED:233
What to do
Go: guard the state handlers share with a sync.Mutex held for the whole update (`mu.Lock(); defer mu.Unlock()`), make counters sync/atomic types (atomic.Int64) and caches a sync.Map, or keep per-request data in locals and the request context. `go test -race` over a handler test confirms the race and then its fix.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
`REDACTED` schedules updates, but no `package-ecosystem` entry covers `github-actions`, `npm`, `gitsubmodule`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — REDACTED:3
What to do
Dependabot is configured but does not watch `github-actions`, `npm`, `gitsubmodule` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`http.Get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — livereload/gen/main.go:26
What to do
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
0 typed · 6 plain JS — the untyped files are common/hexec/esmloader.mjs, create/skeletons/theme/REDACTED, internal/warpc/js/common.js, internal/warpc/js/greet.js, internal/warpc/js/renderkatex.js, livereload/gen/livereload-hugo-plugin.js.
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
readInput has cyclomatic complexity 11 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — internal/warpc/js/common.js:18
Do you agree with this assessment?
R3 · Large Files10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
Do you agree with this assessment?
R4 · Test Coverage2.0 / 10Weak✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×4) — internal/warpc/js/common.js:1, livereload/gen/livereload-hugo-plugin.js:1, internal/warpc/js/renderkatex.js:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling3.3 / 10Weak✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
test ✗ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add a test runner (vitest / jest / playwright) and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 3 application, 0 tooling and 1 test entry point(s) detected in this repo. Nothing this repository declares compiles or type-checks these files, so a wrong deletion here would raise no compile error — gate removals on `npm test`, which loads the modules, and note that it only covers what it exercises. An undetected custom entry would make these reachable.
no import path from any entry point (3 application, 0 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×2) — common/hexec/esmloader.mjs, livereload/gen/livereload-hugo-plugin.js
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Security — Only what this repository's own non-C# files could be read for was assessed — markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
`https://www.instagram.com/embed.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. — tpl/tplimpl/embedded/templates/_shortcodes/instagram.html:243
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `netlify.toml` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — docs/netlify.toml:1
What to do
Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`if err := w.sendErr(err); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — watcher/filenotify/poller.go:156
`if err := w.sendEvent(ev); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — watcher/filenotify/poller.go:164
`if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×33) — tpl/os/os.go:67, tpl/internal/go_templates/testenv/testenv.go:264, tpl/internal/go_templates/testenv/testenv_notwin.go:28, …
`if err := os.WriteFile(fpath, nil, 0644); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — tpl/internal/go_templates/testenv/testenv_notwin.go:35
`if err = mapstructure.WeakDecode(m, &opts); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — tpl/encoding/encoding.go:106
`if _, err := c.fs.Stat(vendorDir); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — REDACTED:753
`if err := json.Unmarshal([]byte(s), &sm); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — internal/js/esbuild/sourcemap.go:82
`if _, err := afs.Stat(filepath.Join(s.Cfg.WorkingDir, " ")); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — REDACTED:927
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 5 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
D11 Test Reliability — 3 observation(s) recorded · This repository declares 3 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.go), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
SC1 Supply-chain hygiene — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 14 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 57 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AX1 Captive dependencies — Not applicable: this repository's Go imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 1) — 39 | >>> xx-verify /usr/bin/hugo 40 | >>> EOT 41 | -------------------- ERROR: failed to solve: process "/bin/sh -c set -ex\n xx-go build -tags \"$HUGO_BUILD_TAGS\" -ldflags \"-s -w -X github.com/gohugoio/hugo/common/hugo.vendorInfo=docker\" -o /usr/bin/hugo\n xx-verify /usr/bin/hugo\n" did not complete successfully: exit code: 1; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~91630 lines of test source are present (.go) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Go, JavaScript, html not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (hugolib), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — 5 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — applicable but not scored (2 signals for this style, 2 needed — the count is met but a required primary signal is absent): 1 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 7 value object(s)
ED1 Event-Driven — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 11 CQRS handler(s); 2 event-sourced shape(s) (event folds / event-recording aggregates)
ED5 Idempotency — Not assessed, and this one is on us: 11 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
ES1 Event Sourcing — not scored — this repository shows only 1 of the 3 signals this lens looks for (2 Go aggregate(s) recording domain events (own events-slice append / raise-record))
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: Go has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 1% of this repository's production lines — go (109,315 lines), c (1,542 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 1% of this repository's production lines — go (109,315 lines), c (1,542 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X29 Per-element action decided by a fixed element — X29 reached only 1% of this repository's production lines — go (109,315 lines), c (1,542 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
D11 · Test Reliability· Test declared unreliable · ×3
Test declared unreliable: TestPruneImages cache/filecache/filecache_integration_test.go:53— This test is disabled or skipped with a reason naming unreliability — the repository's own words: "skip flaky test on CI server". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
Test declared unreliable: TestPruneImages cache/filecache/filecache_integration_test.go:55— This test is disabled or skipped with a reason naming unreliability — the repository's own words: "skip flaky test". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
Test declared unreliable: TestPollerEvent watcher/filenotify/poller_test.go:47— This test is disabled or skipped with a reason naming unreliability — the repository's own words: "flaky test". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
<html> without a lang tpl/tplimpl/embedded/templates/_server/error.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
Orphaned knowledge REDACTED:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
TodoComment magefile.go:102— // TODO(bep) check: stat ./resources/page/*autogen*: no such file or directory — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment watcher/filenotify/poller_test.go:47— // TODO(bep) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:394— // TODO(bep) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment navigation/menu.go:169— // TODO(bep) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment markup/org/convert.go:50— // TODO(bep) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment cache/filecache/filecache_integration_test.go:52— // TODO(bep) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/tplimpl/template_funcs.go:56— // TODO(bep) check if we can void this conversion every time -- and if that matters. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/resources/init.go:29— // TODO(bep) no panic. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/texttemplate/exec.go:114— // TODO: It would be nice if ExecError was more broken down, but — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/texttemplate/funcs.go:38— // TODO: revert this back to a global map once golang.org/issue/2559 is fixed. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/texttemplate/funcs.go:399— // TODO: Perhaps allow comparison between signed and unsigned integers. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/texttemplate/parse/lex_test.go:438— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/htmltemplate/multi_test.go:194— // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/texttemplate/parse/node.go:360— // TODO: fix one day? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/texttemplate/parse/node.go:368— // TODO: fix one day? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/texttemplate/parse/node.go:439— // TODO: Not really a problem; could change API without effect but — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/texttemplate/parse/node.go:473— // TODO: Not really a problem; could change API without effect but — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/htmltemplate/escape.go:423— // TODO: SetTree. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/htmltemplate/exec_test.go:1033— // new(Template).Templates() // TODO: crashes — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/htmltemplate/exec_test.go:1034— // new(Template).Parse("") // TODO: crashes — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/htmltemplate/exec_test.go:1035— // new(Template).New("abc").Parse("") // TODO: crashes — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/htmltemplate/exec_test.go:1036— // new(Template).Execute(nil, nil) // TODO: crashes; returns an error (but does not crash) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/htmltemplate/exec_test.go:1037— // new(Template).ExecuteTemplate(nil, "XXX", nil) // TODO: crashes; returns an error (but does not crash) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/htmltemplate/html.go:248— // TODO: Split attr and element name part filters so we can recognize known attributes. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment tpl/internal/go_templates/htmltemplate/js.go:166— // TODO: normalize quotes. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Swallowed exception (caught, then discarded) watcher/filenotify/poller.go:156— `if err := w.sendErr(err); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) watcher/filenotify/poller.go:164— `if err := w.sendEvent(ev); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) tpl/os/os.go:67— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) tpl/internal/go_templates/testenv/testenv.go:264— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) tpl/internal/go_templates/testenv/testenv_notwin.go:28— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) tpl/internal/go_templates/testenv/testenv_notwin.go:35— `if err := os.WriteFile(fpath, nil, 0644); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) tpl/encoding/encoding.go:106— `if err = mapstructure.WeakDecode(m, &opts); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:111— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:137— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:258— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:263— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) resources/resource.go:529— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) resources/resource.go:536— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) resources/resource_transformers/tocss/sass/helpers.go:86— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) resources/resource_transformers/cssjs/inline_imports.go:83— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:233— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) resources/postpub/postpub.go:106— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) resources/page/page_paths.go:110— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) resources/page/permalinks.go:379— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) parser/pageparser/item.go:89— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) parser/pageparser/item.go:97— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:490— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:753— `if _, err := c.fs.Stat(vendorDir); err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) modules/collect.go:795— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) modules/collect.go:808— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Low cohesion: Namespace (LCOM4 31) tpl/strings/strings.go:48— Namespace's methods fall into 31 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 31 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Namespace (LCOM4 19) REDACTED:42— Namespace's methods fall into 19 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 19 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: pageState (LCOM4 13) hugolib/page.go:95— pageState's methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Namespace (LCOM4 10) tpl/transform/transform.go:77— Namespace's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Namespace (LCOM4 8) REDACTED:57— Namespace's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: FileMeta (LCOM4 6) hugofs/fileinfo.go:67— FileMeta's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: pageMap (LCOM4 6) hugolib/content_map_page.go:84— pageMap's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: contentNodeShifter (LCOM4 6) hugolib/content_map_page_contentnodeshifter.go:24— contentNodeShifter's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: HugoSites (LCOM4 6) REDACTED:63— HugoSites's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Namespace (LCOM4 6) tpl/css/css.go:33— Namespace's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Namespace (LCOM4 6) tpl/debug/debug.go:96— Namespace's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Namespace (LCOM4 6) tpl/resources/resources.go:67— Namespace's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Namespace (LCOM4 6) tpl/urls/urls.go:36— Namespace's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Site (LCOM4 5) hugolib/site.go:103— Site's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: hookedRenderer (LCOM4 5) markup/goldmark/render_hooks.go:107— hookedRenderer's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Namespace (LCOM4 5) tpl/path/path.go:35— Namespace's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: importCommand (LCOM4 4) commands/import.go:71— importCommand's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ShortcodeWithPage (LCOM4 4) hugolib/shortcode.go:55— ShortcodeWithPage's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Context (LCOM4 4) markup/goldmark/internal/render/context.go:52— Context's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: pageLexer (LCOM4 4) parser/pageparser/pagelexer.go:29— pageLexer's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Namespace (LCOM4 4) tpl/templates/templates.go:43— Namespace's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Namespace (LCOM4 4) tpl/time/time.go:47— Namespace's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: templateExecHelper (LCOM4 4) tpl/tplimpl/template_funcs.go:40— templateExecHelper's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
FileTooLong: tplimpl/templatestore.go tpl/tplimpl/templatestore.go— FileTooLong — 1320 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: TemplateStore (51 blocks, 445-2059). The bar is 500 significant lines; this is 820 over it, 2.64× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: hugolib/site.go hugolib/site.go— FileTooLong — 1013 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 513 over it, 2.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: hugolib/content_map_page_assembler.go hugolib/content_map_page_assembler.go— FileTooLong — 889 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: allPagesAssembler (6 blocks, 43-1498). The bar is 500 significant lines; this is 389 over it, 1.78× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: esbuild/batch.go internal/js/esbuild/batch.go— FileTooLong — 839 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 339 over it, 1.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: hugolib/hugo_sites_build.go hugolib/hugo_sites_build.go— FileTooLong — 789 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: HugoSites (17 blocks, 64-1359). The bar is 500 significant lines; this is 289 over it, 1.58× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 788 significant lines (blank, comment-only and punctuation-only lines excluded), about 68% of them inside a single declaration: IntegrationTestBuilder (49 blocks, 230-1205). The bar is 500 significant lines; this is 288 over it, 1.58× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: commands/hugobuilder.go commands/hugobuilder.go— FileTooLong — 785 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: hugoBuilder (34 blocks, 58-1285). The bar is 500 significant lines; this is 285 over it, 1.57× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 762 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 262 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: hugolib/content_map_page.go hugolib/content_map_page.go— FileTooLong — 741 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 241 over it, 1.48× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: hugolib/page__content.go hugolib/page__content.go— FileTooLong — 697 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 197 over it, 1.39× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: allconfig/allconfig.go config/allconfig/allconfig.go— FileTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 181 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: hugolib/page__meta.go hugolib/page__meta.go— FileTooLong — 666 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 166 over it, 1.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: paths/pathparser.go common/paths/pathparser.go— FileTooLong — 624 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 124 over it, 1.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: pagemeta/page_frontmatter.go resources/page/pagemeta/page_frontmatter.go— FileTooLong — 619 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 119 over it, 1.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: sitesmatrix/vectorstores.go hugolib/sitesmatrix/vectorstores.go— FileTooLong — 617 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 117 over it, 1.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 596 significant lines (blank, comment-only and punctuation-only lines excluded), about 68% of them inside a single declaration: Client (22 blocks, 107-891). The bar is 500 significant lines; this is 96 over it, 1.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: warpc/warpc.go internal/warpc/warpc.go— FileTooLong — 576 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 76 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: hugolib/page.go hugolib/page.go— FileTooLong — 553 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: pageState (61 blocks, 95-946). The bar is 500 significant lines; this is 53 over it, 1.11× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: modules/collect.go modules/collect.go— FileTooLong — 539 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: collector (17 blocks, 186-943). The bar is 500 significant lines; this is 39 over it, 1.08× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: filesystems/basefs.go hugolib/filesystems/basefs.go— FileTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 20 over it, 1.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: hugofs/rootmapping_fs.go hugofs/rootmapping_fs.go— FileTooLong — 512 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: RootMappingFs (23 blocks, 242-810). The bar is 500 significant lines; this is 12 over it, 1.02× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: resources/transform.go resources/transform.go— FileTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: resourceAdapter (48 blocks, 186-781). The bar is 500 significant lines; this is 11 over it, 1.02× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
MethodTooLong: allPagesAssembler.doCreatePages hugolib/content_map_page_assembler.go:146— MethodTooLong — doCreatePages runs 469 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 369 over it, 4.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: HugoSites.processPartialFileEvents hugolib/hugo_sites_build.go:863— MethodTooLong — processPartialFileEvents runs 241 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 141 over it, 2.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: hugoBuilder.handleEvents commands/hugobuilder.go:773— MethodTooLong — handleEvents runs 207 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 107 over it, 2.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: pageState.setMetaPostParams hugolib/page__meta.go:621— MethodTooLong — setMetaPostParams runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: batcher.doBuild internal/js/esbuild/batch.go:427— MethodTooLong — doBuild runs 193 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 93 over it, 1.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Config.CompileConfig config/allconfig/allconfig.go:279— MethodTooLong — CompileConfig runs 170 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 70 over it, 1.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TemplateStore.insertTemplates tpl/tplimpl/templatestore.go:1379— MethodTooLong — insertTemplates runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Options.compile internal/js/esbuild/options.go:275— MethodTooLong — compile runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Namespace.checkCondition REDACTED:60— MethodTooLong — checkCondition runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AvifCodec.Encode internal/warpc/avif.go:244— MethodTooLong — Encode runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: resourceAdapter.transform resources/transform.go:534— MethodTooLong — transform runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: sourceFilesystemsBuilder.createOverlayFs hugolib/filesystems/basefs.go:675— MethodTooLong — createOverlayFs runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: serverCommand.serve REDACTED:869— MethodTooLong — serve runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Deployer.Deploy REDACTED:120— MethodTooLong — Deploy runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BuildClient.Build internal/js/esbuild/build.go:56— MethodTooLong — Build runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: componentFsDir.ReadDirWithContext hugofs/component_fs.go:84— MethodTooLong — ReadDirWithContext runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: IntegrationTestBuilder.initBuilder REDACTED:887— MethodTooLong — initBuilder runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: fileServer.createEndpoint REDACTED:240— MethodTooLong — createEndpoint runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: pageContentOutput.initRenderHooks hugolib/page__per_output.go:240— MethodTooLong — initRenderHooks runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: HugoSites.Build hugolib/hugo_sites_build.go:64— MethodTooLong — Build runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: HugoSites.resolveAndClearStateForIdentities hugolib/content_map_page.go:900— MethodTooLong — resolveAndClearStateForIdentities runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
TooManyMethods: nopPage resources/page/page_nop.go:60— TooManyMethods — 116 methods. The bar is 30 methods; this is 86 over it, 3.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Site hugolib/site.go:103— TooManyMethods — 71 methods, declared across 8 files: hugolib/site.go (55), hugolib/site_render.go (5), hugolib/alias.go (2), hugolib/hugo_sites_build.go (2), +4 more file(s). The bar is 30 methods; this is 41 over it, 2.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: pageState hugolib/page.go:95— TooManyMethods — 66 methods, declared across 3 files: hugolib/page.go (60), hugolib/page__meta.go (4), hugolib/collections.go (2). The bar is 30 methods; this is 36 over it, 2.20× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HugoSites REDACTED:63— TooManyMethods — 58 methods, declared across 6 files: REDACTED (30), hugolib/hugo_sites_build.go (17), hugolib/content_map_page.go (4), hugolib/site.go (4), +2 more file(s). The bar is 30 methods; this is 28 over it, 1.93× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ConfigLanguage config/allconfig/configlanguage.go:27— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. Most of these members implement config.AllProvider (56 of 57 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: TemplateStore tpl/tplimpl/templatestore.go:445— TooManyMethods — 51 methods, declared across 2 files: tplimpl/templatestore.go (50), tplimpl/templates.go (1). The bar is 30 methods; this is 21 over it, 1.70× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Path common/paths/pathparser.go:621— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IntegrationTestBuilder REDACTED:230— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: resourceAdapter resources/transform.go:186— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: pageMeta hugolib/page__meta.go:145— TooManyMethods — 39 methods, declared across 2 files: hugolib/page__meta.go (38), hugolib/page__content.go (1). The bar is 30 methods; this is 9 over it, 1.30× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Pages REDACTED:26— TooManyMethods — 37 methods, declared across 7 files: page/pages_sort.go (12), page/pagegroup.go (8), REDACTED (7), page/pages_related.go (5), +3 more file(s). The bar is 30 methods; this is 7 over it, 1.23× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: genericResource resources/resource.go:365— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Namespace REDACTED:57— TooManyMethods — 37 methods, declared across 10 files: REDACTED (18), REDACTED (8), collections/apply.go (2), collections/index.go (2), +6 more file(s). The bar is 30 methods; this is 7 over it, 1.23× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: siteWrapper resources/page/site.go:162— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. Most of these members implement page.Site (32 of 35 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: hugoBuilder commands/hugobuilder.go:58— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: testSite resources/page/site.go:319— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. Most of these members implement page.Site (32 of 33 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: Namespace REDACTED:42— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NodeShiftTree hugolib/doctree/nodeshifttree.go:77— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Namespace tpl/strings/strings.go:48— TooManyMethods — 32 methods, declared across 3 files: strings/strings.go (28), strings/regexp.go (3), REDACTED (1). The bar is 30 methods; this is 2 over it, 1.07× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: logAdapter common/loggers/logger.go:211— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Hotspot: commands/hugobuilder.go commands/hugobuilder.go:773— commands/hugobuilder.go changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in hugoBuilder.handleEvents at line 773. 1 of those changes was a fix/bug commit, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- commands/hugobuilder.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: config/allconfig/allconfig.go config/allconfig/allconfig.go:279— config/allconfig/allconfig.go changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in Config.CompileConfig at line 279. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- config/allconfig/allconfig.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:60— REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in Namespace.checkCondition at line 60. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: resources/images/config.go resources/images/config.go:246— resources/images/config.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in images.DecodeImageConfig at line 246. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- resources/images/config.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: internal/warpc/warpc.go internal/warpc/warpc.go:659— internal/warpc/warpc.go changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in warpc.newDispatcher at line 659. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- internal/warpc/warpc.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:887— REDACTED changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in IntegrationTestBuilder.initBuilder at line 887. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: hugofs/rootmapping_fs.go hugofs/rootmapping_fs.go:540— hugofs/rootmapping_fs.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in RootMappingFs.collectDirEntries at line 540. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- hugofs/rootmapping_fs.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: resources/image.go resources/image.go:301— resources/image.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in imageResource.Filter at line 301. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- resources/image.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: tpl/tplimpl/templatestore.go tpl/tplimpl/templatestore.go:2101— tpl/tplimpl/templatestore.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in bestMatch.isBetter at line 2101. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- tpl/tplimpl/templatestore.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:521— REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in InvertedIndex.searchDate at line 521. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:638— REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Namespace.Union at line 638. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: tpl/compare/compare.go tpl/compare/compare.go:101— tpl/compare/compare.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in Namespace.Eq at line 101. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- tpl/compare/compare.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: tpl/tplimpl/templatedescriptor.go tpl/tplimpl/templatedescriptor.go:70— tpl/tplimpl/templatedescriptor.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in descriptorHandler.compareDescriptors at line 70. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 11:28:59 +01:00' --until='2026-11-13 11:28:59 +01:00' --full-history --no-merges -- tpl/tplimpl/templatedescriptor.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Duplicated block (7 lines × 2) REDACTED:237— REDACTED:237-243 | REDACTED:407-413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:237` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) resources/image.go:200— resources/image.go:200-206 | resources/image.go:527-533 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) tpl/openapi/openapi3/init.go:27— tpl/openapi/openapi3/init.go:27-33 | tpl/templates/init.go:27-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `tpl/openapi/openapi3/init.go:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) modules/collect.go:748— modules/collect.go:748-754 | modules/collect.go:772-778 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `modules/collect.go:748` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) hugofs/createcounting_fs.go:91— hugofs/createcounting_fs.go:91-97 | hugofs/stacktracer_fs.go:63-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) hugofs/createcounting_fs.go:99— hugofs/createcounting_fs.go:99-105 | hugofs/stacktracer_fs.go:71-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `fs *createCountingFs) OpenFile(name` in one and `fs *stacktracerFs) OpenFile(name` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) hugofs/hasbytes_fs.go:43— hugofs/hasbytes_fs.go:43-49 | hugofs/hashing_fs.go:54-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) hugofs/hasbytes_fs.go:51— hugofs/hasbytes_fs.go:51-57 | hugofs/hashing_fs.go:62-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `fs *hasBytesFs) OpenFile(name` in one and `fs *hashingFs) OpenFile(name` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) resources/page/pagegroup.go:98— resources/page/pagegroup.go:98-104 | resources/page/taxonomy.go:139-145 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) REDACTED:675— REDACTED:675-681 | tpl/compare/compare.go:375-381 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) markup/pandoc/convert.go:53— markup/pandoc/convert.go:53-59 | markup/rst/convert.go:51-57 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) navigation/menu_cache.go:51— navigation/menu_cache.go:51-57 | resources/page/pages_cache.go:63-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `c *menuCache) get(key` in one and `c *pageCache) get(key` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) tpl/openapi/openapi3/openapi3.go:177— tpl/openapi/openapi3/openapi3.go:177-183 | tpl/openapi/openapi3/openapi3.go:196-202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tpl/openapi/openapi3/openapi3.go:177` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
FunctionTooLong: strings.init tpl/strings/init.go:25— FunctionTooLong — init runs 182 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: hugolib.NewHugoSites hugolib/site.go:203— FunctionTooLong — NewHugoSites runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.newModCommands commands/mod.go:39— FunctionTooLong — newModCommands runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.newGenCommand commands/gen.go:39— FunctionTooLong — newGenCommand runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: esbuild.createBuildPlugins internal/js/esbuild/resolve.go:189— FunctionTooLong — createBuildPlugins runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: warpc.newDispatcher internal/warpc/warpc.go:659— FunctionTooLong — newDispatcher runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: math.init tpl/math/init.go:26— FunctionTooLong — init runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: hugolib.doRenderShortcode hugolib/shortcode.go:357— FunctionTooLong — doRenderShortcode runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: npm.Pack REDACTED:52— FunctionTooLong — Pack runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: collections.init tpl/collections/init.go:25— FunctionTooLong — init runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: hugolib.newHugoSites hugolib/site.go:469— FunctionTooLong — newHugoSites runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: commands.newListCommand commands/list.go:33— FunctionTooLong — newListCommand runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
ClassTooLong: TemplateStore tpl/tplimpl/templatestore.go:445— ClassTooLong — 952 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods, 51 blocks, lines 445-2059. The bar is 400 significant lines; this is 552 over it, 2.38× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: hugoBuilder commands/hugobuilder.go:58— ClassTooLong — 674 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods, 34 blocks, lines 58-1285. The bar is 400 significant lines; this is 274 over it, 1.69× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: allPagesAssembler hugolib/content_map_page_assembler.go:43— ClassTooLong — 578 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods, 6 blocks, lines 43-1498. The bar is 400 significant lines; this is 178 over it, 1.45× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: IntegrationTestBuilder REDACTED:230— ClassTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods, 49 blocks, lines 230-1205. The bar is 400 significant lines; this is 137 over it, 1.34× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: pageState hugolib/page.go:95— ClassTooLong — 448 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods, 61 blocks, lines 95-946. The bar is 400 significant lines; this is 48 over it, 1.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Site hugolib/site.go:103— ClassTooLong — 413 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods, 56 blocks, lines 103-1800. The bar is 400 significant lines; this is 13 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: cachedContentScope hugolib/page__content.go:831— ClassTooLong — 410 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods, 23 blocks, lines 487-1176. The bar is 400 significant lines; this is 10 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: collector modules/collect.go:186— ClassTooLong — 408 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods, 17 blocks, lines 186-943. The bar is 400 significant lines; this is 8 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Client REDACTED:107— ClassTooLong — 405 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods, 22 blocks, lines 107-891. The bar is 400 significant lines; this is 5 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×9
Edited copy of a member (12 corresponding lines) resources/image.go:198— resources/image.go:198-209 | resources/image.go:524-536 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) hugolib/sitesmatrix/vectorstores.go:225— hugolib/sitesmatrix/vectorstores.go:225-236 | hugolib/sitesmatrix/vectorstores.go:238-249 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) tpl/urls/urls.go:93— tpl/urls/urls.go:93-104 | tpl/urls/urls.go:107-119 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) hugofs/component_fs.go:400— hugofs/component_fs.go:400-411 | hugofs/filename_filter_fs.go:117-128 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) hugolib/page__tree.go:34— hugolib/page__tree.go:34-45 | hugolib/page__tree.go:47-58 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) common/herrors/file_error.go:212— common/herrors/file_error.go:212-223 | common/herrors/file_error.go:226-238 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) markup/highlight/highlight.go:36— markup/highlight/highlight.go:36-47 | markup/internal/attributes/attributes.go:29-41 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) navigation/menu_cache.go:26— navigation/menu_cache.go:26-37 | resources/page/pages_cache.go:26-37 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) resources/page/pages_related.go:83— resources/page/pages_related.go:83-100 | hugolib/page__meta.go:378-389 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (12 lines × 2) cache/filecache/filecache_config.go:229— cache/filecache/filecache_config.go:229-240 | cache/httpcache/httpcache.go:209-220 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cache/filecache/filecache_config.go:229` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) common/predicate/predicate.go:189— common/predicate/predicate.go:189-200 | common/predicate/predicate.go:224-235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `common/predicate/predicate.go:189` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) hugolib/page__content.go:250— hugolib/page__content.go:250-261 | hugolib/page__content.go:1083-1094 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hugolib/page__content.go:250` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) hugolib/page__ref.go:77— hugolib/page__ref.go:77-88 | hugolib/page__ref.go:94-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) markup/goldmark/render_hooks.go:227— markup/goldmark/render_hooks.go:227-238 | markup/goldmark/render_hooks.go:369-380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `markup/goldmark/render_hooks.go:227` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `markup/goldmark/render_hooks.go:225` calls `renderLink` and `markup/goldmark/render_hooks.go:366` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) REDACTED:134— REDACTED:134-145 | REDACTED:165-176 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:134` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) tpl/transform/unmarshal.go:70— tpl/transform/unmarshal.go:70-81 | tpl/transform/unmarshal.go:130-141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tpl/transform/unmarshal.go:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) parser/pageparser/pagelexer.go:107— parser/pageparser/pagelexer.go:107-118 | publisher/htmlElementsCollector.go:277-288 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) resources/images/meta/meta.go:219— resources/images/meta/meta.go:219-230 | resources/images/meta/meta.go:305-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `resources/images/meta/meta.go:219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×5
Edited copy of a member (14 corresponding lines) common/hreflect/compare.go:71— common/hreflect/compare.go:71-84 | common/hreflect/compare.go:86-99 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) hugolib/sitesmatrix/vectorstores.go:196— hugolib/sitesmatrix/vectorstores.go:196-209 | hugolib/sitesmatrix/vectorstores.go:509-526 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) hugofs/hglob/glob.go:55— hugofs/hglob/glob.go:55-68 | hugofs/hglob/glob.go:70-87 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) REDACTED:83— REDACTED:83-96 | REDACTED:110-125 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) tpl/transform/transform.go:90— tpl/transform/transform.go:90-103 | tpl/strings/strings.go:123-136 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17 lines × 2) config/defaultConfigProvider.go:129— config/defaultConfigProvider.go:129-145 | config/defaultConfigProvider.go:211-227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `config/defaultConfigProvider.go:129` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `c *defaultConfigProvider) Set(k` in one and `c *defaultConfigProvider) Merge(k` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (17 lines × 2) hugolib/content_map_page_assembler.go:404— hugolib/content_map_page_assembler.go:404-420 | hugolib/content_map_page_assembler.go:422-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) hugolib/page__meta.go:1073— hugolib/page__meta.go:1073-1089 | resources/resource/resource_helpers.go:43-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `hugolib/page__meta.go:1073` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) resources/image.go:93— resources/image.go:93-109 | resources/image.go:135-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `resources/image.go:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (17 lines × 2) REDACTED:209— REDACTED:209-225 | REDACTED:129-145 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:209` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) commands/gen.go:130— commands/gen.go:130-138 | commands/gen.go:179-187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) hugolib/content_map_page.go:820— hugolib/content_map_page.go:820-828 | hugolib/content_map_page_assembler.go:1020-1028 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `hugolib/content_map_page.go:820` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) hugolib/doctree/simpletree.go:110— hugolib/doctree/simpletree.go:110-118 | hugolib/doctree/simpletree.go:212-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hugolib/doctree/simpletree.go:110` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) resources/page/pagegroup.go:115— resources/page/pagegroup.go:115-123 | resources/page/pagegroup.go:185-193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) resources/images/resampling.go:95— resources/images/resampling.go:95-103 | resources/images/resampling.go:107-115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `resources/images/resampling.go:95` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
TooManyFields: RootConfig config/allconfig/allconfig.go:599— TooManyFields — 70 stored fields beside 1 method. The bar is 30 stored fields; this is 40 over it, 2.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: BuiltinTypes media/builtin.go:3— TooManyFields — 47 stored fields. The bar is 30 stored fields; this is 17 over it, 1.57× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Config config/allconfig/allconfig.go:109— TooManyFields — 37 stored fields beside 4 methods. The bar is 30 stored fields; this is 7 over it, 1.23× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: HugoSites REDACTED:63— TooManyFields — 31 stored fields beside 58 methods. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×4
Edited copy of a member (18 corresponding lines) hugolib/gitinfo.go:224— hugolib/gitinfo.go:224-242 | hugolib/gitinfo.go:244-261 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) hugolib/page__per_output.go:433— hugolib/page__per_output.go:433-450 | hugolib/page__per_output.go:452-470 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) commands/hugobuilder.go:193— commands/hugobuilder.go:193-210 | commands/hugobuilder.go:314-332 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) tpl/tplimpl/templatestore.go:862— tpl/tplimpl/templatestore.go:862-885 | tpl/tplimpl/templatestore.go:925-942 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×4
Edited copy of a member (15 corresponding lines) hugofs/component_fs.go:311— hugofs/component_fs.go:311-326 | hugofs/decorators.go:109-123 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) markup/internal/attributes/attributes.go:178— markup/internal/attributes/attributes.go:178-194 | markup/internal/attributes/attributes.go:199-213 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) cache/dynacache/dynacache.go:467— cache/dynacache/dynacache.go:467-481 | cache/dynacache/dynacache.go:557-572 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) hugolib/sitesmatrix/vectorstores.go:158— hugolib/sitesmatrix/vectorstores.go:158-172 | hugolib/sitesmatrix/vectorstores.go:459-476 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×4
Edited copy of a member (11 corresponding lines) hugolib/doctree/simpletree.go:108— hugolib/doctree/simpletree.go:108-118 | hugolib/doctree/simpletree.go:208-220 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) navigation/menu.go:256— navigation/menu.go:256-266 | resources/page/pages_sort.go:385-397 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) commands/commandeer.go:356— commands/commandeer.go:356-366 | commands/commandeer.go:372-383 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) codegen/methods.go:300— codegen/methods.go:300-310 | codegen/methods.go:312-322 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×4
Edited copy of a member (7 corresponding lines) resources/page/pages_language_merge.go:54— resources/page/pages_language_merge.go:54-63 | resources/resource/resources.go:261-267 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) tpl/strings/strings.go:458— tpl/strings/strings.go:458-464 | tpl/urls/urls.go:42-49 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) common/types/types.go:70— common/types/types.go:70-76 | resources/page/weighted.go:88-94 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) hugofs/hasbytes_fs.go:87— hugofs/hasbytes_fs.go:87-93 | hugofs/hashing_fs.go:84-90 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) hugolib/roles/roles.go:167— hugolib/roles/roles.go:167-179 | langs/config.go:178-190 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) internal/warpc/avif.go:89— internal/warpc/avif.go:89-101 | internal/warpc/webp.go:231-243 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `internal/warpc/avif.go:89` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) REDACTED:618— REDACTED:618-630 | REDACTED:637-649 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:618` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) hugolib/content_map_page.go:292— hugolib/content_map_page.go:292-304 | hugolib/content_map_page.go:319-331 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hugolib/content_map_page.go:292` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R4 · Test Coverage· No test reaches this file · ×4
No test reaches this file internal/warpc/js/common.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file livereload/gen/livereload-hugo-plugin.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file internal/warpc/js/renderkatex.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file internal/warpc/js/greet.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×3
Edited copy of a member (33 corresponding lines) common/hreflect/convert.go:125— common/hreflect/convert.go:125-158 | common/hreflect/convert.go:202-234 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) internal/warpc/avif.go:69— internal/warpc/avif.go:69-101 | internal/warpc/webp.go:207-243 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) common/hsync/oncemore.go:77— common/hsync/oncemore.go:77-109 | common/hsync/oncemore.go:124-156 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×3
Edited copy of a member (10 corresponding lines) hugofs/rootmapping_fs.go:454— hugofs/rootmapping_fs.go:454-463 | hugofs/rootmapping_fs.go:465-479 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) hugolib/filesystems/basefs.go:437— hugolib/filesystems/basefs.go:437-449 | hugolib/filesystems/basefs.go:452-461 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) common/hreflect/helpers.go:345— common/hreflect/helpers.go:345-354 | common/types/types.go:85-97 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (20 lines × 2) hugolib/sitesmatrix/vectorstores.go:137— hugolib/sitesmatrix/vectorstores.go:137-156 | hugolib/sitesmatrix/vectorstores.go:438-457 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hugolib/sitesmatrix/vectorstores.go:137` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) internal/warpc/webp.go:277— internal/warpc/webp.go:277-296 | internal/warpc/webp.go:304-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2) tpl/collections/sort.go:80— tpl/collections/sort.go:80-99 | tpl/collections/sort.go:113-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tpl/collections/sort.go:80` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) create/skeletons/skeletons.go:75— create/skeletons/skeletons.go:75-89 | create/skeletons/skeletons.go:130-144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) hugolib/gitinfo.go:228— hugolib/gitinfo.go:228-242 | hugolib/gitinfo.go:247-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hugolib/gitinfo.go:228` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) REDACTED:172— REDACTED:172-186 | REDACTED:201-215 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) REDACTED:385— REDACTED:385-394 | REDACTED:447-456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:385` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) hugolib/page__paginator.go:46— hugolib/page__paginator.go:46-55 | hugolib/page__paginator.go:73-82 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hugolib/page__paginator.go:46` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) tpl/tplimpl/templates.go:142— tpl/tplimpl/templates.go:142-151 | tpl/tplimpl/templates.go:155-164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) hugolib/doctree/simpletree.go:72— hugolib/doctree/simpletree.go:72-79 | hugolib/doctree/simpletree.go:180-187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) resources/images/image.go:206— resources/images/image.go:206-213 | resources/images/image.go:221-228 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `resources/images/image.go:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) REDACTED:301— REDACTED:301-308 | REDACTED:700-707 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:301` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D12 · Dependency Hygiene· Dependency pinned to a stale untagged commit · ×2
Dependency pinned to a stale untagged commit: github.com/BurntSushi/locker — Direct dependency `github.com/BurntSushi/locker` is required at `v0.0.0-20171006230638-a6e239ea1c69` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2017-10-06, 9.1 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/BurntSushi/locker` and has not moved this requirement in 9.1 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/BurntSushi/locker` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Dependency pinned to a stale untagged commit: github.com/pbnjay/memory — Direct dependency `github.com/pbnjay/memory` is required at `v0.0.0-20210728143218-7b4eea64cf58` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2021-07-28, 5.3 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/pbnjay/memory` and has not moved this requirement in 5.3 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/pbnjay/memory` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×2
Edited copy of a member (28 corresponding lines) navigation/menu_cache.go:60— navigation/menu_cache.go:60-87 | resources/page/pages_cache.go:71-110 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) resources/resource/resources.go:166— resources/resource/resources.go:166-193 | resources/resource/resources.go:204-232 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) hugolib/page.go:356— hugolib/page.go:356-377 | hugolib/page.go:379-411 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) tpl/strings/regexp.go:23— tpl/strings/regexp.go:23-44 | tpl/strings/strings.go:232-258 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×2
Edited copy of a member (8 corresponding lines) commands/new.go:114— commands/new.go:114-122 | commands/new.go:154-161 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) markup/internal/external.go:65— markup/internal/external.go:65-72 | markup/rst/convert.go:115-122 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×2
Edited copies of one member (3 members, 14+ corresponding lines) hugolib/roles/roles.go:201— hugolib/roles/roles.go:201-217 | hugolib/versions/versions.go:217-230 | langs/config.go:247-263 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) tpl/hugo/init.go:26— tpl/hugo/init.go:26-44 | tpl/site/init.go:28-42 | tpl/testinginternal/init.go:25-38 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×2
Edited copies of one member (3 members, 18+ corresponding lines) resources/page/pagegroup.go:397— resources/page/pagegroup.go:397-414 | resources/page/weighted.go:68-85 | resources/resource.go:283-302 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 18+ corresponding lines) REDACTED:165— REDACTED:165-185 | REDACTED:189-210 | REDACTED:213-230 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×2
Edited copy of a member (16 corresponding lines) hugolib/page__ref.go:76— hugolib/page__ref.go:76-91 | hugolib/page__ref.go:93-108 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) tpl/os/os.go:115— tpl/os/os.go:115-130 | tpl/os/os.go:152-171 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×2
Edited copies of one member (3 members, 15+ corresponding lines) REDACTED:350— REDACTED:350-364 | REDACTED:367-382 | hugolib/page.go:569-584 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) cache/filecache/filecache.go:246— cache/filecache/filecache.go:246-269 | cache/filecache/filecache.go:351-369 | cache/filecache/filecache.go:372-386 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×2
Edited copies of one member (3 members, 7+ corresponding lines) common/paths/pathparser.go:999— common/paths/pathparser.go:999-1008 | REDACTED:133-144 | hugofs/rootmapping_fs.go:875-881 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) common/collections/slice.go:70— common/collections/slice.go:70-76 | REDACTED:44-50 | resources/resource_factories/bundler/bundler.go:45-51 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (23 lines × 2) resources/images/config.go:717— resources/images/config.go:717-739 | resources/images/config.go:781-803 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `resources/images/config.go:717` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23 lines × 2) tpl/css/css.go:185— tpl/css/css.go:185-207 | tpl/js/js.go:56-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) cache/filecache/filecache.go:290— cache/filecache/filecache.go:290-303 | cache/filecache/filecache.go:353-366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cache/filecache/filecache.go:290` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (14 lines × 2) transform/urlreplacers/absurlreplacer.go:108— transform/urlreplacers/absurlreplacer.go:108-121 | transform/urlreplacers/absurlreplacer.go:153-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) cache/filecache/filecache.go:202— cache/filecache/filecache.go:202-212 | cache/filecache/filecache.go:289-299 | cache/filecache/filecache.go:352-362 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cache/filecache/filecache.go:202` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 3) hugolib/roles/roles.go:109— hugolib/roles/roles.go:109-119 | hugolib/versions/versions.go:124-134 | langs/config.go:109-119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (5 lines × 2) REDACTED:774— REDACTED:774-778 | REDACTED:794-798 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) commands/import.go:146— commands/import.go:146-150 | commands/import.go:613-617 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `commands/import.go:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×2
JavaScript dependencies are not locked docs/package.json:11— docs/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked internal/warpc/js/package.json:11— internal/warpc/js/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
Stateful handler: fileServer REDACTED:233— `fileServer` serves requests (request-handler function literals run on a goroutine per request, and every one shares the single `fileServer` value the router holds) but writes its fields outside any lock (port; e.g. `port` in `createEndpoint` at line 284). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process.
allPagesAssembler.doCreatePages (cyclomatic 147) hugolib/content_map_page_assembler.go:146— allPagesAssembler.doCreatePages has cyclomatic complexity 147 (threshold 15). Most of this is not in the body itself: 6 of the 147 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 226, 463, 762, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
hugoBuilder.handleEvents (cyclomatic 89) commands/hugobuilder.go:773— hugoBuilder.handleEvents has cyclomatic complexity 89 (threshold 15). Of this number, 78 points are the body's own statements and 11 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namespace.checkCondition (cyclomatic 81) REDACTED:60— Namespace.checkCondition has cyclomatic complexity 81 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
HugoSites.processPartialFileEvents (cyclomatic 76) hugolib/hugo_sites_build.go:863— HugoSites.processPartialFileEvents has cyclomatic complexity 76 (threshold 15). Of this number, 38 points are the body's own statements and 38 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pageState.setMetaPostParams (cyclomatic 70) hugolib/page__meta.go:621— pageState.setMetaPostParams has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
page.CreateTargetPaths (cyclomatic 58) resources/page/page_paths.go:120— page.CreateTargetPaths has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TemplateStore.insertTemplates (cyclomatic 57) tpl/tplimpl/templatestore.go:1379— TemplateStore.insertTemplates has cyclomatic complexity 57 (threshold 15). Most of this is not in the body itself: 9 of the 57 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1393, 1640). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Config.CompileConfig (cyclomatic 55) config/allconfig/allconfig.go:279— Config.CompileConfig has cyclomatic complexity 55 (threshold 15). Of this number, 51 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TemplateDescriptor.doCompare (cyclomatic 48) tpl/tplimpl/templatedescriptor.go:111— TemplateDescriptor.doCompare has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
componentFsDir.ReadDirWithContext (cyclomatic 46) hugofs/component_fs.go:84— componentFsDir.ReadDirWithContext has cyclomatic complexity 46 (threshold 15). Of this number, 33 points are the body's own statements and 13 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Options.compile (cyclomatic 46) internal/js/esbuild/options.go:275— Options.compile has cyclomatic complexity 46 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Deployer.Deploy (cyclomatic 44) REDACTED:120— Deployer.Deploy has cyclomatic complexity 44 (threshold 15). Of this number, 41 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
resourceAdapter.transform (cyclomatic 41) resources/transform.go:534— resourceAdapter.transform has cyclomatic complexity 41 (threshold 15). Of this number, 36 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PathParser.doParse (cyclomatic 40) common/paths/pathparser.go:459— PathParser.doParse has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PathParser.parseIdentifier (cyclomatic 39) common/paths/pathparser.go:327— PathParser.parseIdentifier has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
images.DecodeImageConfig (cyclomatic 39) resources/images/config.go:246— images.DecodeImageConfig has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pageContentOutput.initRenderHooks (cyclomatic 38) hugolib/page__per_output.go:240— pageContentOutput.initRenderHooks has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 2 of the 38 points are its own statements and the rest belongs to one function literal inside it that branches (line 245). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
HugoSites.Build (cyclomatic 37) hugolib/hugo_sites_build.go:64— HugoSites.Build has cyclomatic complexity 37 (threshold 15). Of this number, 27 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BuildClient.Build (cyclomatic 37) internal/js/esbuild/build.go:56— BuildClient.Build has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 15 of the 37 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 107, 208, 193). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
npm.Pack (cyclomatic 37) REDACTED:52— npm.Pack has cyclomatic complexity 37 (threshold 15). Of this number, 30 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
shortcodeParseInfo.extractShortcode (cyclomatic 36) hugolib/shortcode.go:572— shortcodeParseInfo.extractShortcode has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
batcher.doBuild (cyclomatic 36) internal/js/esbuild/batch.go:427— batcher.doBuild has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 15 of the 36 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 534, 588, 656, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
hugolib.pageRenderer (cyclomatic 35) hugolib/site_render.go:122— hugolib.pageRenderer has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Client.FromRemote (cyclomatic 35) REDACTED:195— Client.FromRemote has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 5 of the 35 points are its own statements and the rest belongs to one function literal inside it that branches (line 229). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
math.DoArithmetic (cyclomatic 34) common/math/math.go:23— math.DoArithmetic has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hugolib.NewHugoSites (cyclomatic 33) hugolib/site.go:203— hugolib.NewHugoSites has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
esbuild.createBuildPlugins (cyclomatic 33) internal/js/esbuild/resolve.go:189— esbuild.createBuildPlugins has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 192, 306, 370). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
fileServer.createEndpoint (cyclomatic 32) REDACTED:240— fileServer.createEndpoint has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 271). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
warpc.newDispatcher (cyclomatic 32) internal/warpc/warpc.go:659— warpc.newDispatcher has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 15 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 854, 768, 733, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Namespace.compareGetWithCollator (cyclomatic 32) tpl/compare/compare.go:273— Namespace.compareGetWithCollator has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
state.evalCall (cyclomatic 32) tpl/internal/go_templates/texttemplate/hugo_template.go:398— state.evalCall has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Walkway.walk (cyclomatic 31) hugofs/walk.go:126— Walkway.walk has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cachedContentScope.RenderString (cyclomatic 31) hugolib/page__content.go:877— cachedContentScope.RenderString has cyclomatic complexity 31 (threshold 15). Of this number, 26 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InvertedIndex.searchDate (cyclomatic 31) REDACTED:521— InvertedIndex.searchDate has cyclomatic complexity 31 (threshold 15). Of this number, 25 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
serverCommand.serve (cyclomatic 30) REDACTED:869— serverCommand.serve has cyclomatic complexity 30 (threshold 15). Of this number, 17 points are the body's own statements and 13 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
allconfig.fromLoadConfigResult (cyclomatic 30) config/allconfig/allconfig.go:1046— allconfig.fromLoadConfigResult has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LanguagesInternal.init (cyclomatic 30) langs/config.go:132— LanguagesInternal.init has cyclomatic complexity 30 (threshold 15). Of this number, 24 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
collector.getAndCreateModule (cyclomatic 30) modules/collect.go:231— collector.getAndCreateModule has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namespace.Sort (cyclomatic 30) tpl/collections/sort.go:31— Namespace.Sort has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
state.evalField (cyclomatic 30) tpl/internal/go_templates/texttemplate/hugo_template.go:260— state.evalField has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hugolib.doRenderShortcode (cyclomatic 29) hugolib/shortcode.go:357— hugolib.doRenderShortcode has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TemplateStore.insertTemplate2 (cyclomatic 29) tpl/tplimpl/templatestore.go:1265— TemplateStore.insertTemplate2 has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sourceFilesystemsBuilder.createOverlayFs (cyclomatic 28) hugolib/filesystems/basefs.go:675— sourceFilesystemsBuilder.createOverlayFs has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HugoSites.resolveAndClearStateForIdentities (cyclomatic 28) hugolib/content_map_page.go:900— HugoSites.resolveAndClearStateForIdentities has cyclomatic complexity 28 (threshold 15). Of this number, 19 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AvifCodec.Encode (cyclomatic 28) internal/warpc/avif.go:244— AvifCodec.Encode has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hugoBuilder.newWatcher (cyclomatic 27) commands/hugobuilder.go:335— hugoBuilder.newWatcher has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 385). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Deps.Init (cyclomatic 27) deps/deps.go:142— Deps.Init has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
NodeShiftTreeWalker.Walk (cyclomatic 27) hugolib/doctree/nodeshifttree.go:535— NodeShiftTreeWalker.Walk has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to one function literal inside it that branches (line 538). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
IntegrationTestBuilder.initBuilder (cyclomatic 27) REDACTED:887— IntegrationTestBuilder.initBuilder has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to one function literal inside it that branches (line 889). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Scanner.Next (cyclomatic 26) common/hhtml/scanner.go:65— Scanner.Next has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
sitePagesAssembler.applyAggregates (cyclomatic 26) hugolib/content_map_page_assembler.go:932— sitePagesAssembler.applyAggregates has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 945). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
goldmark.newMarkdown (cyclomatic 26) markup/goldmark/convert.go:84— goldmark.newMarkdown has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Client.Vendor (cyclomatic 26) REDACTED:184— Client.Vendor has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
meta.init (cyclomatic 26) resources/images/meta/meta.go:394— meta.init has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 395). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
configLoader.loadConfigMain (cyclomatic 25) config/allconfig/load.go:342— configLoader.loadConfigMain has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pageFinder.getContentNodeForRef (cyclomatic 25) hugolib/pagecollections.go:151— pageFinder.getContentNodeForRef has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cache.Prune (cyclomatic 24) cache/filecache/filecache_pruner.go:53— Cache.Prune has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 86, 74). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
commands.newModCommands (cyclomatic 24) commands/mod.go:39— commands.newModCommands has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 249, 103, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
pagesCollector.Collect (cyclomatic 24) hugolib/pages_capture.go:84— pagesCollector.Collect has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 189, 97, 122, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AsciiDocConverter.ParseArgs (cyclomatic 24) markup/asciidocext/internal/converter.go:105— AsciiDocConverter.ParseArgs has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
npm.ensureWorkspaceRef (cyclomatic 24) REDACTED:248— npm.ensureWorkspaceRef has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
collections.evaluateSubElem (cyclomatic 24) REDACTED:262— collections.evaluateSubElem has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namespace.Unmarshal (cyclomatic 24) tpl/transform/unmarshal.go:38— Namespace.Unmarshal has cyclomatic complexity 24 (threshold 15). Of this number, 14 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
collector.mountCommonJSConfig (cyclomatic 23) modules/collect.go:701— collector.mountCommonJSConfig has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namespace.Seq (cyclomatic 23) REDACTED:428— Namespace.Seq has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Configs.Init (cyclomatic 22) config/allconfig/allconfig.go:881— Configs.Init has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RootMappingFs.collectDirEntries (cyclomatic 22) hugofs/rootmapping_fs.go:540— RootMappingFs.collectDirEntries has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 548, 603). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
modules.ApplyProjectConfigDefaults (cyclomatic 22) modules/config.go:67— modules.ApplyProjectConfigDefaults has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Client.listGoMods (cyclomatic 22) REDACTED:499— Client.listGoMods has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InvertedIndex.Search (cyclomatic 22) REDACTED:372— InvertedIndex.Search has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pages.GroupBy (cyclomatic 22) resources/page/pagegroup.go:114— Pages.GroupBy has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namespace.Union (cyclomatic 22) REDACTED:638— Namespace.Union has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PathParser.applyPrefixIdentifier (cyclomatic 21) common/paths/pathparser.go:124— PathParser.applyPrefixIdentifier has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
version.CompareVersions (cyclomatic 21) common/version/version.go:173— version.CompareVersions has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config.LoadConfigFromDir (cyclomatic 21) config/configLoader.go:131— config.LoadConfigFromDir has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 152). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Site.assembleMenus (cyclomatic 21) hugolib/site.go:1418— Site.assembleMenus has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
modules.decodeConfig (cyclomatic 21) modules/config.go:181— modules.decodeConfig has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
collector.applyThemeConfig (cyclomatic 21) modules/collect.go:494— collector.applyThemeConfig has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Filters.Text (cyclomatic 21) resources/images/filters.go:74— Filters.Text has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namespace.Eq (cyclomatic 21) tpl/compare/compare.go:101— Namespace.Eq has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
descriptorHandler.compareDescriptors (cyclomatic 21) tpl/tplimpl/templatedescriptor.go:70— descriptorHandler.compareDescriptors has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
compare.compareFold (cyclomatic 20) compare/compare_strings.go:36— compare.compareFold has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pageMap.addPagesFromGoTmplFi (cyclomatic 20) hugolib/content_map.go:322— pageMap.addPagesFromGoTmplFi has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HugoSites.postProcess (cyclomatic 20) hugolib/hugo_sites_build.go:648— HugoSites.postProcess has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 706, 657). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
contentParseInfo.parseSource (cyclomatic 20) hugolib/page__content.go:270— contentParseInfo.parseSource has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
segmentsBuilder.buildOne (cyclomatic 20) hugolib/segments/segments.go:96— segmentsBuilder.buildOne has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Client.transform (cyclomatic 20) resources/resource_transformers/js/build.go:56— Client.transform has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namespace.newElemResolver (cyclomatic 20) REDACTED:364— Namespace.newElemResolver has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namespace.checkWhereArray (cyclomatic 20) REDACTED:551— Namespace.checkWhereArray has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namespace.FormatNumberCustom (cyclomatic 20) tpl/lang/lang.go:85— Namespace.FormatNumberCustom has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
bestMatch.isBetter (cyclomatic 20) tpl/tplimpl/templatestore.go:2101— bestMatch.isBetter has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
filecache.DecodeConfig (cyclomatic 19) cache/filecache/filecache_config.go:208— filecache.DecodeConfig has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
aliasHandler.targetPathAlias (cyclomatic 19) hugolib/alias.go:123— aliasHandler.targetPathAlias has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hugolib.createTargetPathDescriptor (cyclomatic 19) hugolib/page__paths.go:158— hugolib.createTargetPathDescriptor has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HugoSites.assemble (cyclomatic 19) hugolib/hugo_sites_build.go:300— HugoSites.assemble has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cachedContentScope.contentRendered (cyclomatic 19) hugolib/page__content.go:491— cachedContentScope.contentRendered has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 498). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
collector.normalizeMounts (cyclomatic 19) modules/collect.go:832— collector.normalizeMounts has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pageparser.lexShortcodeParam (cyclomatic 19) parser/pageparser/pagelexer_shortcode.go:87— pageparser.lexShortcodeParam has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Codec.EncodeTo (cyclomatic 19) resources/images/codec.go:75— Codec.EncodeTo has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
textFilter.Draw (cyclomatic 19) resources/images/text.go:45— textFilter.Draw has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
babelTransformation.Transform (cyclomatic 19) REDACTED:115— babelTransformation.Transform has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namespace.newMethodResolver (cyclomatic 19) REDACTED:444— Namespace.newMethodResolver has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Namespace.Truncate (cyclomatic 19) REDACTED:30— Namespace.Truncate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TemplateStore.parseTemplates (cyclomatic 19) tpl/tplimpl/templatestore.go:1687— TemplateStore.parseTemplates has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 1688). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
TemplateStore.toKeyCategoryAndDescriptor (cyclomatic 19) tpl/tplimpl/templatestore.go:1840— TemplateStore.toKeyCategoryAndDescriptor has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
templateTransformContext.applyTransformations (cyclomatic 19) tpl/tplimpl/templatetransform.go:144— templateTransformContext.applyTransformations has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Inspector.MethodsFromTypes (cyclomatic 18) codegen/methods.go:57— Inspector.MethodsFromTypes has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hugofs.NewRootMappingFs (cyclomatic 18) hugofs/rootmapping_fs.go:44— hugofs.NewRootMappingFs has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
componentFs.applyMeta (cyclomatic 18) hugofs/component_fs.go:328— componentFs.applyMeta has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
hugolib.newHugoSites (cyclomatic 18) hugolib/site.go:469— hugolib.newHugoSites has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sitePagesAssembler.assembleResourcesAndSetHome (cyclomatic 18) hugolib/content_map_page_assembler.go:1224— sitePagesAssembler.assembleResourcesAndSetHome has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 1231). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
HugoSites.resolveAndResetDependententPageOutputs (cyclomatic 18) hugolib/content_map_page.go:1064— HugoSites.resolveAndResetDependententPageOutputs has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1106, 1086, 1144, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
pageMeta.applyDefaultValues (cyclomatic 18) hugolib/page__meta.go:954— pageMeta.applyDefaultValues has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pagesCollector.collectDirDir (cyclomatic 18) hugolib/pages_capture.go:260— pagesCollector.collectDirDir has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 270, 263). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
siteRefLinker.refLink (cyclomatic 18) hugolib/site.go:1052— siteRefLinker.refLink has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Client.Get (cyclomatic 18) REDACTED:302— Client.Get has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Client.writeHugoDirectSum (cyclomatic 18) REDACTED:606— Client.writeHugoDirectSum has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pageparser.lexInsideShortcode (cyclomatic 18) parser/pageparser/pagelexer_shortcode.go:302— pageparser.lexInsideShortcode has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PermalinkExpander.toSliceFunc (cyclomatic 18) resources/page/permalinks.go:436— PermalinkExpander.toSliceFunc has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 446, 487, 505). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ResourceSourceDescriptor.init (cyclomatic 18) resources/resource.go:113— ResourceSourceDescriptor.init has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
postcssTransformation.Transform (cyclomatic 18) REDACTED:146— postcssTransformation.Transform has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namespace.doIndex (cyclomatic 18) tpl/collections/index.go:42— Namespace.doIndex has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Namespace.Substr (cyclomatic 18) tpl/strings/strings.go:383— Namespace.Substr has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Deployer.walkLocal (cyclomatic 18) REDACTED:490— Deployer.walkLocal has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 497). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Methods.ToMarshalJSON (cyclomatic 17) codegen/methods.go:368— Methods.ToMarshalJSON has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
importCommand.copyJekyllFilesAndFolders (cyclomatic 17) commands/import.go:342— importCommand.copyJekyllFilesAndFolders has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
defaultConfigProvider.determineMergeStrategy (cyclomatic 17) config/defaultConfigProvider.go:271— defaultConfigProvider.determineMergeStrategy has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
contentBuilder.buildDir (cyclomatic 17) create/content.go:136— contentBuilder.buildDir has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PathSpec.RelURL (cyclomatic 17) helpers/url.go:110— PathSpec.RelURL has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FilenameFilter.doMatch (cyclomatic 17) hugofs/hglob/filename_filter.go:162— FilenameFilter.doMatch has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pageMap.getOrCreateResourcesForPage (cyclomatic 17) hugolib/content_map_page.go:585— pageMap.getOrCreateResourcesForPage has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 592). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
HugoSites.render (cyclomatic 17) hugolib/hugo_sites_build.go:397— HugoSites.render has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 437, 406). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
HugoSites.fileEventsContentPaths (cyclomatic 17) hugolib/site.go:1322— HugoSites.fileEventsContentPaths has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pageState.shiftToOutputFormat (cyclomatic 17) hugolib/page.go:873— pageState.shiftToOutputFormat has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Site.renderDefaultSiteRedirect (cyclomatic 17) hugolib/site_render.go:333— Site.renderDefaultSiteRedirect has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Finder.doCheckOne (cyclomatic 17) identity/finder.go:220— Finder.doCheckOne has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
tocTransformer.Transform (cyclomatic 17) markup/goldmark/toc.go:47— tocTransformer.Transform has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 65). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
highlight.highlight (cyclomatic 17) markup/highlight/highlight.go:165— highlight.highlight has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
npm.PackageFilesSum (cyclomatic 17) REDACTED:559— npm.PackageFilesSum has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
metadecoders.validateAliasLimitForCollections (cyclomatic 17) REDACTED:216— metadecoders.validateAliasLimitForCollections has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 238, 223). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ImageProcessor.doFilter (cyclomatic 17) resources/images/image.go:280— ImageProcessor.doFilter has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function taking that case's concrete type, so the dispatch reads one line per case. These arms are selected by TYPE rather than by value, so there is no key a lookup table could be built on; where you own the matched types, giving them one shared interface method and calling that is the form a table would have taken, and where you do not, keep the cases — they stay explicit and reviewable.
FrontMatterHandler.createContentAdapterDatesHandler (cyclomatic 17) resources/page/pagemeta/page_frontmatter.go:911— FrontMatterHandler.createContentAdapterDatesHandler has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 939, 912, 925). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
transport.RoundTrip (cyclomatic 17) REDACTED:480— transport.RoundTrip has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
state.validateType (cyclomatic 17) tpl/internal/go_templates/texttemplate/hugo_template.go:542— state.validateType has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: template.safeCall (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Namespace.Unmarshal (cyclomatic 17) tpl/openapi/openapi3/openapi3.go:71— Namespace.Unmarshal has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 94). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
templateNamespace.doParseTemplate (cyclomatic 17) tpl/tplimpl/templates.go:60— templateNamespace.doParseTemplate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TemplateStore.insertEmbedded (cyclomatic 17) tpl/tplimpl/templatestore.go:1121— TemplateStore.insertEmbedded has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 1122). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Inspector.parseSource (cyclomatic 16) codegen/methods.go:171— Inspector.parseSource has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 172). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
hreflect.convertToFloatIfPossible (cyclomatic 16) common/hreflect/convert.go:160— hreflect.convertToFloatIfPossible has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
allconfig.LoadConfig (cyclomatic 16) config/allconfig/load.go:45— allconfig.LoadConfig has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
pageMap.getPagesInSection (cyclomatic 16) hugolib/content_map_page.go:343— pageMap.getPagesInSection has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 346). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
allPagesAssembler.createMissingStandalonePages (cyclomatic 16) hugolib/content_map_page_assembler.go:1416— allPagesAssembler.createMissingStandalonePages has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pageState.setMetaPost (cyclomatic 16) hugolib/page__meta.go:563— pageState.setMetaPost has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cachedContentScope.RenderShortcodes (cyclomatic 16) hugolib/page__content.go:1042— cachedContentScope.RenderShortcodes has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pageMetaSource.doInitEarly (cyclomatic 16) hugolib/page__meta.go:173— pageMetaSource.doInitEarly has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Site.prepareInits (cyclomatic 16) hugolib/site.go:867— Site.prepareInits has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 900, 870, 947, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AvifCodec.Decode (cyclomatic 16) internal/warpc/avif.go:103— AvifCodec.Decode has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebpCodec.Encode (cyclomatic 16) internal/warpc/webp.go:245— WebpCodec.Encode has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
transformer.Transform (cyclomatic 16) markup/goldmark/internal/extensions/attributes/attributes.go:118— transformer.Transform has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
highlight.ChromaStylesCSS (cyclomatic 16) markup/highlight/chromastyles.go:59— highlight.ChromaStylesCSS has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
minifiers.DecodeConfig (cyclomatic 16) minifiers/config.go:85— minifiers.DecodeConfig has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pageparser.lexShortcodeQuotedParamVal (cyclomatic 16) parser/pageparser/pagelexer_shortcode.go:175— pageparser.lexShortcodeQuotedParamVal has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InvertedIndex.Add (cyclomatic 16) REDACTED:206— InvertedIndex.Add has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
resources.assignMetadata (cyclomatic 16) resources/resource_metadata.go:148— resources.assignMetadata has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
imageResource.Filter (cyclomatic 16) resources/image.go:301— imageResource.Filter has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
imageResource.doWithImageConfig (cyclomatic 16) resources/image.go:427— imageResource.doWithImageConfig has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 428). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Codec.DecodeFormat (cyclomatic 16) resources/images/codec.go:179— Codec.DecodeFormat has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ImageConfig.init (cyclomatic 16) resources/images/config.go:417— ImageConfig.init has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PageConfigEarly.CompileEarly (cyclomatic 16) resources/page/pagemeta/page_frontmatter.go:307— PageConfigEarly.CompileEarly has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
allPagesAssembler.doCreatePages (cognitive 243) hugolib/content_map_page_assembler.go:146— allPagesAssembler.doCreatePages has cognitive complexity 243 (threshold 15). Drivers by points: if/else 104 (196 pts), loops 11 (20 pts), boolean chains 14, match/switch 7 (13 pts) (nesting depth added 107). Most of this is not in the body itself: 8 of the 243 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 226, 463, 762, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
hugoBuilder.handleEvents (cognitive 175) commands/hugobuilder.go:773— hugoBuilder.handleEvents has cognitive complexity 175 (threshold 15). Drivers by points: if/else 59 (140 pts), loops 9 (21 pts), boolean chains 14 (nesting depth added 93). Of this number, 145 points are the body's own statements and 30 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
HugoSites.processPartialFileEvents (cognitive 137) hugolib/hugo_sites_build.go:863— HugoSites.processPartialFileEvents has cognitive complexity 137 (threshold 15). Drivers by points: if/else 49 (102 pts), loops 19 (28 pts), boolean chains 6, match/switch 1 (nesting depth added 62). Of this number, 61 points are the body's own statements and 76 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pageState.setMetaPostParams (cognitive 115) hugolib/page__meta.go:621— pageState.setMetaPostParams has cognitive complexity 115 (threshold 15). Drivers by points: if/else 37 (71 pts), loops 8 (27 pts), match/switch 4 (13 pts), boolean chains 4 (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Config.CompileConfig (cognitive 100) config/allconfig/allconfig.go:279— Config.CompileConfig has cognitive complexity 100 (threshold 15). Drivers by points: if/else 44 (83 pts), loops 11 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 43). Of this number, 94 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.checkCondition (cognitive 99) REDACTED:60— Namespace.checkCondition has cognitive complexity 99 (threshold 15). Drivers by points: if/else 24 (51 pts), match/switch 13 (24 pts), boolean chains 18, loops 2 (6 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TemplateStore.insertTemplates (cognitive 98) tpl/tplimpl/templatestore.go:1379— TemplateStore.insertTemplates has cognitive complexity 98 (threshold 15). Drivers by points: if/else 39 (75 pts), loops 5 (11 pts), boolean chains 8, match/switch 3 (4 pts) (nesting depth added 43). Most of this is not in the body itself: 12 of the 98 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1393, 1640). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
componentFsDir.ReadDirWithContext (cognitive 96) hugofs/component_fs.go:84— componentFsDir.ReadDirWithContext has cognitive complexity 96 (threshold 15). Drivers by points: if/else 31 (74 pts), boolean chains 8, loops 5 (8 pts), match/switch 2 (6 pts) (nesting depth added 50). Of this number, 75 points are the body's own statements and 21 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
shortcodeParseInfo.extractShortcode (cognitive 94) hugolib/shortcode.go:572— shortcodeParseInfo.extractShortcode has cognitive complexity 94 (threshold 15). Drivers by points: if/else 32 (88 pts), boolean chains 2, match/switch 1 (2 pts), jumps 1, loops 1 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Deployer.Deploy (cognitive 91) REDACTED:120— Deployer.Deploy has cognitive complexity 91 (threshold 15). Drivers by points: if/else 38 (79 pts), loops 5 (9 pts), boolean chains 3 (nesting depth added 45). Of this number, 80 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
InvertedIndex.searchDate (cognitive 90) REDACTED:521— InvertedIndex.searchDate has cognitive complexity 90 (threshold 15). Drivers by points: if/else 20 (71 pts), loops 7 (15 pts), boolean chains 4 (nesting depth added 59). Of this number, 64 points are the body's own statements and 26 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
page.CreateTargetPaths (cognitive 83) resources/page/page_paths.go:120— page.CreateTargetPaths has cognitive complexity 83 (threshold 15). Drivers by points: if/else 42 (65 pts), boolean chains 18 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BuildClient.Build (cognitive 79) internal/js/esbuild/build.go:56— BuildClient.Build has cognitive complexity 79 (threshold 15). Drivers by points: if/else 32 (68 pts), loops 5 (10 pts), boolean chains 1 (nesting depth added 41). Of this number, 24 points are the body's own statements and 55 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
InvertedIndex.Search (cognitive 78) REDACTED:372— InvertedIndex.Search has cognitive complexity 78 (threshold 15). Drivers by points: if/else 16 (59 pts), loops 6 (19 pts) (nesting depth added 56). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
fileServer.createEndpoint (cognitive 77) REDACTED:240— fileServer.createEndpoint has cognitive complexity 77 (threshold 15). Drivers by points: if/else 29 (69 pts), match/switch 1 (4 pts), boolean chains 3, loops 1 (nesting depth added 43). Most of this is not in the body itself: 12 of the 77 points are its own statements and the rest belongs to one function literal inside it that branches (line 271). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
hugolib.pageRenderer (cognitive 76) hugolib/site_render.go:122— hugolib.pageRenderer has cognitive complexity 76 (threshold 15). Drivers by points: if/else 27 (66 pts), boolean chains 6, match/switch 2 (3 pts), loops 1 (nesting depth added 40). Of this number, 75 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
resourceAdapter.transform (cognitive 76) resources/transform.go:534— resourceAdapter.transform has cognitive complexity 76 (threshold 15). Drivers by points: if/else 31 (63 pts), boolean chains 5, loops 3 (5 pts), match/switch 1 (3 pts) (nesting depth added 36). Of this number, 71 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
allconfig.fromLoadConfigResult (cognitive 75) config/allconfig/allconfig.go:1046— allconfig.fromLoadConfigResult has cognitive complexity 75 (threshold 15). Drivers by points: if/else 19 (55 pts), match/switch 3 (13 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
collector.getAndCreateModule (cognitive 72) modules/collect.go:231— collector.getAndCreateModule has cognitive complexity 72 (threshold 15). Drivers by points: if/else 28 (71 pts), boolean chains 1 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
images.DecodeImageConfig (cognitive 72) resources/images/config.go:246— images.DecodeImageConfig has cognitive complexity 72 (threshold 15). Drivers by points: if/else 30 (64 pts), boolean chains 5, loops 2, match/switch 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PathParser.parseIdentifier (cognitive 69) common/paths/pathparser.go:327— PathParser.parseIdentifier has cognitive complexity 69 (threshold 15). Drivers by points: if/else 30 (57 pts), boolean chains 12 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InvertedIndex.Add (cognitive 67) REDACTED:206— InvertedIndex.Add has cognitive complexity 67 (threshold 15). Drivers by points: if/else 10 (48 pts), loops 5 (19 pts) (nesting depth added 52). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
sourceFilesystemsBuilder.createOverlayFs (cognitive 64) hugolib/filesystems/basefs.go:675— sourceFilesystemsBuilder.createOverlayFs has cognitive complexity 64 (threshold 15). Drivers by points: if/else 25 (57 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 35). Of this number, 58 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PathParser.doParse (cognitive 63) common/paths/pathparser.go:459— PathParser.doParse has cognitive complexity 63 (threshold 15). Drivers by points: if/else 27 (47 pts), boolean chains 9, match/switch 2 (6 pts), loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hugolib.doRenderShortcode (cognitive 62) hugolib/shortcode.go:357— hugolib.doRenderShortcode has cognitive complexity 62 (threshold 15). Drivers by points: if/else 21 (48 pts), boolean chains 6, match/switch 2 (6 pts), loops 1 (2 pts) (nesting depth added 32). Of this number, 60 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Namespace.Sort (cognitive 62) tpl/collections/sort.go:31— Namespace.Sort has cognitive complexity 62 (threshold 15). Drivers by points: if/else 13 (41 pts), loops 5 (13 pts), boolean chains 4, match/switch 3 (4 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TemplateDescriptor.doCompare (cognitive 61) tpl/tplimpl/templatedescriptor.go:111— TemplateDescriptor.doCompare has cognitive complexity 61 (threshold 15). Drivers by points: if/else 28 (41 pts), boolean chains 20 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pagesCollector.Collect (cognitive 60) hugolib/pages_capture.go:84— pagesCollector.Collect has cognitive complexity 60 (threshold 15). Drivers by points: if/else 19 (51 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 35). Of this number, 20 points are the body's own statements and 40 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
batcher.doBuild (cognitive 60) internal/js/esbuild/batch.go:427— batcher.doBuild has cognitive complexity 60 (threshold 15). Drivers by points: if/else 31 (47 pts), loops 6 (13 pts) (nesting depth added 23). Of this number, 29 points are the body's own statements and 31 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cachedContentScope.RenderString (cognitive 59) hugolib/page__content.go:877— cachedContentScope.RenderString has cognitive complexity 59 (threshold 15). Drivers by points: if/else 29 (56 pts), boolean chains 3 (nesting depth added 27). Of this number, 44 points are the body's own statements and 15 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Walkway.walk (cognitive 58) hugofs/walk.go:126— Walkway.walk has cognitive complexity 58 (threshold 15). Drivers by points: if/else 24 (50 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Client.Vendor (cognitive 57) REDACTED:184— Client.Vendor has cognitive complexity 57 (threshold 15). Drivers by points: if/else 21 (50 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hugolib.NewHugoSites (cognitive 56) hugolib/site.go:203— hugolib.NewHugoSites has cognitive complexity 56 (threshold 15). Drivers by points: if/else 25 (42 pts), loops 6 (10 pts), boolean chains 4 (nesting depth added 21). Of this number, 55 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HugoSites.resolveAndClearStateForIdentities (cognitive 55) hugolib/content_map_page.go:900— HugoSites.resolveAndClearStateForIdentities has cognitive complexity 55 (threshold 15). Drivers by points: if/else 18 (38 pts), loops 8 (15 pts), boolean chains 2 (nesting depth added 27). Of this number, 39 points are the body's own statements and 16 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HugoSites.Build (cognitive 53) hugolib/hugo_sites_build.go:64— HugoSites.Build has cognitive complexity 53 (threshold 15). Drivers by points: if/else 28 (44 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 17). Of this number, 33 points are the body's own statements and 20 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
esbuild.createBuildPlugins (cognitive 53) internal/js/esbuild/resolve.go:189— esbuild.createBuildPlugins has cognitive complexity 53 (threshold 15). Drivers by points: if/else 32 (47 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 16). Most of this is not in the body itself: 2 of the 53 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 192, 306, 370). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AvifCodec.Encode (cognitive 51) internal/warpc/avif.go:244— AvifCodec.Encode has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 4 (11 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TemplateStore.parseTemplates (cognitive 51) tpl/tplimpl/templatestore.go:1687— TemplateStore.parseTemplates has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (35 pts), loops 8 (16 pts) (nesting depth added 33). Most of this is not in the body itself: 15 of the 51 points are its own statements and the rest belongs to one function literal inside it that branches (line 1688). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
HugoSites.render (cognitive 50) hugolib/hugo_sites_build.go:397— HugoSites.render has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (40 pts), loops 3 (7 pts), match/switch 1 (3 pts) (nesting depth added 33). Most of this is not in the body itself: 11 of the 50 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 437, 406). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
npm.Pack (cognitive 50) REDACTED:52— npm.Pack has cognitive complexity 50 (threshold 15). Drivers by points: if/else 26 (41 pts), boolean chains 5, loops 4 (nesting depth added 15). Of this number, 43 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.Union (cognitive 50) REDACTED:638— Namespace.Union has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (36 pts), loops 2 (6 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Client.FromRemote (cognitive 49) REDACTED:195— Client.FromRemote has cognitive complexity 49 (threshold 15). Drivers by points: if/else 29 (41 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 14). Most of this is not in the body itself: 5 of the 49 points are its own statements and the rest belongs to one function literal inside it that branches (line 229). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
state.evalField (cognitive 49) tpl/internal/go_templates/texttemplate/hugo_template.go:260— state.evalField has cognitive complexity 49 (threshold 15). Drivers by points: if/else 21 (41 pts), match/switch 2 (5 pts), boolean chains 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
state.evalCall (cognitive 49) tpl/internal/go_templates/texttemplate/hugo_template.go:398— state.evalCall has cognitive complexity 49 (threshold 15). Drivers by points: if/else 26 (39 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 15). Of this number, 39 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TemplateStore.insertTemplate2 (cognitive 49) tpl/tplimpl/templatestore.go:1265— TemplateStore.insertTemplate2 has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (40 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
RootMappingFs.collectDirEntries (cognitive 48) hugofs/rootmapping_fs.go:540— RootMappingFs.collectDirEntries has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (42 pts), loops 5 (6 pts) (nesting depth added 27). Of this number, 28 points are the body's own statements and 20 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
warpc.newDispatcher (cognitive 48) internal/warpc/warpc.go:659— warpc.newDispatcher has cognitive complexity 48 (threshold 15). Drivers by points: if/else 26 (42 pts), loops 5, boolean chains 1 (nesting depth added 16). Of this number, 19 points are the body's own statements and 29 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AsciiDocConverter.ParseArgs (cognitive 48) markup/asciidocext/internal/converter.go:105— AsciiDocConverter.ParseArgs has cognitive complexity 48 (threshold 15). Drivers by points: if/else 25 (46 pts), loops 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
modules.decodeConfig (cognitive 47) modules/config.go:181— modules.decodeConfig has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (33 pts), loops 5 (13 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
minifiers.DecodeConfig (cognitive 46) minifiers/config.go:85— minifiers.DecodeConfig has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (44 pts), loops 1 (2 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
collector.normalizeMounts (cognitive 46) modules/collect.go:832— collector.normalizeMounts has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (43 pts), boolean chains 2, loops 1 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
resources.assignMetadata (cognitive 46) resources/resource_metadata.go:148— resources.assignMetadata has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (43 pts), boolean chains 2, loops 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
sitePagesAssembler.applyAggregates (cognitive 45) hugolib/content_map_page_assembler.go:932— sitePagesAssembler.applyAggregates has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (38 pts), boolean chains 3, loops 1 (2 pts), match/switch 2 (nesting depth added 20). Most of this is not in the body itself: 9 of the 45 points are its own statements and the rest belongs to one function literal inside it that branches (line 945). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
hugoBuilder.newWatcher (cognitive 44) commands/hugobuilder.go:335— hugoBuilder.newWatcher has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 6, loops 3, match/switch 1 (2 pts) (nesting depth added 20). Most of this is not in the body itself: 13 of the 44 points are its own statements and the rest belongs to one function literal inside it that branches (line 385). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
configLoader.loadConfigMain (cognitive 44) config/allconfig/load.go:342— configLoader.loadConfigMain has cognitive complexity 44 (threshold 15). Drivers by points: if/else 23 (40 pts), loops 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pageMetaSource.initPathInfo (cognitive 44) hugolib/page__meta.go:264— pageMetaSource.initPathInfo has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (43 pts), boolean chains 1 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Namespace.checkWhereArray (cognitive 44) REDACTED:551— Namespace.checkWhereArray has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
serverCommand.serve (cognitive 43) REDACTED:869— serverCommand.serve has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (31 pts), loops 5 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 13). Of this number, 26 points are the body's own statements and 17 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hugofs.NewRootMappingFs (cognitive 43) hugofs/rootmapping_fs.go:44— hugofs.NewRootMappingFs has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (42 pts), loops 1 (nesting depth added 26). Of this number, 33 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LanguagesInternal.init (cognitive 43) langs/config.go:132— LanguagesInternal.init has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (35 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 15). Of this number, 34 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compare.compareFold (cognitive 42) compare/compare_strings.go:36— compare.compareFold has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
componentFs.applyMeta (cognitive 42) hugofs/component_fs.go:328— componentFs.applyMeta has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 2 (6 pts), match/switch 1 (2 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Options.compile (cognitive 42) internal/js/esbuild/options.go:275— Options.compile has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (26 pts), match/switch 7, loops 4 (6 pts), boolean chains 2, jumps 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.Eq (cognitive 42) tpl/compare/compare.go:101— Namespace.Eq has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (39 pts), boolean chains 2, loops 1 (nesting depth added 22). Of this number, 40 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.LoadConfigFromDir (cognitive 41) config/configLoader.go:131— config.LoadConfigFromDir has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 3 (5 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 21). Most of this is not in the body itself: 7 of the 41 points are its own statements and the rest belongs to one function literal inside it that branches (line 152). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
pageMap.addPagesFromGoTmplFi (cognitive 41) hugolib/content_map.go:322— pageMap.addPagesFromGoTmplFi has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (32 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 18). Most of this is not in the body itself: 15 of the 41 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 361, 405). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
npm.ensureWorkspaceRef (cognitive 41) REDACTED:248— npm.ensureWorkspaceRef has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (36 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
htmlElementsCollectorWriter.parseHTMLElement (cognitive 41) publisher/htmlElementsCollector.go:372— htmlElementsCollectorWriter.parseHTMLElement has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 3 (10 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 27). Most of this is not in the body itself: 2 of the 41 points are its own statements and the rest belongs to one function literal inside it that branches (line 394). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Namespace.Unmarshal (cognitive 41) tpl/transform/unmarshal.go:38— Namespace.Unmarshal has cognitive complexity 41 (threshold 15). Drivers by points: if/else 25 (40 pts), boolean chains 1 (nesting depth added 15). Of this number, 19 points are the body's own statements and 22 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
filecache.DecodeConfig (cognitive 40) cache/filecache/filecache_config.go:208— filecache.DecodeConfig has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scanner.Next (cognitive 40) common/hhtml/scanner.go:65— Scanner.Next has cognitive complexity 40 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 4 (9 pts), boolean chains 8, match/switch 3 (8 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HugoSites.postProcess (cognitive 40) hugolib/hugo_sites_build.go:648— HugoSites.postProcess has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (34 pts), loops 5 (6 pts) (nesting depth added 19). Most of this is not in the body itself: 11 of the 40 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 706, 657). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
IntegrationTestBuilder.initBuilder (cognitive 40) REDACTED:887— IntegrationTestBuilder.initBuilder has cognitive complexity 40 (threshold 15). Drivers by points: if/else 22 (27 pts), loops 5 (10 pts), boolean chains 3 (nesting depth added 10). None of this is in the body itself: all 40 points belong to one function literal inside it that branches (line 889). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
collector.mountCommonJSConfig (cognitive 40) modules/collect.go:701— collector.mountCommonJSConfig has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 5 (10 pts), boolean chains 5 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
collector.applyThemeConfig (cognitive 39) modules/collect.go:494— collector.applyThemeConfig has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (33 pts), loops 3 (5 pts), jumps 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
internal.getGetTplPackagesGoDoc (cognitive 39) tpl/internal/templatefuncsRegistry.go:264— internal.getGetTplPackagesGoDoc has cognitive complexity 39 (threshold 15). Drivers by points: loops 5 (22 pts), if/else 9 (17 pts) (nesting depth added 25). None of this is in the body itself: all 39 points belong to one function literal inside it that branches (line 265). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
defaultConfigProvider.Merge (cognitive 38) config/defaultConfigProvider.go:165— defaultConfigProvider.Merge has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 2 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
segmentsBuilder.buildOne (cognitive 38) hugolib/segments/segments.go:96— segmentsBuilder.buildOne has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (36 pts), loops 2 (nesting depth added 16). Of this number, 24 points are the body's own statements and 14 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
importResolver.importRecursive (cognitive 38) resources/resource_transformers/cssjs/inline_imports.go:95— importResolver.importRecursive has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (33 pts), loops 2 (5 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Inspector.MethodsFromTypes (cognitive 37) codegen/methods.go:57— Inspector.MethodsFromTypes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 5 (12 pts), boolean chains 1 (nesting depth added 20). Of this number, 32 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hugolib.newHugoSites (cognitive 37) hugolib/site.go:469— hugolib.newHugoSites has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 9 (15 pts) (nesting depth added 19). Of this number, 35 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NodeShiftTreeWalker.Walk (cognitive 37) hugolib/doctree/nodeshifttree.go:535— NodeShiftTreeWalker.Walk has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (29 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 10). None of this is in the body itself: all 37 points belong to one function literal inside it that branches (line 538). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Cache.Prune (cognitive 36) cache/filecache/filecache_pruner.go:53— Cache.Prune has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 3, loops 2 (nesting depth added 11). Most of this is not in the body itself: 10 of the 36 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 86, 74). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
importCommand.copyJekyllFilesAndFolders (cognitive 36) commands/import.go:342— importCommand.copyJekyllFilesAndFolders has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Site.assembleMenus (cognitive 36) hugolib/site.go:1418— Site.assembleMenus has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 6 (7 pts), boolean chains 1 (nesting depth added 15). Of this number, 26 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
modules.ApplyProjectConfigDefaults (cognitive 36) modules/config.go:67— modules.ApplyProjectConfigDefaults has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (8 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Client.Get (cognitive 36) REDACTED:302— Client.Get has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 3 (8 pts), boolean chains 6 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Client.listGoMods (cognitive 36) REDACTED:499— Client.listGoMods has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 2, loops 2 (nesting depth added 14). Of this number, 22 points are the body's own statements and 14 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.newElemResolver (cognitive 36) REDACTED:364— Namespace.newElemResolver has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (34 pts), boolean chains 1, match/switch 1 (nesting depth added 18). Of this number, 17 points are the body's own statements and 19 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
math.DoArithmetic (cognitive 35) common/math/math.go:23— math.DoArithmetic has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 5 (8 pts), boolean chains 4 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Configs.Init (cognitive 35) config/allconfig/allconfig.go:881— Configs.Init has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 7 (9 pts), boolean chains 1 (nesting depth added 14). Of this number, 30 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
helperContentNode.findContentNodeForSiteVector (cognitive 35) hugolib/content_map_page_contentnode.go:223— helperContentNode.findContentNodeForSiteVector has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
contentParseInfo.parseSource (cognitive 35) hugolib/page__content.go:270— contentParseInfo.parseSource has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (30 pts), match/switch 1 (2 pts), boolean chains 1, jumps 1, loops 1 (nesting depth added 20). Of this number, 27 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
siteRefLinker.refLink (cognitive 35) hugolib/site.go:1052— siteRefLinker.refLink has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
configLoader.applyOsEnvOverrides (cognitive 34) config/allconfig/load.go:237— configLoader.applyOsEnvOverrides has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 2, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pageMap.getOrCreateResourcesForPage (cognitive 34) hugolib/content_map_page.go:585— pageMap.getOrCreateResourcesForPage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 4 (11 pts) (nesting depth added 18). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 592). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
transport.RoundTrip (cognitive 34) REDACTED:480— transport.RoundTrip has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 3, loops 1 (nesting depth added 19). Of this number, 23 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
templateNamespace.doParseTemplate (cognitive 34) tpl/tplimpl/templates.go:60— templateNamespace.doParseTemplate has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (32 pts), boolean chains 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
bestMatch.isBetter (cognitive 34) tpl/tplimpl/templatestore.go:2101— bestMatch.isBetter has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (31 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Inspector.parseSource (cognitive 33) codegen/methods.go:171— Inspector.parseSource has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 5 (13 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 18). None of this is in the body itself: all 33 points belong to one function literal inside it that branches (line 172). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
commands.removeStale (cognitive 33) commands/hugobuilder.go:533— commands.removeStale has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PathParser.applyPrefixIdentifier (cognitive 33) common/paths/pathparser.go:124— PathParser.applyPrefixIdentifier has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 2, match/switch 1 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
pageContentOutput.initRenderHooks (cognitive 33) hugolib/page__per_output.go:240— pageContentOutput.initRenderHooks has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 7, match/switch 2 (nesting depth added 4). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to one function literal inside it that branches (line 245). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
attributes.New (cognitive 33) markup/internal/attributes/attributes.go:57— attributes.New has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Client.transform (cognitive 33) resources/resource_transformers/js/build.go:56— Client.transform has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 2, loops 1 (nesting depth added 11). Of this number, 31 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.FormatNumberCustom (cognitive 33) tpl/lang/lang.go:85— Namespace.FormatNumberCustom has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 5 (11 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Deployer.walkRemote (cognitive 33) REDACTED:578— Deployer.walkRemote has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 2, loops 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
commands.newModCommands (cognitive 32) commands/mod.go:39— commands.newModCommands has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22 (30 pts), boolean chains 2 (nesting depth added 8). None of this is in the body itself: all 32 points belong to 8 function literals inside it that branch (lines 249, 103, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
HugoSites.fileEventsContentPaths (cognitive 32) hugolib/site.go:1322— HugoSites.fileEventsContentPaths has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pageState.shiftToOutputFormat (cognitive 32) hugolib/page.go:873— pageState.shiftToOutputFormat has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 15). Of this number, 29 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pageFinder.getContentNodeForRef (cognitive 32) hugolib/pagecollections.go:151— pageFinder.getContentNodeForRef has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 10 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.checkWhereMap (cognitive 32) REDACTED:610— Namespace.checkWhereMap has cognitive complexity 32 (threshold 15). Drivers by points: if/else 5 (19 pts), match/switch 4 (12 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
descriptorHandler.compareDescriptors (cognitive 32) tpl/tplimpl/templatedescriptor.go:70— descriptorHandler.compareDescriptors has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 8 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Deps.Init (cognitive 31) deps/deps.go:142— Deps.Init has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24 (28 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 5). Of this number, 29 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
pageState.setMetaPost (cognitive 31) hugolib/page__meta.go:563— pageState.setMetaPost has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pageparser.lexShortcodeParam (cognitive 31) parser/pageparser/pagelexer_shortcode.go:87— pageparser.lexShortcodeParam has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 6, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pageparser.lexShortcodeQuotedParamVal (cognitive 31) parser/pageparser/pagelexer_shortcode.go:175— pageparser.lexShortcodeQuotedParamVal has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (25 pts), jumps 2, match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
paths.findWrapperDotPositions (cognitive 30) common/paths/pathparser.go:70— paths.findWrapperDotPositions has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (8 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pageMeta.applyDefaultValues (cognitive 30) hugolib/page__meta.go:954— pageMeta.applyDefaultValues has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (27 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
goldmark.newMarkdown (cognitive 30) markup/goldmark/convert.go:84— goldmark.newMarkdown has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23 (28 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
babelTransformation.Transform (cognitive 30) REDACTED:115— babelTransformation.Transform has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (27 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.Seq (cognitive 30) REDACTED:428— Namespace.Seq has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 8, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TemplateStore.templates (cognitive 30) tpl/tplimpl/templatestore.go:1811— TemplateStore.templates has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 6 (13 pts) (nesting depth added 19). None of this is in the body itself: all 30 points belong to one function literal inside it that branches (line 1812). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Server.MatchRedirect (cognitive 29) config/commonConfig.go:365— Server.MatchRedirect has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Filters.Text (cognitive 29) resources/images/filters.go:74— Filters.Text has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (21 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.doIndex (cognitive 29) tpl/collections/index.go:42— Namespace.doIndex has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 2 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilenameFilter.doMatch (cognitive 28) hugofs/hglob/filename_filter.go:162— FilenameFilter.doMatch has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
hugolib.createTargetPathDescriptor (cognitive 28) hugolib/page__paths.go:158— hugolib.createTargetPathDescriptor has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 3 (nesting depth added 5). Of this number, 20 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
allPagesAssembler.createAllPages (cognitive 28) hugolib/content_map_page_assembler.go:102— allPagesAssembler.createAllPages has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 16). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 113, 103). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Codec.EncodeTo (cognitive 28) resources/images/codec.go:75— Codec.EncodeTo has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
collections._d (cognitive 28) REDACTED:27— collections._d has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (9 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Methods.ToMarshalJSON (cognitive 27) codegen/methods.go:368— Methods.ToMarshalJSON has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 7 (9 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
aliasHandler.targetPathAlias (cognitive 27) hugolib/alias.go:123— aliasHandler.targetPathAlias has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 5 (9 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pagesCollector.collectDirDir (cognitive 27) hugolib/pages_capture.go:260— pagesCollector.collectDirDir has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 4 (nesting depth added 9). None of this is in the body itself: all 27 points belong to 2 function literals inside it that branch (lines 270, 263). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
imageResource.Filter (cognitive 27) resources/image.go:301— imageResource.Filter has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 4, match/switch 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 343). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
postcssTransformation.Transform (cognitive 27) REDACTED:146— postcssTransformation.Transform has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
collections.mergeMap (cognitive 27) tpl/collections/merge.go:91— collections.mergeMap has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 2, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
contentBuilder.buildDir (cognitive 26) create/content.go:136— contentBuilder.buildDir has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 10). Of this number, 21 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PathSpec.RelURL (cognitive 26) helpers/url.go:110— PathSpec.RelURL has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BaseFs.WatchFilenames (cognitive 26) hugolib/filesystems/basefs.go:108— BaseFs.WatchFilenames has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 17). Of this number, 17 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HugoSites.resolveAndResetDependententPageOutputs (cognitive 26) hugolib/content_map_page.go:1064— HugoSites.resolveAndResetDependententPageOutputs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 6 (9 pts), boolean chains 2, jumps 1 (nesting depth added 8). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 1106, 1086, 1144, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
scriptGroup.removeNotSet (cognitive 26) internal/js/esbuild/batch.go:1126— scriptGroup.removeNotSet has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (9 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Translator.initFuncs (cognitive 26) langs/i18n/i18n.go:70— Translator.initFuncs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 2, loops 1 (nesting depth added 13). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to one function literal inside it that branches (line 78). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Pages.GroupBy (cognitive 26) resources/page/pagegroup.go:114— Pages.GroupBy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, match/switch 2 (3 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
state.validateType (cognitive 26) tpl/internal/go_templates/texttemplate/hugo_template.go:542— state.validateType has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
predicate.NewIndexStringPredicateFromGlobsAndRanges (cognitive 25) common/predicate/predicate.go:222— predicate.NewIndexStringPredicateFromGlobsAndRanges has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 1 (4 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HugoSites.assemble (cognitive 25) hugolib/hugo_sites_build.go:300— HugoSites.assemble has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 6 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hugoContextRenderer.renderHTMLBlock (cognitive 25) markup/goldmark/hugocontext/hugocontext.go:195— hugoContextRenderer.renderHTMLBlock has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 1 (3 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
metadecoders.validateAliasLimitForCollections (cognitive 25) REDACTED:216— metadecoders.validateAliasLimitForCollections has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 12). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 238, 223). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
PageConfigEarly.CompileEarly (cognitive 25) resources/page/pagemeta/page_frontmatter.go:307— PageConfigEarly.CompileEarly has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
common.readInput (cognitive 25) internal/warpc/js/common.js:18— common.readInput has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 3 (10 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Params.merge (cognitive 24) REDACTED:101— Params.merge has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
hreflect.convertToFloatIfPossible (cognitive 24) common/hreflect/convert.go:160— hreflect.convertToFloatIfPossible has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cachedContentScope.contentRendered (cognitive 24) hugolib/page__content.go:491— cachedContentScope.contentRendered has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 498). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Site.prepareInits (cognitive 24) hugolib/site.go:867— Site.prepareInits has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 3 (nesting depth added 9). None of this is in the body itself: all 24 points belong to 4 function literals inside it that branch (lines 900, 870, 947, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
transformer.Transform (cognitive 24) markup/goldmark/internal/extensions/attributes/attributes.go:118— transformer.Transform has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 8). Of this number, 13 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
output.DecodeConfig (cognitive 24) output/config.go:40— output.DecodeConfig has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (6 pts) (nesting depth added 15). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 41). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
collections.evaluateSubElem (cognitive 24) REDACTED:262— collections.evaluateSubElem has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.compareGetWithCollator (cognitive 24) tpl/compare/compare.go:273— Namespace.compareGetWithCollator has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3, match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TemplateStore.insertEmbedded (cognitive 24) tpl/tplimpl/templatestore.go:1121— TemplateStore.insertEmbedded has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 1122). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
TemplateStore.toKeyCategoryAndDescriptor (cognitive 24) tpl/tplimpl/templatestore.go:1840— TemplateStore.toKeyCategoryAndDescriptor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (20 pts), match/switch 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.CompileConfig (cognitive 23) config/commonConfig.go:297— Server.CompileConfig has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pageMap.getPagesInSection (cognitive 23) hugolib/content_map_page.go:343— pageMap.getPagesInSection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4 (nesting depth added 8). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 346). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
BaseFs.AbsProjectContentDir (cognitive 23) hugolib/filesystems/basefs.go:168— BaseFs.AbsProjectContentDir has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HugoSites.handleDataFile (cognitive 23) REDACTED:757— HugoSites.handleDataFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cachedContentScope.contentToC (cognitive 23) hugolib/page__content.go:645— cachedContentScope.contentToC has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 650). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
cachedContentScope.RenderShortcodes (cognitive 23) hugolib/page__content.go:1042— cachedContentScope.RenderShortcodes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pageMetaSource.doInitEarly (cognitive 23) hugolib/page__meta.go:173— pageMetaSource.doInitEarly has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
codeblocks.getAttributes (cognitive 23) markup/goldmark/codeblocks/render.go:139— codeblocks.getAttributes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
npm.PackageFilesSum (cognitive 23) REDACTED:559— npm.PackageFilesSum has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 3, boolean chains 2 (nesting depth added 6). Of this number, 21 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
publisher.isClosedByTag (cognitive 23) publisher/htmlElementsCollector.go:472— publisher.isClosedByTag has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 1 (2 pts), boolean chains 1, jumps 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
page.ExtractSummaryFromHTML (cognitive 23) resources/page/page_markup.go:176— page.ExtractSummaryFromHTML has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). Of this number, 17 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PermalinkExpander.toSliceFunc (cognitive 23) resources/page/permalinks.go:436— PermalinkExpander.toSliceFunc has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 3 (nesting depth added 5). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 446, 487, 505). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Client.Concat (cognitive 23) resources/resource_factories/bundler/bundler.go:83— Client.Concat has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 9). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 85). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Namespace.Truncate (cognitive 23) REDACTED:30— Namespace.Truncate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
templateTransformContext.applyTransformations (cognitive 23) tpl/tplimpl/templatetransform.go:144— templateTransformContext.applyTransformations has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
hugio.CopyDir (cognitive 22) common/hugio/copy.go:54— hugio.CopyDir has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pageMap.CreateSiteTaxonomies (cognitive 22) hugolib/content_map_page.go:1165— pageMap.CreateSiteTaxonomies has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 1179). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
allPagesAssembler.createMissingStandalonePages (cognitive 22) hugolib/content_map_page_assembler.go:1416— allPagesAssembler.createMissingStandalonePages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sitePagesAssembler.assembleResourcesAndSetHome (cognitive 22) hugolib/content_map_page_assembler.go:1224— sitePagesAssembler.assembleResourcesAndSetHome has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 1 (nesting depth added 5). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 1231). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Site.executeDeferredTemplates (cognitive 22) hugolib/hugo_sites_build.go:517— Site.executeDeferredTemplates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 1 (nesting depth added 11). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 518). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Site.handleContentAdapterChanges (cognitive 22) hugolib/hugo_sites_build.go:1278— Site.handleContentAdapterChanges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1, loops 1 (nesting depth added 11). Most of this is not in the body itself: 10 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 1290). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
scriptGroup.removeTouchedButNotSet (cognitive 22) internal/js/esbuild/batch.go:1180— scriptGroup.removeTouchedButNotSet has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebpCodec.Encode (cognitive 22) internal/warpc/webp.go:245— WebpCodec.Encode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Client.writeHugoDirectSum (cognitive 22) REDACTED:606— Client.writeHugoDirectSum has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, loops 3 (nesting depth added 5). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
collector.addAndRecurse (cognitive 22) modules/collect.go:397— collector.addAndRecurse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResourceSourceDescriptor.init (cognitive 22) resources/resource.go:113— ResourceSourceDescriptor.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
toc.toc (cognitive 22) docs/assets/js/alpinejs/data/toc.js:3— toc.toc has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 12). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 28, 25, 19). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
importCommand.convertJekyllMetaData (cognitive 21) commands/import.go:248— importCommand.convertJekyllMetaData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
version.CompareVersions (cognitive 21) common/version/version.go:173— version.CompareVersions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
defaultConfigProvider.determineMergeStrategy (cognitive 21) config/defaultConfigProvider.go:271— defaultConfigProvider.determineMergeStrategy has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PathSpec.AbsURL (cognitive 21) helpers/url.go:47— PathSpec.AbsURL has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
pageMap.forEachResourceInPage (cognitive 21) hugolib/content_map_page.go:477— pageMap.forEachResourceInPage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 2, loops 1 (nesting depth added 7). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 500, 543, 535). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Site.renderDefaultSiteRedirect (cognitive 21) hugolib/site_render.go:333— Site.renderDefaultSiteRedirect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IntSetsBuilder.WithConfig (cognitive 21) hugolib/sitesmatrix/vectorstores.go:781— IntSetsBuilder.WithConfig has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (5 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 8). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 782). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
AvifCodec.Decode (cognitive 21) internal/warpc/avif.go:103— AvifCodec.Decode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
highlight.highlight (cognitive 21) markup/highlight/highlight.go:165— highlight.highlight has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 1 (nesting depth added 4). Of this number, 17 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Decoder.unmarshalCSV (cognitive 21) REDACTED:336— Decoder.unmarshalCSV has cognitive complexity 21 (threshold 15). Drivers by points: loops 3 (10 pts), if/else 3 (8 pts), match/switch 2 (3 pts) (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Codec.DecodeFormat (cognitive 21) resources/images/codec.go:179— Codec.DecodeFormat has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
page.expandSummaryDivider (cognitive 21) resources/page/page_markup.go:343— page.expandSummaryDivider has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.Intersect (cognitive 21) REDACTED:271— Namespace.Intersect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (7 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Deployer.walkLocal (cognitive 21) REDACTED:490— Deployer.walkLocal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3, loops 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 497). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
staticSyncer.syncsStaticEvents (cognitive 20) REDACTED:1070— staticSyncer.syncsStaticEvents has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 1 (nesting depth added 8). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 1073). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
skeletons.CreateProject (cognitive 20) create/skeletons/skeletons.go:95— skeletons.CreateProject has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 9). Of this number, 16 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HugoSites.fileEventsApplyInfo (cognitive 20) hugolib/site.go:1255— HugoSites.fileEventsApplyInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dispatcher.inputJSON (cognitive 20) internal/warpc/warpc.go:429— dispatcher.inputJSON has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, loops 2 (nesting depth added 7). Of this number, 15 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
highlight.normalizeHighlightOptions (cognitive 20) markup/highlight/config.go:266— highlight.normalizeHighlightOptions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
navigation.PageMenusFromPage (cognitive 20) navigation/pagemenus.go:49— navigation.PageMenusFromPage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pageMenus.HasMenuCurrent (cognitive 20) navigation/pagemenus.go:139— pageMenus.HasMenuCurrent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
output.decode (cognitive 20) output/config.go:94— output.decode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (4 pts), loops 1 (2 pts) (nesting depth added 12). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 99). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Decoder.Decode (cognitive 20) resources/images/meta/meta.go:216— Decoder.Decode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 229, 217). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Namespace.SymDiff (cognitive 20) tpl/collections/symdiff.go:25— Namespace.SymDiff has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tplimpl.needsBaseTemplate (cognitive 20) tpl/tplimpl/templates.go:213— tplimpl.needsBaseTemplate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serverCommand.fixURL (cognitive 19) REDACTED:795— serverCommand.fixURL has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sitePagesAssembler.assembleTerms (cognitive 19) hugolib/content_map_page_assembler.go:1141— sitePagesAssembler.assembleTerms has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (3 pts) (nesting depth added 9). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 1156). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
BatcherClient.New (cognitive 19) internal/js/esbuild/batch.go:203— BatcherClient.New has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts) (nesting depth added 10). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 242, 205). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
hugoContextTransformer.Transform (cognitive 19) markup/goldmark/hugocontext/hugocontext.go:284— hugoContextTransformer.Transform has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1 (nesting depth added 10). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 285). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
tocTransformer.Transform (cognitive 19) markup/goldmark/toc.go:47— tocTransformer.Transform has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 65). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
highlight.ChromaStylesCSS (cognitive 19) markup/highlight/chromastyles.go:59— highlight.ChromaStylesCSS has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 2 (4 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
pageparser.lexIdentifierInShortcode (cognitive 19) parser/pageparser/pagelexer_shortcode.go:244— pageparser.lexIdentifierInShortcode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 1 (2 pts), jumps 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
imageResource.doWithImageConfig (cognitive 19) resources/image.go:427— imageResource.doWithImageConfig has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6 (nesting depth added 4). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to one function literal inside it that branches (line 428). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
RelatedDocsHandler.getOrCreateIndex (cognitive 19) resources/page/pages_related.go:188— RelatedDocsHandler.getOrCreateIndex has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tailwindcssTransformation.Transform (cognitive 19) REDACTED:82— tailwindcssTransformation.Transform has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resourceAdapter.getOrTransform (cognitive 19) resources/transform.go:484— resourceAdapter.getOrTransform has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3 (nesting depth added 8). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.Unmarshal (cognitive 19) tpl/openapi/openapi3/openapi3.go:71— Namespace.Unmarshal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 94). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
stripHTMLWriter.writeText (cognitive 19) tpl/template.go:157— stripHTMLWriter.writeText has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
templateTransformContext.hasBreakOrContinueOutsideRange (cognitive 19) tpl/tplimpl/templatetransform.go:245— templateTransformContext.hasBreakOrContinueOutsideRange has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
convertCommand.convertContents (cognitive 18) commands/convert.go:255— convertCommand.convertContents has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2, boolean chains 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hugoBuilder.fullBuild (cognitive 18) commands/hugobuilder.go:628— hugoBuilder.fullBuild has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (3 pts) (nesting depth added 5). Of this number, 16 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hmaps.ConvertFloat64WithNoDecimalsToInt (cognitive 18) common/hmaps/maps.go:217— hmaps.ConvertFloat64WithNoDecimalsToInt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (8 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dispatcher.inputBlobs (cognitive 18) internal/warpc/warpc.go:377— dispatcher.inputBlobs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (nesting depth added 8). Of this number, 14 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
i18n.getPluralCount (cognitive 18) langs/i18n/i18n.go:151— i18n.getPluralCount has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageProcessor.doFilter (cognitive 18) resources/images/image.go:280— ImageProcessor.doFilter has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 3 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
textFilter.Draw (cognitive 18) resources/images/text.go:45— textFilter.Draw has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (4 pts), match/switch 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
page.DecodeCascadeConfig (cognitive 18) resources/page/page_matcher.go:133— page.DecodeCascadeConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 5). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 134). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
cascadeConfigDecoder.mapToPageMatcherParamsConfig (cognitive 18) resources/page/page_matcher.go:197— cascadeConfigDecoder.mapToPageMatcherParamsConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pages.GroupByParam (cognitive 18) resources/page/pagegroup.go:184— Pages.GroupByParam has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.Delimit (cognitive 18) REDACTED:101— Namespace.Delimit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.IncludeCached (cognitive 18) tpl/partials/partials.go:186— Namespace.IncludeCached has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 4). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
TemplateStore.allRawTemplates (cognitive 18) tpl/tplimpl/templatestore.go:1090— TemplateStore.allRawTemplates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 6 (8 pts) (nesting depth added 8). None of this is in the body itself: all 18 points belong to one function literal inside it that branches (line 1092). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
TemplateStore.transformTemplates (cognitive 18) tpl/tplimpl/templatestore.go:1944— TemplateStore.transformTemplates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts) (nesting depth added 8). Of this number, 12 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rootCommand.ConfigFromProvider (cognitive 17) commands/commandeer.go:240— rootCommand.ConfigFromProvider has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (17 pts) (nesting depth added 2). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 245). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
allconfig.LoadConfig (cognitive 17) config/allconfig/load.go:45— allconfig.LoadConfig has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
helpers.ExtractAndGroupRootPaths (cognitive 17) helpers/path.go:118— helpers.ExtractAndGroupRootPaths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, jumps 1, loops 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
helpers.GetCacheDir (cognitive 17) helpers/path.go:242— helpers.GetCacheDir has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
resourceSource.lookupContentNodes (cognitive 17) hugolib/content_map.go:169— resourceSource.lookupContentNodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2 (nesting depth added 4). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HugoSites.allSiteLanguages (cognitive 17) REDACTED:213— HugoSites.allSiteLanguages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (6 pts), jumps 2, boolean chains 1 (nesting depth added 9). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 214). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
pageFinder.getContentNode (cognitive 17) hugolib/pagecollections.go:118— pageFinder.getContentNode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RolesInternal.init (cognitive 17) hugolib/roles/roles.go:134— RolesInternal.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Site.initRenderFormats (cognitive 17) hugolib/site.go:969— Site.initRenderFormats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts) (nesting depth added 9). Of this number, 11 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VersionsInternal.init (cognitive 17) hugolib/versions/versions.go:149— VersionsInternal.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Finder.doCheckOne (cognitive 17) identity/finder.go:220— Finder.doCheckOne has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
collector.collectModulesTXT (cognitive 17) modules/collect.go:634— collector.collectModulesTXT has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
navigation.DecodeConfig (cognitive 17) navigation/menu.go:274— navigation.DecodeConfig has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts) (nesting depth added 9). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 275). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
imagetesting.RunGolden (cognitive 17) resources/images/imagetesting/testing.go:87— imagetesting.RunGolden has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 122, 133, 157). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
importResolver.CanonicalizeURL (cognitive 17) resources/resource_transformers/tocss/dartsass/transform.go:156— importResolver.CanonicalizeURL has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.ReplacePairs (cognitive 17) tpl/strings/strings.go:263— Namespace.ReplacePairs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.SliceString (cognitive 17) tpl/strings/strings.go:318— Namespace.SliceString has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
templateTransformContext.isWithPartial (cognitive 17) tpl/tplimpl/templatetransform.go:195— templateTransformContext.isWithPartial has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tplimplinit.CreateFuncMap (cognitive 17) tpl/tplimplinit/tplimplinit.go:60— tplimplinit.CreateFuncMap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
urlreplacers.checkCandidateSrcset (cognitive 17) transform/urlreplacers/absurlreplacer.go:145— urlreplacers.checkCandidateSrcset has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Deployer.findDiffs (cognitive 17) REDACTED:668— Deployer.findDiffs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
convertCommand.convertAndSavePage (cognitive 16) commands/convert.go:135— convertCommand.convertAndSavePage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
convertCommand.copyContentDirsForOutput (cognitive 16) commands/convert.go:205— convertCommand.copyContentDirsForOutput has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
serverCommand.PreRun (cognitive 16) REDACTED:567— serverCommand.PreRun has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6 (nesting depth added 2). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 573). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
hreflect.convertToUintIfPossible (cognitive 16) common/hreflect/convert.go:125— hreflect.convertToUintIfPossible has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hreflect.convertToIntIfPossible (cognitive 16) common/hreflect/convert.go:202— hreflect.convertToIntIfPossible has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
paths.Sanitize (cognitive 16) common/paths/path.go:200— paths.Sanitize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PathParser.SitesMatrixFromPath (cognitive 16) common/paths/pathparser.go:223— PathParser.SitesMatrixFromPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (4 pts), match/switch 1 (nesting depth added 6). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 232). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
rungroup.Run (cognitive 16) common/rungroup/rungroup.go:42— rungroup.Run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 9). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 55). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
deployconfig.DecodeConfig (cognitive 16) deploy/deployconfig/deployConfig.go:138— deployconfig.DecodeConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hugofs.AddFileInfoToError (cognitive 16) hugofs/fileinfo.go:403— hugofs.AddFileInfoToError has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hugofs.WalkFilesystems (cognitive 16) hugofs/fs.go:203— hugofs.WalkFilesystems has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
hglob.NewFilenameFilterV2 (cognitive 16) hugofs/hglob/filename_filter.go:60— hglob.NewFilenameFilterV2 has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RootMappingFs.newUnionFile (cognitive 16) hugofs/rootmapping_fs.go:481— RootMappingFs.newUnionFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts) (nesting depth added 7). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 504, 494). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
pageState.renderResources (cognitive 16) hugolib/page.go:722— pageState.renderResources has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
contentParseInfo.contentToRender (cognitive 16) hugolib/page__content.go:223— contentParseInfo.contentToRender has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
optsHolder.isStaleOpts (cognitive 16) internal/js/esbuild/batch.go:1384— optsHolder.isStaleOpts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, loops 1 (nesting depth added 6). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 1388). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
related.DecodeConfig (cognitive 16) REDACTED:644— related.DecodeConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageConfig.init (cognitive 16) resources/images/config.go:417— ImageConfig.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ImagingConfig.init (cognitive 16) resources/images/config.go:583— ImagingConfig.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ImageProcessor.FiltersFromConfig (cognitive 16) resources/images/image.go:187— ImageProcessor.FiltersFromConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
page.isPagesProbablySorted (cognitive 16) resources/page/pages_sort_search.go:75— page.isPagesProbablySorted has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (nesting depth added 6). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 82, 97). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Namespace.Join (cognitive 16) tpl/path/path.go:126— Namespace.Join has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.Substr (cognitive 16) tpl/strings/strings.go:383— Namespace.Substr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
TemplateStore.extractInlinePartials (cognitive 16) tpl/tplimpl/templatestore.go:1050— TemplateStore.extractInlinePartials has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.Highlight (cognitive 16) tpl/transform/transform.go:112— Namespace.Highlight has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Namespace.JoinPath (cognitive 16) tpl/urls/urls.go:191— Namespace.JoinPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
absurllexer.replace (cognitive 16) transform/urlreplacers/absurlreplacer.go:205— absurllexer.replace has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
recording.record (cognitive 16) watcher/filenotify/poller.go:189— recording.record has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (10 members, 50+ identical tokens) tpl/collections/init.go:25— tpl/collections/init.go:25-219 | tpl/debug/init.go:25-75 | tpl/fmt/init.go:25-99 | tpl/images/init.go:25-53 | tpl/math/init.go:26-250 | tpl/os/init.go:25-69 | tpl/path/init.go:27-86 | tpl/strings/init.go:25-317 | tpl/transform/init.go:25-154 | tpl/urls/init.go:25-103 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) tpl/cast/init.go:25— tpl/cast/init.go:25-59 | tpl/crypto/init.go:25-77 | tpl/encoding/init.go:25-75 | tpl/hash/hash.go:58-85 | tpl/inflect/init.go:25-62 | tpl/reflect/init.go:26-53 | tpl/safe/init.go:25-84 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:65— REDACTED:65-97 | REDACTED:197-229 | REDACTED:357-389 | REDACTED:496-523 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (61 corresponding lines) · ×1
Edited copy of a member (61 corresponding lines) hugolib/roles/roles.go:134— hugolib/roles/roles.go:134-194 | hugolib/versions/versions.go:149-210 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) resources/image.go:82— resources/image.go:82-123 | resources/image.go:125-165 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×1
Edited copy of a member (37 corresponding lines) resources/images/config.go:716— resources/images/config.go:716-754 | resources/images/config.go:780-816 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 41+ corresponding lines) · ×1
Edited copies of one member (3 members, 41+ corresponding lines) markup/goldmark/render_hooks.go:124— markup/goldmark/render_hooks.go:124-181 | markup/goldmark/render_hooks.go:225-265 | markup/goldmark/render_hooks.go:448-493 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 41 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (39 corresponding lines) · ×1
Edited copy of a member (39 corresponding lines) common/loggers/handlerdefault.go:68— common/loggers/handlerdefault.go:68-106 | common/loggers/handlerterminal.go:49-93 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) REDACTED:384— REDACTED:384-419 | REDACTED:445-481 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) internal/js/esbuild/batch.go:1126— internal/js/esbuild/batch.go:1126-1178 | internal/js/esbuild/batch.go:1180-1219 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) hugolib/content_map_page.go:284— hugolib/content_map_page.go:284-304 | hugolib/content_map_page.go:306-331 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) cache/filecache/filecache.go:201— cache/filecache/filecache.go:201-235 | cache/filecache/filecache.go:288-324 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 24+ corresponding lines) · ×1
Edited copies of one member (3 members, 24+ corresponding lines) internal/js/esbuild/batch.go:980— internal/js/esbuild/batch.go:980-1005 | internal/js/esbuild/batch.go:1019-1046 | internal/js/esbuild/batch.go:1048-1071 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×1
Edited copy of a member (25 corresponding lines) hugolib/pagesfromdata/pagesfromgotmpl.go:81— hugolib/pagesfromdata/pagesfromgotmpl.go:81-111 | hugolib/pagesfromdata/pagesfromgotmpl.go:113-137 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) hugolib/sitesmatrix/vectorstores.go:125— hugolib/sitesmatrix/vectorstores.go:125-156 | hugolib/sitesmatrix/vectorstores.go:423-457 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) hugolib/doctree/simpletree.go:71— hugolib/doctree/simpletree.go:71-81 | hugolib/doctree/simpletree.go:83-92 | hugolib/doctree/simpletree.go:177-189 | hugolib/doctree/simpletree.go:191-206 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×1
Edited copy of a member (17 corresponding lines) common/predicate/predicate.go:84— common/predicate/predicate.go:84-100 | common/predicate/predicate.go:103-125 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×1
Edited copy of a member (9 corresponding lines) REDACTED:803— REDACTED:803-811 | REDACTED:813-821 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) REDACTED:773— REDACTED:773-781 | REDACTED:783-791 | REDACTED:793-801 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) hugolib/roles/roles.go:92— hugolib/roles/roles.go:92-97 | hugolib/versions/versions.go:98-103 | langs/config.go:88-93 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (29 lines × 2) REDACTED:198— REDACTED:198-226 | REDACTED:358-386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (27 lines × 2) tpl/compare/compare.go:299— tpl/compare/compare.go:299-325 | tpl/compare/compare.go:327-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (21 lines × 2) common/loggers/handlerdefault.go:72— common/loggers/handlerdefault.go:72-92 | common/loggers/handlerterminal.go:53-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (15–20 lines × 2) resources/images/meta/meta.go:244— resources/images/meta/meta.go:244-263 | resources/images/meta/meta.go:318-332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `resources/images/meta/meta.go:244` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (17–18 lines × 2) navigation/menu_cache.go:61— navigation/menu_cache.go:61-77 | resources/page/pages_cache.go:83-100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (18 lines × 2) REDACTED:229— REDACTED:229-246 | REDACTED:148-165 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:229` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (16 lines × 3) tpl/css/css.go:138— tpl/css/css.go:138-153 | tpl/css/css.go:185-200 | tpl/js/js.go:56-71 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (16 lines × 2) helpers/url.go:59— helpers/url.go:59-74 | helpers/url.go:128-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `helpers/url.go:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) hugolib/doctree/simpletree.go:95— hugolib/doctree/simpletree.go:95-106 | hugolib/doctree/simpletree.go:194-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `hugolib/doctree/simpletree.go:194` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 4) REDACTED:79— REDACTED:79-90 | REDACTED:211-222 | REDACTED:371-382 | REDACTED:501-512 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–11 lines × 2) resources/images/image.go:265— resources/images/image.go:265-275 | resources/images/image.go:283-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `resources/images/image.go:265` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 2) tpl/js/init.go:26— tpl/js/init.go:26-35 | tpl/resources/init.go:26-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `tpl/js/init.go:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 4) internal/warpc/avif.go:273— internal/warpc/avif.go:273-285 | internal/warpc/avif.go:307-319 | internal/warpc/avif.go:340-352 | internal/warpc/avif.go:358-370 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7–9 lines × 10) tpl/collections/init.go:26— tpl/collections/init.go:26-32 | tpl/debug/init.go:26-32 | tpl/fmt/init.go:26-32 | tpl/images/init.go:26-32 | tpl/math/init.go:34-40 | tpl/os/init.go:26-32 | tpl/path/init.go:28-34 | tpl/strings/init.go:26-34 | tpl/transform/init.go:26-32 | tpl/urls/init.go:26-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 10 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 10 times. Read the line range as the matched WINDOW rather than a finished unit: at `tpl/collections/init.go:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 5) internal/warpc/avif.go:292— internal/warpc/avif.go:292-300 | internal/warpc/avif.go:325-333 | internal/warpc/avif.go:374-382 | internal/warpc/avif.go:385-393 | internal/warpc/avif.go:397-405 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6–8 lines × 2) tpl/collections/merge.go:97— tpl/collections/merge.go:97-104 | REDACTED:612-617 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tpl/collections/merge.go:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 7) tpl/cast/init.go:26— tpl/cast/init.go:26-32 | tpl/crypto/init.go:26-32 | tpl/encoding/init.go:26-32 | tpl/hash/hash.go:59-65 | tpl/inflect/init.go:26-32 | tpl/reflect/init.go:27-33 | tpl/safe/init.go:26-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. Read the line range as the matched WINDOW rather than a finished unit: at `tpl/cast/init.go:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) commands/new.go:65— commands/new.go:65-70 | commands/new.go:114-119 | commands/new.go:154-159 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `commands/new.go:120` calls `Flags`, `BoolVarP` and `commands/new.go:160` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) hugolib/roles/roles.go:122— hugolib/roles/roles.go:122-130 | hugolib/versions/versions.go:137-145 | langs/config.go:122-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (11 lines × 2) resources/image.go:113— resources/image.go:113-123 | resources/image.go:155-165 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `resources/image.go:113` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Outbound HTTP without resilience livereload/gen/main.go:26— `http.Get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Complex function readInput (cyclomatic 11, cognitive 25) internal/warpc/js/common.js:18— readInput has cyclomatic complexity 11 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
No test or typecheck script — test ✗ · lint ✓ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Dead file (~61 LoC) common/hexec/esmloader.mjs— no import path from any entry point (3 application, 0 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~44 LoC) livereload/gen/livereload-hugo-plugin.js— no import path from any entry point (3 application, 0 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Third-party script without Subresource Integrity tpl/tplimpl/embedded/templates/_shortcodes/instagram.html:243— `https://www.instagram.com/embed.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository.
Duplicated predicate REDACTED:701— `!unicode.IsLetter(r) && !unicode.IsDigit(r)` appears character-identically in 2 files — REDACTED, tpl/internal/go_templates/texttemplate/funcs.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tpl/internal/go_templates/htmltemplate/escape.go:756— `c.state == stateText || c.state == stateRCDATA` appears character-identically in 2 files — tpl/internal/go_templates/htmltemplate/escape.go, tpl/internal/go_templates/htmltemplate/html.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tpl/internal/go_templates/testenv/testenv_notunix.go:20— `errors.Is(err, fs.ErrPermission) || errors.Is(err, errors.ErrUnsupported)` appears character-identically in 2 files — tpl/internal/go_templates/testenv/testenv_notunix.go, tpl/internal/go_templates/testenv/testenv_unix.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tpl/internal/go_templates/texttemplate/exec.go:802— `isBuiltin && (name == "and" || name == "or")` appears character-identically in 2 files — tpl/internal/go_templates/texttemplate/exec.go, tpl/internal/go_templates/texttemplate/hugo_template.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tpl/internal/go_templates/texttemplate/exec.go:701— `ptr.Kind() != reflect.Interface && ptr.Kind() != reflect.Pointer && ptr.CanAddr()` appears character-identically in 2 files — tpl/internal/go_templates/texttemplate/exec.go, tpl/internal/go_templates/texttemplate/hugo_template.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate markup/goldmark/autoid.go:88— `r == '_' || unicode.IsLetter(r) || unicode.IsDigit(r)` appears character-identically in 3 files — markup/goldmark/autoid.go, parser/pageparser/pagelexer.go, tpl/internal/go_templates/texttemplate/parse/lex.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tpl/internal/go_templates/texttemplate/exec.go:691— `receiver.Kind() == reflect.Interface && isNil` appears character-identically in 2 files — tpl/internal/go_templates/texttemplate/exec.go, tpl/internal/go_templates/texttemplate/hugo_template.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tpl/internal/go_templates/texttemplate/exec.go:925— `reflect.PointerTo(value.Type()).AssignableTo(typ) && value.CanAddr()` appears character-identically in 2 files — tpl/internal/go_templates/texttemplate/exec.go, tpl/internal/go_templates/texttemplate/hugo_template.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate hugolib/content_map_page.go:522— `s != ownerKey && strings.HasPrefix(s, ownerKey)` appears character-identically in 2 files — hugolib/content_map_page.go, hugolib/content_map_page_assembler.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate hugolib/alias.go:116— `s.conf.RelativeURLs || s.conf.CanonifyURLs` appears character-identically in 2 files — hugolib/alias.go, hugolib/site.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tpl/internal/go_templates/texttemplate/exec.go:907— `typ != nil && !value.Type().AssignableTo(typ)` appears character-identically in 2 files — tpl/internal/go_templates/texttemplate/exec.go, tpl/internal/go_templates/texttemplate/hugo_template.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tpl/internal/go_templates/texttemplate/exec.go:904— `typ == reflectValueType && value.Type() != typ` appears character-identically in 2 files — tpl/internal/go_templates/texttemplate/exec.go, tpl/internal/go_templates/texttemplate/hugo_template.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tpl/internal/go_templates/texttemplate/exec.go:908— `value.Kind() == reflect.Interface && !value.IsNil()` appears character-identically in 2 files — tpl/internal/go_templates/texttemplate/exec.go, tpl/internal/go_templates/texttemplate/hugo_template.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tpl/internal/go_templates/texttemplate/exec.go:920— `value.Kind() == reflect.Pointer && value.Type().Elem().AssignableTo(typ)` appears character-identically in 2 files — tpl/internal/go_templates/texttemplate/exec.go, tpl/internal/go_templates/texttemplate/hugo_template.go. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Silent fallback default on error REDACTED:113— `MD5FromReaderHexEncoded` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error common/hexec/exec.go:407— `extractNodeEntryPoint` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error common/version/version.go:285— `goMinorVersion` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error REDACTED:191— `extractMinorVersionFromGoTag` turns a non-nil `err` into `return -1` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error resources/page/page_paths.go:110— `PermalinkForOutputFormat` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Silent fallback default on error resources/page/permalinks.go:379— `pageToPermalinkSlugOrContentBaseName` turns a non-nil `err` into `return "", nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the `if` or in the doc comment, and the row stops firing.
Hand-rolled JSON/XML parsing via regex resources/page/page_markup.go:326— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Go code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex resources/page/page_markup.go:332— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Go code already uses a real parser in the same package; use it here too.
Hand-rolled JSON/XML parsing via regex markup/goldmark/blockquotes/blockquotes.go:173— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Go code already uses a real parser in the same package; use it here too.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 106 significant file(s) lose their only recent owner: tpl/internal/go_templates/texttemplate/exec.go, tpl/internal/go_templates/htmltemplate/escape.go, REDACTED, hugolib/filesystems/basefs.go, hugolib/page.go, hugolib/sitesmatrix/vectorstores.go, tpl/internal/go_templates/texttemplate/hugo_template.go, REDACTED (+98 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 4 significant file(s) lose their only recent owner: tpl/strings/strings.go, markup/asciidocext/internal/converter.go, tpl/strings/init.go, markup/pandoc/convert.go. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (114 single-owned of 342 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 342 of the 500 production source files in this repository met that bar). They are anonymized user #3 (2 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: metrics/metrics.go, REDACTED, hugofs/glob.go, tpl/strings/regexp.go.
No ADRs found magefile.go:3— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `magefile.go` makes this repository a deployable product (line 3).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 3 project(s) overshoot their size bounds, lowering Project Cohesion to 3.3/10. The most over is `(repository root)` (113088 LoC, 968 module-visible types across 187 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 1 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: resources/images/text.go (2 orphaned of 343 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 343 of the 500 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
Orphaned file resources/images/text.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling· Dependabot does not watch github-actions/npm/gitsubmodule · ×1
Dependabot does not watch github-actions/npm/gitsubmodule REDACTED:3— `REDACTED` schedules updates, but no `package-ecosystem` entry covers `github-actions`, `npm`, `gitsubmodule`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
No security response headers detected docs/netlify.toml:1— None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `netlify.toml` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
Outdated: github.com/aws/aws-sdk-go-v2 — `github.com/aws/aws-sdk-go-v2` is required at v1.41.6 in REDACTED, but v1.48.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2@v1.48.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/cloudfront — `github.com/aws/aws-sdk-go-v2/service/cloudfront` is required at v1.61.1 in REDACTED, but v1.75.6 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/service/cloudfront@v1.75.6 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/bep/debounce — `github.com/bep/debounce` is required at v1.2.0 in REDACTED, but v1.2.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/bep/debounce@v1.2.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/bep/golocales — `github.com/bep/golocales` is required at v0.2.0 in REDACTED, but v0.3.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/bep/golocales@v0.3.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/bep/simplecobra — `github.com/bep/simplecobra` is required at v0.7.0 in REDACTED, but v0.8.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/bep/simplecobra@v0.8.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/fatih/color — `github.com/fatih/color` is required at v1.18.0 in REDACTED, but v1.19.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/fatih/color@v1.19.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/gohugoio/hashstructure — `github.com/gohugoio/hashstructure` is required at v1.0.0 in REDACTED, but v1.1.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/gohugoio/hashstructure@v1.1.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/hairyhenderson/go-codeowners — `github.com/hairyhenderson/go-codeowners` is required at v0.7.0 in REDACTED, but v0.7.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/hairyhenderson/go-codeowners@v0.7.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: go.uber.org/automaxprocs — `go.uber.org/automaxprocs` is required at v1.5.3 in REDACTED, but v1.6.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get go.uber.org/automaxprocs@v1.6.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: gocloud.dev — `gocloud.dev` is required at v0.45.0 in REDACTED, but v0.49.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get gocloud.dev@v0.49.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/image — `golang.org/x/image` is required at v0.47.0 in REDACTED, but v0.48.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/image@v0.48.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/mod — `golang.org/x/mod` is required at v0.42.0 in REDACTED, but v0.43.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/mod@v0.43.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: google.golang.org/api — `google.golang.org/api` is required at v0.276.0 in REDACTED, but v0.314.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get google.golang.org/api@v0.314.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 5 file(s) — `common/hmaps/maps.go`, `common/types/types.go`, `hugolib/doctree/simpletree.go`, `internal/warpc/js/renderkatex.bundle.js`, `tpl/collections/querify.go` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1d49a-4742-7ccb-b8af-94db8e1e04b0 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 16 · Warnings: 927 · Recommendations: 40 · Info: 13 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 13-11-2026 @ 11:10 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.