Public report of caddyserver/caddy, published 23 October 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.10.5). Watchdog 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, 23 October 2026, 22:21 UTC · Survey ID cd_49232169b29249898cb19a0e7ce77d5c
caddyserver/caddy
Measured 23 October 2026, 22:12 UTC, at code version 2b47a18
No regression since the last survey
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Up 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 medium codebase: 66,510 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.9 person-years · Weakest lens: Accessibility, 33
Findings by how serious they are
39 critical731 serious73 minor
27 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
23 October 2026, 22:12 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 Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸
55of 58 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
807of 843 findings point to an exact file and line, so you can open each one in the code. The other 36 concern the repository as a whole, such as missing documentation.
58dimensions across 7 lenses, read from 66,510 lines of product code in 1 project.
caddyserver/caddy scores 51 out of 100 and is rated Adequate, while three of its seven lenses score higher still: Performance at 78 rated Strong, Architecture at 89 rated Adequate, and Security and Compliance at 76 rated Adequate.
The score is lower than those three because the weakest lens counts most, and here that is Accessibility, which scores 33 and is rated Weak. The project has no text alternatives for images or video and no keyboard semantics for custom controls, so its Text alternatives and Keyboard semantics dimensions both score 1 out of 10, and until those reach 4, Accessibility can't be rated higher than Adequate. Adding text alternatives to images, svg, canvas, and video, and making custom controls keyboard-operable are therefore the first actions, and if Accessibility rose to 70, the score would rise from 51 to about 65.
Thirty-nine findings are critical: nine links with no accessible name, six secrets in the code's history, four shell injection risks in static analysis, three leaked secrets in secret scanning, three unpinned package installs, three untrusted context laundered through step output, two github script injections, one image without a text alternative, one input without a programmatic label, one html without a lang attribute, one missing dependabot cooldown, one backtick-only escape, one fixed delimiter untrusted workflow output, one insecure skip verify in go, one optional mac key in go, and one boundary-crossing change coupling.
Watchdog couldn't measure code coverage because the test suite is not readable by the collector, internal api consistency because no csharp or vb projects were loaded, navigability because too few call sites were resolved for the go language, and data protection, access controls, audit trail, data retention, and data-subject rights because the source model for these controls was not loaded for this repository. The product code is 66,510 lines, which would take an estimated 0.9 person-years, around €130,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.
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/server.go
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/fileserver/matcher.go
Exception handling · Swallowed exception (caught, then discarded) REDACTED
Watchdog compares 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: 18 findings
These 18 critical or serious findings were in the previous survey, on 9 October 2026, and are gone from this one.
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/reverseproxy/reverseproxy.go
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/reverseproxy/reverseproxy.go
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/reverseproxy/healthchecks.go
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/reverseproxy/addresses.go
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/rewrite/rewrite.go
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/templates/tplcontext.go
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/templates/frontmatter_fuzz.go
Exception handling · Swallowed exception (caught, then discarded) REDACTED
Exception handling · Swallowed exception (caught, then discarded) REDACTED
Exception handling · Swallowed exception (caught, then discarded) REDACTED
Exception handling · Swallowed exception (caught, then discarded) REDACTED
Exception handling · Swallowed exception (caught, then discarded) modules/logging/filters.go
Exception handling · Swallowed exception (caught, then discarded) modules/logging/filters.go
Rebuild cost: about €130,000 · Estimate
Cost to rebuild
€43,000 to €220,000, for 723 to 2,292 hours of work, about 0.9 person-years for 1 to 2 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 51. 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
Medium: 66,510 lines of product code
How the estimate is made: Watchdog prices 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
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Raises the score by about 6 points · Medium effort · Text alternatives
2
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
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 €130,000 to build again, about 0.9 person-years of work. Its weakest lens is Accessibility, at 33 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for medium effort. 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 5.7 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 6% to 13% on every change. The history of the code shows how much it changes: about 33,810 lines over the last 90 days, which is about 137,118 lines a year. At that pace, the extra work comes to an estimated 19.6 to 117.4 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 Watchdog's 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; 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.
47 modules, with 128 dependencies between them. One loop runs through 12 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 7 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/caddyserver/caddy/v2/caddyconfig uses com/caddyserver/caddy/v2/caddyconfig/warning, so a change to com/caddyserver/caddy/v2/caddyconfig/warning can break com/caddyserver/caddy/v2/caddyconfig, while a change to com/caddyserver/caddy/v2/caddyconfig can't break com/caddyserver/caddy/v2/caddyconfig/warning.
Position
Below the diagonal: com/caddyserver/caddy/v2/caddyconfig uses a module listed above it, which is the healthy direction.
2→14 com/caddyserver/caddy/v2/caddyconfig uses com/caddyserver/caddy/v2part of a loop✕
Connections
8 pairs of types, where a type in com/caddyserver/caddy/v2/caddyconfig uses a type in com/caddyserver/caddy/v2.
com/caddyserver/caddy/v2/caddyconfig uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/caddyconfig, while a change to com/caddyserver/caddy/v2/caddyconfig can't break com/caddyserver/caddy/v2.
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.
3→14 com/caddyserver/caddy/v2/modules/caddyevents uses com/caddyserver/caddy/v2part of a loop✕
Connections
8 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyevents uses a type in com/caddyserver/caddy/v2.
com/caddyserver/caddy/v2/modules/caddyevents uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyevents, while a change to com/caddyserver/caddy/v2/modules/caddyevents can't break com/caddyserver/caddy/v2.
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/caddyserver/caddy/v2/caddyconfig/caddyfile uses com/caddyserver/caddy/v2/caddyconfig/warning, so a change to com/caddyserver/caddy/v2/caddyconfig/warning can break com/caddyserver/caddy/v2/caddyconfig/caddyfile, while a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can't break com/caddyserver/caddy/v2/caddyconfig/warning.
Position
Below the diagonal: com/caddyserver/caddy/v2/caddyconfig/caddyfile uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/caddyconfig/caddyfile uses com/caddyserver/caddy/v2/caddyconfig, so a change to com/caddyserver/caddy/v2/caddyconfig can break com/caddyserver/caddy/v2/caddyconfig/caddyfile, while a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can't break com/caddyserver/caddy/v2/caddyconfig.
Position
Below the diagonal: com/caddyserver/caddy/v2/caddyconfig/caddyfile uses a module listed above it, which is the healthy direction.
4→14 com/caddyserver/caddy/v2/caddyconfig/caddyfile uses com/caddyserver/caddy/v2part of a loop✕
Connections
2 pairs of types, where a type in com/caddyserver/caddy/v2/caddyconfig/caddyfile uses a type in com/caddyserver/caddy/v2.
com/caddyserver/caddy/v2/caddyconfig/caddyfile uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/caddyconfig/caddyfile, while a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can't break com/caddyserver/caddy/v2.
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/caddyserver/caddy/v2/cmd uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/cmd, while a change to com/caddyserver/caddy/v2/cmd can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/cmd uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyevents/eventsconfig uses a type in com/caddyserver/caddy/v2/caddyconfig/caddyfile.
com/caddyserver/caddy/v2/modules/caddyevents/eventsconfig uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyevents/eventsconfig, while a change to com/caddyserver/caddy/v2/modules/caddyevents/eventsconfig can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyevents/eventsconfig uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddypki uses com/caddyserver/caddy/v2/cmd, so a change to com/caddyserver/caddy/v2/cmd can break com/caddyserver/caddy/v2/modules/caddypki, while a change to com/caddyserver/caddy/v2/modules/caddypki can't break com/caddyserver/caddy/v2/cmd.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddypki uses a module listed above it, which is the healthy direction.
7→14 com/caddyserver/caddy/v2/modules/caddypki uses com/caddyserver/caddy/v2part of a loop✕
Connections
12 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddypki uses a type in com/caddyserver/caddy/v2.
com/caddyserver/caddy/v2/modules/caddypki uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddypki, while a change to com/caddyserver/caddy/v2/modules/caddypki can't break com/caddyserver/caddy/v2.
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/caddyserver/caddy/v2/modules/caddytls uses com/caddyserver/caddy/v2/modules/caddyevents, so a change to com/caddyserver/caddy/v2/modules/caddyevents can break com/caddyserver/caddy/v2/modules/caddytls, while a change to com/caddyserver/caddy/v2/modules/caddytls can't break com/caddyserver/caddy/v2/modules/caddyevents.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddytls uses a module listed above it, which is the healthy direction.
50 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddytls uses a type in com/caddyserver/caddy/v2/caddyconfig/caddyfile. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/caddyserver/caddy/v2/modules/caddytls uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddytls, while a change to com/caddyserver/caddy/v2/modules/caddytls can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddytls uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddytls uses com/caddyserver/caddy/v2/modules/caddypki, so a change to com/caddyserver/caddy/v2/modules/caddypki can break com/caddyserver/caddy/v2/modules/caddytls, while a change to com/caddyserver/caddy/v2/modules/caddytls can't break com/caddyserver/caddy/v2/modules/caddypki.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddytls uses a module listed above it, which is the healthy direction.
8→14 com/caddyserver/caddy/v2/modules/caddytls uses com/caddyserver/caddy/v2part of a loop✕
Connections
120 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddytls uses a type in com/caddyserver/caddy/v2. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/caddyserver/caddy/v2/modules/caddytls uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddytls, while a change to com/caddyserver/caddy/v2/modules/caddytls can't break com/caddyserver/caddy/v2.
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/caddyserver/caddy/v2/modules/caddyhttp uses com/caddyserver/caddy/v2/modules/caddyevents, so a change to com/caddyserver/caddy/v2/modules/caddyevents can break com/caddyserver/caddy/v2/modules/caddyhttp, while a change to com/caddyserver/caddy/v2/modules/caddyhttp can't break com/caddyserver/caddy/v2/modules/caddyevents.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp uses a module listed above it, which is the healthy direction.
43 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp uses a type in com/caddyserver/caddy/v2/caddyconfig/caddyfile. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/caddyserver/caddy/v2/modules/caddyhttp uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp, while a change to com/caddyserver/caddy/v2/modules/caddyhttp can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp uses com/caddyserver/caddy/v2/cmd, so a change to com/caddyserver/caddy/v2/cmd can break com/caddyserver/caddy/v2/modules/caddyhttp, while a change to com/caddyserver/caddy/v2/modules/caddyhttp can't break com/caddyserver/caddy/v2/cmd.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp uses com/caddyserver/caddy/v2/modules/caddytls, so a change to com/caddyserver/caddy/v2/modules/caddytls can break com/caddyserver/caddy/v2/modules/caddyhttp, while a change to com/caddyserver/caddy/v2/modules/caddyhttp can't break com/caddyserver/caddy/v2/modules/caddytls.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp uses a module listed above it, which is the healthy direction.
9→13 com/caddyserver/caddy/v2/modules/caddyhttp uses com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxypart of a loop✕
Connections
3 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
com/caddyserver/caddy/v2/modules/caddyhttp uses com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can break com/caddyserver/caddy/v2/modules/caddyhttp, while a change to com/caddyserver/caddy/v2/modules/caddyhttp can't break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
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.
9→14 com/caddyserver/caddy/v2/modules/caddyhttp uses com/caddyserver/caddy/v2part of a loop✕
Connections
83 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp uses a type in com/caddyserver/caddy/v2. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/caddyserver/caddy/v2/modules/caddyhttp uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp, while a change to com/caddyserver/caddy/v2/modules/caddyhttp can't break com/caddyserver/caddy/v2.
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/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses com/caddyserver/caddy/v2/caddyconfig/warning, so a change to com/caddyserver/caddy/v2/caddyconfig/warning can break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, while a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can't break com/caddyserver/caddy/v2/caddyconfig/warning.
Position
Below the diagonal: com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, while a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses com/caddyserver/caddy/v2/modules/caddypki, so a change to com/caddyserver/caddy/v2/modules/caddypki can break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, while a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can't break com/caddyserver/caddy/v2/modules/caddypki.
Position
Below the diagonal: com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses com/caddyserver/caddy/v2/modules/caddytls, so a change to com/caddyserver/caddy/v2/modules/caddytls can break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, while a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can't break com/caddyserver/caddy/v2/modules/caddytls.
Position
Below the diagonal: com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, while a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses a module listed above it, which is the healthy direction.
10→14 com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses com/caddyserver/caddy/v2part of a loop✕
Connections
7 pairs of types, where a type in com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses a type in com/caddyserver/caddy/v2.
com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, while a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can't break com/caddyserver/caddy/v2.
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/caddyserver/caddy/v2/modules/caddyhttp/headers uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/headers, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/headers can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/headers uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/headers uses a type in com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/headers uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/headers, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/headers can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/headers uses a module listed above it, which is the healthy direction.
11→13 com/caddyserver/caddy/v2/modules/caddyhttp/headers uses com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxypart of a loop✕
Connections
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/headers uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
com/caddyserver/caddy/v2/modules/caddyhttp/headers uses com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can break com/caddyserver/caddy/v2/modules/caddyhttp/headers, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/headers can't break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
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.
11→14 com/caddyserver/caddy/v2/modules/caddyhttp/headers uses com/caddyserver/caddy/v2part of a loop✕
Connections
6 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/headers uses a type in com/caddyserver/caddy/v2.
com/caddyserver/caddy/v2/modules/caddyhttp/headers uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/headers, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/headers can't break com/caddyserver/caddy/v2.
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/caddyserver/caddy/v2/modules/caddyhttp/rewrite uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/rewrite, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/rewrite can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/rewrite uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/rewrite uses a type in com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/rewrite uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/rewrite, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/rewrite can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/rewrite uses a module listed above it, which is the healthy direction.
12→14 com/caddyserver/caddy/v2/modules/caddyhttp/rewrite uses com/caddyserver/caddy/v2part of a loop✕
Connections
8 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/rewrite uses a type in com/caddyserver/caddy/v2.
com/caddyserver/caddy/v2/modules/caddyhttp/rewrite uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/rewrite, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/rewrite can't break com/caddyserver/caddy/v2.
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/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses com/caddyserver/caddy/v2/modules/caddyevents, so a change to com/caddyserver/caddy/v2/modules/caddyevents can break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can't break com/caddyserver/caddy/v2/modules/caddyevents.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses a type in com/caddyserver/caddy/v2/caddyconfig/caddyfile. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses com/caddyserver/caddy/v2/cmd, so a change to com/caddyserver/caddy/v2/cmd can break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can't break com/caddyserver/caddy/v2/cmd.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses a type in com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses a module listed above it, which is the healthy direction.
4 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/headers.
com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses com/caddyserver/caddy/v2/modules/caddyhttp/headers, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/headers can break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can't break com/caddyserver/caddy/v2/modules/caddyhttp/headers.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/rewrite.
com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses com/caddyserver/caddy/v2/modules/caddyhttp/rewrite, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/rewrite can break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can't break com/caddyserver/caddy/v2/modules/caddyhttp/rewrite.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses a module listed above it, which is the healthy direction.
13→14 com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses com/caddyserver/caddy/v2part of a loop✕
Connections
66 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses a type in com/caddyserver/caddy/v2. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can't break com/caddyserver/caddy/v2.
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/caddyserver/caddy/v2 uses com/caddyserver/caddy/v2/caddyconfig/warning, so a change to com/caddyserver/caddy/v2/caddyconfig/warning can break com/caddyserver/caddy/v2, while a change to com/caddyserver/caddy/v2 can't break com/caddyserver/caddy/v2/caddyconfig/warning.
Position
Below the diagonal: com/caddyserver/caddy/v2 uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2 uses com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can break com/caddyserver/caddy/v2, while a change to com/caddyserver/caddy/v2 can't break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
Position
Below the diagonal: com/caddyserver/caddy/v2 uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/internal/filesystems uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/internal/filesystems, while a change to com/caddyserver/caddy/v2/internal/filesystems can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/internal/filesystems uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/internal/testmocks uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/internal/testmocks, while a change to com/caddyserver/caddy/v2/internal/testmocks can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/internal/testmocks uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/internal/testmocks uses com/caddyserver/caddy/v2/modules/caddytls, so a change to com/caddyserver/caddy/v2/modules/caddytls can break com/caddyserver/caddy/v2/internal/testmocks, while a change to com/caddyserver/caddy/v2/internal/testmocks can't break com/caddyserver/caddy/v2/modules/caddytls.
Position
Below the diagonal: com/caddyserver/caddy/v2/internal/testmocks uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/internal/testmocks uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/internal/testmocks, while a change to com/caddyserver/caddy/v2/internal/testmocks can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/internal/testmocks uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyfs uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyfs, while a change to com/caddyserver/caddy/v2/modules/caddyfs can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyfs uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyfs uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyfs, while a change to com/caddyserver/caddy/v2/modules/caddyfs can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyfs uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth uses com/caddyserver/caddy/v2/cmd, so a change to com/caddyserver/caddy/v2/cmd can break com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth can't break com/caddyserver/caddy/v2/cmd.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth uses a type in com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth uses com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can break com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth can't break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/caddyauth uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/encode uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/encode, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/encode uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/encode, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/encode uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/encode, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/encode uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
com/caddyserver/caddy/v2/modules/caddyhttp/encode uses com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can break com/caddyserver/caddy/v2/modules/caddyhttp/encode, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode can't break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/encode uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/encode, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/intercept uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/intercept, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/intercept can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/intercept uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/intercept uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/intercept, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/intercept can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/intercept uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/intercept uses a type in com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/intercept uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/intercept, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/intercept can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/intercept uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/intercept uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
com/caddyserver/caddy/v2/modules/caddyhttp/intercept uses com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can break com/caddyserver/caddy/v2/modules/caddyhttp/intercept, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/intercept can't break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/intercept uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/intercept uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/intercept, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/intercept can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/intercept uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/logging uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/logging, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/logging can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/logging uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/logging uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/logging, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/logging can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/logging uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/logging uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/logging, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/logging can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/logging uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/logging uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/logging, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/logging can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/logging uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/map uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/map, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/map can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/map uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/map uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/map, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/map can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/map uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/map uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/map, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/map can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/map uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/proxyprotocol uses a type in com/caddyserver/caddy/v2/caddyconfig/caddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/proxyprotocol uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/proxyprotocol, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/proxyprotocol can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/proxyprotocol uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/proxyprotocol uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/proxyprotocol, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/proxyprotocol can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/proxyprotocol uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/push uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/push, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/push can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/push uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/push uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/push, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/push can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/push uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/push uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
com/caddyserver/caddy/v2/modules/caddyhttp/push uses com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can break com/caddyserver/caddy/v2/modules/caddyhttp/push, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/push can't break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/push uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/push uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/push, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/push can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/push uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/requestbody uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/requestbody, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/requestbody can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/requestbody uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/requestbody uses a type in com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/requestbody uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/requestbody, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/requestbody can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/requestbody uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/requestbody uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/requestbody, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/requestbody can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/requestbody uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi uses a type in com/caddyserver/caddy/v2/caddyconfig/caddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi uses a type in com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi uses com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi can't break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/templates uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/templates, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/templates can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/templates uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/templates uses a type in com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/templates uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/templates, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/templates can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/templates uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/templates uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
com/caddyserver/caddy/v2/modules/caddyhttp/templates uses com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can break com/caddyserver/caddy/v2/modules/caddyhttp/templates, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/templates can't break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/templates uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/templates uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/templates, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/templates can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/templates uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/timeouts uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/timeouts, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/timeouts can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/timeouts uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/timeouts uses a type in com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/timeouts uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/timeouts, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/timeouts can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/timeouts uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/timeouts uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/timeouts, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/timeouts can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/timeouts uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/tracing uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/tracing, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/tracing can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/tracing uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/tracing uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/tracing, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/tracing can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/tracing uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/tracing uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/tracing, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/tracing can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/tracing uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/tracing uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/tracing, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/tracing can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/tracing uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddypki/acmeserver uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddypki/acmeserver, while a change to com/caddyserver/caddy/v2/modules/caddypki/acmeserver can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddypki/acmeserver uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddypki/acmeserver uses a type in com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
com/caddyserver/caddy/v2/modules/caddypki/acmeserver uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddypki/acmeserver, while a change to com/caddyserver/caddy/v2/modules/caddypki/acmeserver can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddypki/acmeserver uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddypki/acmeserver uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddypki/acmeserver, while a change to com/caddyserver/caddy/v2/modules/caddypki/acmeserver can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddypki/acmeserver uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddytls/distributedstek uses com/caddyserver/caddy/v2/modules/caddytls, so a change to com/caddyserver/caddy/v2/modules/caddytls can break com/caddyserver/caddy/v2/modules/caddytls/distributedstek, while a change to com/caddyserver/caddy/v2/modules/caddytls/distributedstek can't break com/caddyserver/caddy/v2/modules/caddytls.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddytls/distributedstek uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddytls/distributedstek uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddytls/distributedstek, while a change to com/caddyserver/caddy/v2/modules/caddytls/distributedstek can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddytls/distributedstek uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddytls/standardstek uses com/caddyserver/caddy/v2/modules/caddytls, so a change to com/caddyserver/caddy/v2/modules/caddytls can break com/caddyserver/caddy/v2/modules/caddytls/standardstek, while a change to com/caddyserver/caddy/v2/modules/caddytls/standardstek can't break com/caddyserver/caddy/v2/modules/caddytls.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddytls/standardstek uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddytls/standardstek uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddytls/standardstek, while a change to com/caddyserver/caddy/v2/modules/caddytls/standardstek can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddytls/standardstek uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/filestorage uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/filestorage, while a change to com/caddyserver/caddy/v2/modules/filestorage can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/filestorage uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/filestorage uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/filestorage, while a change to com/caddyserver/caddy/v2/modules/filestorage can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/filestorage uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/internal/network uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/internal/network, while a change to com/caddyserver/caddy/v2/modules/internal/network can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/internal/network uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/internal/network uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/internal/network, while a change to com/caddyserver/caddy/v2/modules/internal/network can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/internal/network uses a module listed above it, which is the healthy direction.
37 pairs of types, where a type in com/caddyserver/caddy/v2/modules/logging uses a type in com/caddyserver/caddy/v2/caddyconfig/caddyfile. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/caddyserver/caddy/v2/modules/logging uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/logging, while a change to com/caddyserver/caddy/v2/modules/logging can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/logging uses a module listed above it, which is the healthy direction.
49 pairs of types, where a type in com/caddyserver/caddy/v2/modules/logging uses a type in com/caddyserver/caddy/v2. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/caddyserver/caddy/v2/modules/logging uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/logging, while a change to com/caddyserver/caddy/v2/modules/logging can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/logging uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/metrics uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/metrics, while a change to com/caddyserver/caddy/v2/modules/metrics can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/metrics uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/metrics uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/metrics, while a change to com/caddyserver/caddy/v2/modules/metrics can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/metrics uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/metrics uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/metrics, while a change to com/caddyserver/caddy/v2/modules/metrics can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/metrics uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/metrics uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/metrics, while a change to com/caddyserver/caddy/v2/modules/metrics can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/metrics uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/encode.
com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli uses com/caddyserver/caddy/v2/modules/caddyhttp/encode, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode can break com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli can't break com/caddyserver/caddy/v2/modules/caddyhttp/encode.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode/brotli uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip uses a type in com/caddyserver/caddy/v2/caddyconfig/caddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip uses a module listed above it, which is the healthy direction.
4 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/encode.
com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip uses com/caddyserver/caddy/v2/modules/caddyhttp/encode, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode can break com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip can't break com/caddyserver/caddy/v2/modules/caddyhttp/encode.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd uses a type in com/caddyserver/caddy/v2/caddyconfig/caddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd uses a module listed above it, which is the healthy direction.
4 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/encode.
com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd uses com/caddyserver/caddy/v2/modules/caddyhttp/encode, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode can break com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd can't break com/caddyserver/caddy/v2/modules/caddyhttp/encode.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses com/caddyserver/caddy/v2/caddyconfig/caddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/caddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/fileserver, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/fileserver can't break com/caddyserver/caddy/v2/caddyconfig/caddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses com/caddyserver/caddy/v2/cmd, so a change to com/caddyserver/caddy/v2/cmd can break com/caddyserver/caddy/v2/modules/caddyhttp/fileserver, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/fileserver can't break com/caddyserver/caddy/v2/cmd.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses com/caddyserver/caddy/v2/modules/caddyhttp, so a change to com/caddyserver/caddy/v2/modules/caddyhttp can break com/caddyserver/caddy/v2/modules/caddyhttp/fileserver, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/fileserver can't break com/caddyserver/caddy/v2/modules/caddyhttp.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses a type in com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile, so a change to com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile can break com/caddyserver/caddy/v2/modules/caddyhttp/fileserver, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/fileserver can't break com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy can break com/caddyserver/caddy/v2/modules/caddyhttp/fileserver, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/fileserver can't break com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses a module listed above it, which is the healthy direction.
com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses com/caddyserver/caddy/v2, so a change to com/caddyserver/caddy/v2 can break com/caddyserver/caddy/v2/modules/caddyhttp/fileserver, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/fileserver can't break com/caddyserver/caddy/v2.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses a type in com/caddyserver/caddy/v2/modules/caddyhttp/encode.
com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses com/caddyserver/caddy/v2/modules/caddyhttp/encode, so a change to com/caddyserver/caddy/v2/modules/caddyhttp/encode can break com/caddyserver/caddy/v2/modules/caddyhttp/fileserver, while a change to com/caddyserver/caddy/v2/modules/caddyhttp/fileserver can't break com/caddyserver/caddy/v2/modules/caddyhttp/encode.
Position
Below the diagonal: com/caddyserver/caddy/v2/modules/caddyhttp/fileserver uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 69% · Adequate · gated by D1, D2 ·
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
71
High / Critical
A07:2025 — Authentication Failures
10
High / Critical
A03:2025 — Software Supply Chain Failures
5
Medium
Roadmap
Begin by adding descriptive text alternatives to all media elements and ensuring custom controls are fully keyboard-operable with proper semantic roles. Next, provide explicit programmatic labels for every form control and button to replace placeholders, and immediately resolve the three identified secret leaks in the codebase. Finally, integrate automated accessibility checks into the existing test suite and CI pipeline to enforce these standards and prevent future regressions.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
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 — 39
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 — 731
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 — 73
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 27
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
Watchdog 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. 55 of 58 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 58 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, 807 of 843 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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 — Watchdog 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 READ here — but this repository measures it: a coverage step in CI (`go test -coverprofile`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.go), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored. To have the real number read, produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D22 Internal API Consistency — not measured this run — Watchdog 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.
D27 Navigability — not measured this run — Watchdog 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
AX6 Interface segregation — not measured this run — Watchdog 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 — Watchdog 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 ToolchainServer (.). `go` is not on PATH — this repository boots from its toolchain's own run entry point ('github.com/go-chi/chi' required by REDACTED, and cmd/caddy is the module's only package main), so the tier cannot start it without that toolchain No runtime accessibility evidence was produced for this scan. This is a statement about THIS RUN's environment, not about the application: nothing here says the app is inaccessible, only that it was never rendered.
C1 Data Protection — not measured this run — Watchdog 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 — Watchdog 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 — Watchdog 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 — Watchdog 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 — Watchdog 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.
GD1 Unfinished & placeholder code — not measured this run — Watchdog 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 no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's 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.
IC1 Incompleteness & stubs — not measured this run — Watchdog 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 no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's 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.
X1 Async correctness — not measured this run — Watchdog 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, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, 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.
X12 Unreachable branch — not measured this run — Watchdog 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, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
X13 Undrained process stream — not measured this run — Watchdog 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, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
X16 Unfloored truncation loop — not measured this run — Watchdog 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, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog 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, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
X18 Disposal-pattern correctness — not measured this run — Watchdog 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, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, 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.
X19 Unrestored process-global state — not measured this run — Watchdog 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, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP was found in this repository, 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.
X22 Contradicted release guard — not measured this run — Watchdog 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, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's 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.
X23 Unguarded diagnostic materialisation — not measured this run — Watchdog 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, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found in this repository, 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.
X24 Document value interpolated into markup unescaped — not measured this run — Watchdog 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, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, 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.
X25 Inert configuration knob — not measured this run — Watchdog 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, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby was found in this repository, 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 — Watchdog 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 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 — Watchdog 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, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 13 further occurrence(s) are not listed individually; the score already reflects all 53.
X4 Structured logging — not measured this run — Watchdog 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 no JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala or Rust was found in this repository, 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 (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
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.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
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.
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.
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 Dockerfile (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.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
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.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
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.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
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.
The LLM boundary
LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
130 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Handler.UnmarshalCaddyfile at 255. A further 2 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 caddy.ToString at 18 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: REDACTED (caddy.RegisterNetwork at 16). 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.
+ 125 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 15 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with Handler.UnmarshalCaddyfile (cyclomatic 255), ServerType.serversFromPairings (cyclomatic 131), ServerType.buildTLSApp (cyclomatic 124). — 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 15 together lifts Cyclomatic Complexity from 2.0 to about 4.3/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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.
+ 211 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 216 bodies over 15 down to 15 or less in Cognitive Complexity — start with Handler.UnmarshalCaddyfile (cognitive 559), ServerType.serversFromPairings (cognitive 356), ServerType.buildTLSApp (cognitive 311). — 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 216 together lifts Cognitive Complexity from 2.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.5 / 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 20 MethodTooLong finding(s) in God Classes — start with caddyfile.go (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (20 warning-level).
Resolve the 16 FileTooLong finding(s) in God Classes — start with caddyfile.go, reverseproxy.go, REDACTED. — One of this dimension's main actionable groups (16 warning-level).
Resolve the 9 FunctionTooLong finding(s) in God Classes — start with builtins.go (2), caddyfile.go (2), serveroptions.go. — One of this dimension's main actionable groups (9 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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.
127 duplicated block group(s) detected. A further 2 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 44 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 14 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with caddyfile.go (4), builtins.go (2), matchers.go (2). — One of this dimension's main actionable groups (14 warning-level).
Resolve the 13 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with caddyfile.go (3), healthchecks.go (2), acmeissuer.go (2). — One of this dimension's main actionable groups (13 warning-level).
Resolve the 10 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with caddyfile.go (4), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (10 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Low cohesion: Server (LCOM4 6) · ×3modules/caddyhttp/server.go:49
What to do
Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with server.go, tplcontext.go, directives.go. — One of this dimension's main actionable groups (3 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
922 test methods: 789 unit, 133 integration, 0 BDD, 0 e2e. The Go suite contributes 922 test case(s) across 158 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 2 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
22 outdated, 0 author-deprecated direct Go module(s), 2 pinning or checksum defect(s). 55 of 55 direct requirement(s) were graded against proxy.golang.org (0 not served there, 4 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/aryann/difflib · ×2
Outdated: github.com/DeRuina/timberjack · ×22
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.
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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 166 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. 1 of them carry no licence file that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged.
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 20 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), reverseproxy.go, server.go. — One of this dimension's main actionable groups (20 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 Factor9.4 / 10Exemplary✓ 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.
9 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is modules/caddytls/sessiontickets.go. Counted over 162 of the 227 production source files in this repository: 62 are under the ~2,400-byte size floor this dimension measures over, and the remaining 3 have no attributable history left to measure.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
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.
79 deducted task-comment markers across 66510 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 · ×79REDACTED:491
What to do
Resolve the 79 TodoComment finding(s) in Explicit Debt — start with REDACTED (8), server.go (7), REDACTED (7). — One of this dimension's main actionable groups (79 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The repository's root README is a well-designed landing page with branding, links to releases, documentation, and community, plus an overview of the project (Every site on HTTPS). It also includes a clipped architecture/design docs section. The modules/caddyhttp/encode/testdata/README documents only its own directory, not the repository.
What to do
Improve Documentation Quality — currently 5.0/10. — The repository's root README is a well-designed landing page with branding, links to releases, documentation, and community, plus an overview of the project (Every site on HTTPS). It also includes a clipped architecture/design docs section. The modules/caddyhttp/encode/testdata/README documents only its own directory, not the repository.
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: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
1 of 1 build units (Go) 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.
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.
6 finding(s): 0 critical, 6 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 6 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (6 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).
72 finding(s): 0 critical, 17 high, 41 medium, 14 low. semgrep hit a parse error in 1 file(s) — `REDACTED` (lines 1–935, line 1091, lines 1097–1101, …) — 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 2 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 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4). — One of this dimension's main actionable groups (4 issue-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
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).
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.
Resolve the 2 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 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.
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.
12 of 165 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is modules/caddyhttp/caddyauth/argon2id.go. Counted over 165 of the 227 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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.
Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with directives.go. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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. Scored 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. SCORED, not informational.
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 1 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 alternatives1.0 / 10Critical✓ Tool-verified
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.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — REDACTED:31
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels4.2 / 10Weak✓ Tool-verified
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.
A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. (×9) — REDACTED:861, REDACTED:871, REDACTED:881, …
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. — REDACTED:991
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
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"). — REDACTED:0
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 interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×2) — REDACTED:814, REDACTED:822
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
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.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 1 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
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.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.
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.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
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.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
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 README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
README.md changes into `caddy/cmd/caddy/`, but no such folder exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:116
What to do
Reconcile the README with reality: README.md changes into `caddy/cmd/caddy/`, but no such folder exists.
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.
What to do
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.
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.Client{` 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. — cmd/commandfuncs.go:1007
`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. — REDACTED:298
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.
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 86 use(s) across 74,826 production line(s) (~1.1/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
Go: on hot paths, reuse buffers and objects through sync.Pool, preallocate slices and maps with make([]T, 0, n) / make(map[K]V, n), size builders with Grow, append with strconv.Append*, and reslice with buf[:0] instead of allocating anew.
Other · Security — Only what this repository's own non-C# files could be read for was assessed — 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.
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 `issue_7557_invalid_subdirective_snippet.conf` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — caddytest/integration/testdata/issue_7557_invalid_subdirective_snippet.conf:4
What to do
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.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether functions that make a cancellable request accept or pass on a context.Context (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 7/12 functions that make a cancellable request (net/http, net.Dial) accept a context.Context or pass one on, so a request keeps running after whatever wanted it has given up — a cancelled request, a shutdown, an expired deadline. Take `ctx context.Context` as the first parameter and build the request with it (`http.NewRequestWithContext`, `DialContext`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`reuseUnixSocket` calls `net.DialTimeout(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — listen_reuseUnixSocket_windows.go:32
`downloadBuild` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:292
`cmdRun` calls `net.Dial(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — cmd/commandfuncs.go:189
`AdminAPIRequest` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — cmd/commandfuncs.go:950
`dial` calls `net.DialTimeout(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — modules/logging/netwriter.go:217
What to do
Thread a context.Context through functions that make requests, so the work stops when its caller gives up.
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 != 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. (×39) — listeners_fuzz.go:21, duration_fuzz.go:21, REDACTED:352, …
`if err := ctx.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. — modules/caddyhttp/fileserver/browsetplcontext.go:54
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 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 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 — 3 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.
P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
X10 Duplicated predicate — 12 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 2 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 — 55 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.
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.
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
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — `go` is not on PATH — this repository boots from its toolchain's own run entry point ('github.com/go-chi/chi' required by REDACTED, and cmd/caddy is the module's only package main), so the tier cannot start it without that toolchain No runtime accessibility evidence was produced for this scan. This is a statement about THIS RUN's environment, not about the application: nothing here says the app is inaccessible, only that it was never rendered. 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 — ~48382 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.
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+ projects each declaring an entity of their own. 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"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.go), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 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.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
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.
D5 Coupling — Not applicable — this Go build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
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 strongly-typed id(s); 4 value object(s)
ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (1 CQRS handler(s))
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
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
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 — no coverage report found on disk — produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
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.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — 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
X12 Unreachable branch — 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
X13 Undrained process stream — 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
X16 Unfloored truncation loop — 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
X17 Uncapped recursion over a caller-supplied document — 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
X18 Disposal-pattern correctness — 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
X19 Unrestored process-global state — 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: this check looks for a pattern guard or `case` label that increments, decrements or assigns while the switch is deciding whether it matches, and in this repository's languages none can. Go's `++`, `--` and assignments are STATEMENTS, not expressions, so none of them can appear in a `case` expression or anywhere else in a condition, and a type switch's cases are types. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — 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
X23 Unguarded diagnostic materialisation — 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
X24 Document value interpolated into markup unescaped — 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
X25 Inert configuration knob — 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
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 — 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
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 applicable: this check asks whether the null-typed discipline a language offers is switched on, and how much of that the assertion operator takes back, and in this repository's languages there is no such switch and no such operator. Go's type system has no nullable and non-nullable types — every pointer, map, slice and interface is nil-able at every position, there is no switch that turns null checking on, and the compiler produces no nullability warning for an operator to silence. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
Critical — 39 finding(s)
AC2 · Forms & labels· Link with no accessible name · ×9
Link with no accessible name REDACTED:861— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name REDACTED:871— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name REDACTED:881— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name REDACTED:892— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name REDACTED:902— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name REDACTED:912— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name REDACTED:941— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name REDACTED:948— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name REDACTED:955— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC1 · Text alternatives· <img> without a text alternative · ×1
<img> without a text alternative REDACTED:31— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels· <input> without a programmatic label · ×1
<input> without a programmatic label REDACTED:991— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
Boundary-crossing change coupling: directives.go ↔ imports.go caddyconfig/httpcaddyfile/directives.go:1— `caddyconfig/httpcaddyfile/directives.go` (context caddyconfig) and `modules/caddyhttp/standard/imports.go` (context caddyhttp) sit in DIFFERENT parts of the tree yet change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `0cf03d32` caddyhttp: mitigate slowloris via idle read/write deadlines (#7913); `fb63e2e4` caddyhttp: New experimental handler for intercepting responses (#6232); `0d44e3ec` logging: Implement `log_append` handler (#6066) — run `git show` on any of them.
TodoComment REDACTED:491— // TODO: make tunable? — 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:516— // TODO: figure out when to close the listener and the transport — 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 listen_unix.go:180— // TODO: Not 100% sure this is necessary, but we do this for net.UnixListener, so... — 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 caddy.go:470— // TODO: This event is experimental and subject to change. — 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 caddy.go:727— // TODO: This event is experimental and subject to change. — 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 caddyconfig/caddyfile/importargs.go:101— // TODO: Remove the deprecated {args.*} placeholder — 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 caddyconfig/caddyfile/adapter.go:68— // TODO: also perform this check on imported files — 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 caddyconfig/httpcaddyfile/serveroptions.go:67— // TODO: EXPERIMENTAL — 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 caddyconfig/httpcaddyfile/serveroptions.go:484— // TODO: THIS IS EXPERIMENTAL (MAY 2024) — 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:689— // TODO: we could pre-process the specificities for efficiency, — 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:1105— // TODO: maybe a smarter way to handle this might be to just make the — 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 caddyconfig/httpcaddyfile/directives.go:56— // TODO: deprecated, renamed to log_skip — 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 caddyconfig/httpcaddyfile/directives.go:75— // TODO: deprecated, renamed to basic_auth — 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 caddytest/integration/caddyfile_test.go:524— // TODO: Test each http version separately (especially http/3) — 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 modules/caddyhttp/server.go:166— // TODO: This is an EXPERIMENTAL feature. Subject to change or removal. — 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 modules/caddyhttp/server.go:184— // TODO: This is an EXPERIMENTAL feature. Subject to change or removal. — 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 modules/caddyhttp/server.go:213— // TODO: This is an EXPERIMENTAL feature. Subject to change or removal. — 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 modules/caddyhttp/server.go:243— // TODO: This is an EXPERIMENTAL feature. Subject to change or removal. — 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 modules/caddyhttp/server.go:1547— // TODO: This is an EXPERIMENTAL feature. Subject to change or removal. — 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:114— // TODO: This is an EXPERIMENTAL feature. Subject to change or removal. — 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 modules/caddyhttp/server.go:452— // TODO: Experimental (Nov. 2023) — 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 modules/caddyhttp/server.go:1008— // TODO: support port ranges — 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:259— // TODO: Update this comment, it seems we've moved the copy into the handler? — 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:463— // TODO: Is this used? — 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 modules/caddyhttp/replacer_test.go:227— // not ideal, but also most correct, given that files can have dots (example: index.<SHA>.html) TODO: maybe this isn't right.. — 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) listeners_fuzz.go:21— `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) duration_fuzz.go:21— `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:352— `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:800— `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:984— `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) caddyconfig/caddyfile/lexer_fuzz.go:21— `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:995— `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:1854— `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:1859— `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:234— `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:239— `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:244— `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:436— `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) internal/bindcap_linux.go:88— `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/caddyhttp/server.go:988— `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/caddyhttp/server.go:1004— `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/caddyhttp/server.go:1013— `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/caddyhttp/server.go:1161— `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/caddyhttp/server.go:1360— `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/caddyhttp/server.go:1864— `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/caddyhttp/server.go:1872— `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/caddyhttp/server.go:1924— `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/caddyhttp/server.go:1933— `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/caddyhttp/server.go:1954— `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/caddyhttp/server.go:1963— `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.
Hotspot: modules/caddyhttp/reverseproxy/reverseproxy.go modules/caddyhttp/reverseproxy/reverseproxy.go:308— modules/caddyhttp/reverseproxy/reverseproxy.go changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in Handler.Provision at line 308. 2 of those changes were fix/bug commits, and the other 13 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- modules/caddyhttp/reverseproxy/reverseproxy.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: modules/caddyhttp/server.go modules/caddyhttp/server.go:598— modules/caddyhttp/server.go changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in Server.ServeHTTP at line 598. 1 of those changes was a fix/bug commit, and the other 13 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- modules/caddyhttp/server.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:566— REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 131 in ServerType.serversFromPairings at line 566. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10: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: modules/caddyhttp/reverseproxy/caddyfile.go modules/caddyhttp/reverseproxy/caddyfile.go:152— modules/caddyhttp/reverseproxy/caddyfile.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 255 in Handler.UnmarshalCaddyfile at line 152. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- modules/caddyhttp/reverseproxy/caddyfile.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:188— REDACTED changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in App.Provision at line 188. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10: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:322— REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in FileServer.ServeHTTP at line 322. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10: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: caddyconfig/httpcaddyfile/serveroptions.go caddyconfig/httpcaddyfile/serveroptions.go:73— caddyconfig/httpcaddyfile/serveroptions.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 100 in httpcaddyfile.unmarshalCaddyfileServerOptions at line 73. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- caddyconfig/httpcaddyfile/serveroptions.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: modules/caddyhttp/replacer.go modules/caddyhttp/replacer.go:59— modules/caddyhttp/replacer.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 94 in caddyhttp.addHTTPVarsToReplacer at line 59. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- modules/caddyhttp/replacer.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: caddyconfig/caddyfile/lexer.go caddyconfig/caddyfile/lexer.go:173— caddyconfig/caddyfile/lexer.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in lexer.next at line 173. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- caddyconfig/caddyfile/lexer.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: caddyconfig/httpcaddyfile/tlsapp.go caddyconfig/httpcaddyfile/tlsapp.go:36— caddyconfig/httpcaddyfile/tlsapp.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 124 in ServerType.buildTLSApp at line 36. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- caddyconfig/httpcaddyfile/tlsapp.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:207— REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in HTTPTransport.NewTransport at line 207. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10: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: caddyconfig/caddyfile/formatter.go caddyconfig/caddyfile/formatter.go:486— caddyconfig/caddyfile/formatter.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in caddyfile.formatTokens at line 486. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- caddyconfig/caddyfile/formatter.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: modules/caddyhttp/rewrite/rewrite.go modules/caddyhttp/rewrite/rewrite.go:158— modules/caddyhttp/rewrite/rewrite.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in Rewrite.Rewrite at line 158. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- modules/caddyhttp/rewrite/rewrite.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: caddyconfig/caddyfile/parse.go caddyconfig/caddyfile/parse.go:375— caddyconfig/caddyfile/parse.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in parser.doImport at line 375. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- caddyconfig/caddyfile/parse.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: modules/caddyhttp/reverseproxy/healthchecks.go modules/caddyhttp/reverseproxy/healthchecks.go:391— modules/caddyhttp/reverseproxy/healthchecks.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in Handler.doActiveHealthCheck at line 391. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- modules/caddyhttp/reverseproxy/healthchecks.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: modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go:265— modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in Transport.buildEnv at line 265. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- modules/caddyhttp/reverseproxy/fastcgi/fastcgi.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: modules/caddyhttp/fileserver/browsetplcontext.go modules/caddyhttp/fileserver/browsetplcontext.go:229— modules/caddyhttp/fileserver/browsetplcontext.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in browseTemplateContext.applySortAndLimit at line 229. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- modules/caddyhttp/fileserver/browsetplcontext.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: caddyconfig/httpcaddyfile/directives.go caddyconfig/httpcaddyfile/directives.go:456— caddyconfig/httpcaddyfile/directives.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in httpcaddyfile.sortRoutes at line 456. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- caddyconfig/httpcaddyfile/directives.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: modules/logging/filewriter.go modules/logging/filewriter.go:187— modules/logging/filewriter.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in FileWriter.OpenWriter at line 187. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10:00' --full-history --no-merges -- modules/logging/filewriter.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:219— REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in App.Emit at line 219. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 16:28:55 +10:00' --until='2026-10-23 16:28:55 +10: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.
MethodTooLong: Handler.UnmarshalCaddyfile modules/caddyhttp/reverseproxy/caddyfile.go:152— MethodTooLong — UnmarshalCaddyfile runs 544 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 444 over it, 5.44× 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: ServerType.serversFromPairings REDACTED:566— MethodTooLong — serversFromPairings runs 290 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 190 over it, 2.90× 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: HTTPTransport.UnmarshalCaddyfile modules/caddyhttp/reverseproxy/caddyfile.go:1079— MethodTooLong — UnmarshalCaddyfile runs 246 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× 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: ServerType.buildTLSApp caddyconfig/httpcaddyfile/tlsapp.go:36— MethodTooLong — buildTLSApp runs 244 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 144 over it, 2.44× 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: HTTPTransport.NewTransport REDACTED:207— MethodTooLong — NewTransport runs 196 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× 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: App.automaticHTTPSPhase1 modules/caddyhttp/autohttps.go:77— MethodTooLong — automaticHTTPSPhase1 runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× 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: lexer.next caddyconfig/caddyfile/lexer.go:173— MethodTooLong — next runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× 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: ServerType.Setup REDACTED:59— MethodTooLong — Setup runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× 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: ACMEIssuer.UnmarshalCaddyfile modules/caddytls/acmeissuer.go:448— MethodTooLong — UnmarshalCaddyfile 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: FileServer.ServeHTTP REDACTED:322— MethodTooLong — ServeHTTP 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.
MethodTooLong: Server.ServeHTTP modules/caddyhttp/server.go:598— MethodTooLong — ServeHTTP runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× 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: MatchFile.selectFile modules/caddyhttp/fileserver/matcher.go:333— MethodTooLong — selectFile runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× 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: TLS.Provision REDACTED:166— MethodTooLong — Provision runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× 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: App.Provision REDACTED:188— MethodTooLong — Provision runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× 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: FileWriter.UnmarshalCaddyfile modules/logging/filewriter.go:387— MethodTooLong — UnmarshalCaddyfile runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× 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: TLS.publishECHConfigs REDACTED:333— MethodTooLong — publishECHConfigs runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× 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: Handler.Provision modules/caddyhttp/reverseproxy/reverseproxy.go:308— MethodTooLong — Provision 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: App.Start REDACTED:480— MethodTooLong — Start 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.
MethodTooLong: Handler.doActiveHealthCheck modules/caddyhttp/reverseproxy/healthchecks.go:391— MethodTooLong — doActiveHealthCheck 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.
MethodTooLong: Handler.reverseProxy modules/caddyhttp/reverseproxy/reverseproxy.go:1176— MethodTooLong — reverseProxy runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× 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.
FileTooLong: reverseproxy/caddyfile.go modules/caddyhttp/reverseproxy/caddyfile.go— FileTooLong — 1054 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 554 over it, 2.11× 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: reverseproxy/reverseproxy.go modules/caddyhttp/reverseproxy/reverseproxy.go— FileTooLong — 1032 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: Handler (20 blocks, 107-2219). The bar is 500 significant lines; this is 532 over it, 2.06× 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 — 1019 significant lines (blank, comment-only and punctuation-only lines excluded), about 60% of them inside a single declaration: ServerType (5 blocks, 59-1699). The bar is 500 significant lines; this is 519 over it, 2.04× 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: caddyhttp/server.go modules/caddyhttp/server.go— FileTooLong — 894 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: Server (40 blocks, 49-1781). The bar is 500 significant lines; this is 394 over it, 1.79× 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: caddyhttp/matchers.go modules/caddyhttp/matchers.go— FileTooLong — 869 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 369 over it, 1.74× 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 — 764 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 264 over it, 1.53× 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: httpcaddyfile/builtins.go caddyconfig/httpcaddyfile/builtins.go— FileTooLong — 732 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 232 over it, 1.46× 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: httpcaddyfile/tlsapp.go caddyconfig/httpcaddyfile/tlsapp.go— FileTooLong — 664 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 164 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: cmd/commandfuncs.go cmd/commandfuncs.go— FileTooLong — 640 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 140 over it, 1.28× 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 — 625 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 125 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: ./caddy.go caddy.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: REDACTED REDACTED— FileTooLong — 583 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 83 over it, 1.17× 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 — 560 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: TLS (22 blocks, 54-1090). The bar is 500 significant lines; this is 60 over it, 1.12× 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: logging/filters.go modules/logging/filters.go— FileTooLong — 558 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 58 over it, 1.12× 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 — 552 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 52 over it, 1.10× 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 — 509 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 9 over it, 1.02× 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.
Duplicated block (11 lines × 2) caddyconfig/caddyfile/formatter.go:468— caddyconfig/caddyfile/formatter.go:468-478 | caddyconfig/caddyfile/lexer.go:636-649 — 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 (11 lines × 2) caddyconfig/httpcaddyfile/builtins.go:348— caddyconfig/httpcaddyfile/builtins.go:348-358 | caddyconfig/httpcaddyfile/builtins.go:437-447 — 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 `caddyconfig/httpcaddyfile/builtins.go:348` 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 (11 lines × 2) REDACTED:694— REDACTED:694-704 | REDACTED:705-715 — 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 (11 lines × 2) cmd/commandfuncs.go:747— cmd/commandfuncs.go:747-757 | cmd/commandfuncs.go:789-799 — 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 `cmd/commandfuncs.go:747` 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 (11 lines × 2) modules/caddyhttp/matchers.go:1536— modules/caddyhttp/matchers.go:1536-1546 | REDACTED:445-455 — 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 `modules/caddyhttp/matchers.go:1536` 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 (11 lines × 2) modules/caddyhttp/matchers.go:1713— modules/caddyhttp/matchers.go:1713-1723 | REDACTED:1129-1139 — 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 (11 lines × 2) modules/caddyhttp/reverseproxy/caddyfile.go:452— modules/caddyhttp/reverseproxy/caddyfile.go:452-462 | modules/caddyhttp/reverseproxy/caddyfile.go:468-478 — 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/caddyhttp/reverseproxy/caddyfile.go:452` 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 (11 lines × 2) modules/caddyhttp/reverseproxy/caddyfile.go:528— modules/caddyhttp/reverseproxy/caddyfile.go:528-538 | modules/caddyhttp/reverseproxy/caddyfile.go:544-554 — 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/caddyhttp/reverseproxy/caddyfile.go:528` 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 (11 lines × 2) modules/caddyhttp/reverseproxy/caddyfile.go:560— modules/caddyhttp/reverseproxy/caddyfile.go:560-570 | modules/caddyhttp/reverseproxy/caddyfile.go:592-602 — 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/caddyhttp/reverseproxy/caddyfile.go:560` 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 (11 lines × 2) modules/caddypki/acmeserver/caddyfile.go:93— modules/caddypki/acmeserver/caddyfile.go:93-103 | modules/caddypki/acmeserver/caddyfile.go:112-122 — 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/caddypki/acmeserver/caddyfile.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.
Duplicated block (11 lines × 2) REDACTED:543— REDACTED:543-553 | REDACTED:914-924 — 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:543` 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 (11 lines × 2) context.go:429— context.go:429-440 | context.go:444-454 — 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 `context.go:429` 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 (11 lines × 2) caddyconfig/httpcaddyfile/builtins.go:1111— caddyconfig/httpcaddyfile/builtins.go:1111-1121 | caddyconfig/httpcaddyfile/builtins.go:1130-1140 — 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 `caddyconfig/httpcaddyfile/builtins.go:1111` 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 (11 lines × 2) modules/caddyhttp/ip_matchers.go:83— modules/caddyhttp/ip_matchers.go:83-93 | modules/caddyhttp/ip_matchers.go:196-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 `modules/caddyhttp/ip_matchers.go:83` 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. 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) modules/caddyhttp/reverseproxy/caddyfile.go:1343— modules/caddyhttp/reverseproxy/caddyfile.go:1343-1352 | modules/caddyhttp/reverseproxy/caddyfile.go:1356-1365 — 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 (10 lines × 2) modules/caddyhttp/reverseproxy/healthchecks.go:272— modules/caddyhttp/reverseproxy/healthchecks.go:272-281 | modules/caddyhttp/reverseproxy/healthchecks.go:300-309 — 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 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 (10 lines × 2) modules/caddyhttp/staticerror.go:63— modules/caddyhttp/staticerror.go:63-72 | modules/caddyhttp/staticresp.go:142-151 — 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 `modules/caddyhttp/staticerror.go:63` 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) modules/caddytls/acmeissuer.go:547— modules/caddytls/acmeissuer.go:547-556 | modules/caddytls/acmeissuer.go:563-572 — 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 (10 lines × 2) modules/caddytls/matchers.go:334— modules/caddytls/matchers.go:334-343 | modules/caddytls/matchers.go:458-467 — 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 (10 lines × 2) REDACTED:419— REDACTED:419-428 | REDACTED:954-963 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:953` calls `keepStorageClean` and `REDACTED:417` 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 (10 lines × 2) modules/caddyhttp/proxyprotocol/module.go:46— modules/caddyhttp/proxyprotocol/module.go:46-56 | modules/logging/netwriter.go:126-135 — 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 `modules/caddyhttp/proxyprotocol/module.go:46` 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 (10 lines × 2) modules/caddytls/acmeissuer.go:605— modules/caddytls/acmeissuer.go:605-614 | modules/caddytls/acmeissuer.go:657-666 — 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/caddytls/acmeissuer.go:605` 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 (10 lines × 2) modules/caddytls/zerosslissuer.go:188— modules/caddytls/zerosslissuer.go:188-197 | modules/caddytls/zerosslissuer.go:231-240 — 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/caddytls/zerosslissuer.go:188` 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 (10 lines × 2) modules/caddyhttp/reverseproxy/caddyfile.go:467— modules/caddyhttp/reverseproxy/caddyfile.go:467-476 | modules/caddyhttp/reverseproxy/caddyfile.go:483-492 — 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/caddyhttp/reverseproxy/caddyfile.go:467` 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 (10 lines × 2) modules/caddyhttp/reverseproxy/caddyfile.go:427— modules/caddyhttp/reverseproxy/caddyfile.go:427-436 | modules/caddyhttp/reverseproxy/caddyfile.go:503-512 — 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/caddyhttp/reverseproxy/caddyfile.go:427` 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 (10 lines × 2) modules/caddyhttp/reverseproxy/healthchecks.go:510— modules/caddyhttp/reverseproxy/healthchecks.go:510-519 | modules/caddyhttp/reverseproxy/healthchecks.go:556-565 — 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 (10 lines × 2) REDACTED:425— REDACTED:425-434 | REDACTED:439-448 — 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:425` 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 (8 lines × 2) REDACTED:576— REDACTED:576-583 | REDACTED:1167-1174 — 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) modules/caddyhttp/reverseproxy/caddyfile.go:1111— modules/caddyhttp/reverseproxy/caddyfile.go:1111-1118 | modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:100-107 — 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 `modules/caddyhttp/reverseproxy/caddyfile.go:1111` 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) modules/caddytls/fileloader.go:35— modules/caddytls/fileloader.go:35-42 | modules/caddytls/pemloader.go:35-42 — 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 `modules/caddytls/fileloader.go:35` 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:1028— REDACTED:1028-1037 | REDACTED:1046-1053 — 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:1028` 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 (8 lines × 2) modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:274— modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:274-281 | modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:285-292 — 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/caddyhttp/reverseproxy/fastcgi/caddyfile.go:274` 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:442— REDACTED:442-449 | REDACTED:965-972 — 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:442` 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 (8 lines × 2) modules/caddyhttp/reverseproxy/healthchecks.go:274— modules/caddyhttp/reverseproxy/healthchecks.go:274-281 | modules/caddyhttp/reverseproxy/healthchecks.go:614-621 — 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/caddyhttp/reverseproxy/healthchecks.go:274` 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 (8 lines × 2) modules/caddyhttp/server.go:902— modules/caddyhttp/server.go:902-909 | modules/caddyhttp/server.go:917-924 — 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/caddyhttp/server.go:902` 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 (8 lines × 2) modules/caddyhttp/reverseproxy/caddyfile.go:1182— modules/caddyhttp/reverseproxy/caddyfile.go:1182-1189 | modules/caddyhttp/reverseproxy/caddyfile.go:1594-1601 — 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/caddyhttp/reverseproxy/caddyfile.go:1182` 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) modules/caddyhttp/reverseproxy/caddyfile.go:1103— modules/caddyhttp/reverseproxy/caddyfile.go:1103-1110 | modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:92-99 — 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 `modules/caddyhttp/reverseproxy/caddyfile.go:1103` 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: httpcaddyfile.parseTLS caddyconfig/httpcaddyfile/builtins.go:119— FunctionTooLong — parseTLS runs 321 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 221 over it, 3.21× 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: httpcaddyfile.unmarshalCaddyfileServerOptions caddyconfig/httpcaddyfile/serveroptions.go:73— FunctionTooLong — unmarshalCaddyfileServerOptions runs 237 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 137 over it, 2.37× 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: caddyhttp.addHTTPVarsToReplacer modules/caddyhttp/replacer.go:59— FunctionTooLong — addHTTPVarsToReplacer runs 235 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 135 over it, 2.35× 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: caddycmd.init cmd/commands.go:95— FunctionTooLong — init runs 202 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 102 over it, 2.02× 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: httpcaddyfile.parseLogHelper caddyconfig/httpcaddyfile/builtins.go:942— FunctionTooLong — parseLogHelper runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× 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: fastcgi.parsePHPFastCGI modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:172— FunctionTooLong — parsePHPFastCGI runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× 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: reverseproxy.cmdReverseProxy modules/caddyhttp/reverseproxy/command.go:87— FunctionTooLong — cmdReverseProxy runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× 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: caddy.unsyncedConfigAccess REDACTED:1180— FunctionTooLong — unsyncedConfigAccess runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× 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: forwardauth.parseCaddyfile modules/caddyhttp/reverseproxy/forwardauth/caddyfile.go:64— FunctionTooLong — parseCaddyfile 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.
Duplicated block (12 lines × 2) REDACTED:771— REDACTED:771-782 | modules/caddyhttp/fileserver/matcher.go:676-687 — 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 (12 lines × 2) modules/caddyhttp/matchers.go:1322— modules/caddyhttp/matchers.go:1322-1333 | modules/caddyhttp/vars.go:396-407 — 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 `modules/caddyhttp/matchers.go:1322` 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 (12 lines × 2) modules/caddyhttp/matchers.go:1349— modules/caddyhttp/matchers.go:1349-1360 | modules/caddyhttp/vars.go:423-434 — 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 `modules/caddyhttp/matchers.go:1349` 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 (12 lines × 2) modules/caddyhttp/replacer.go:337— modules/caddyhttp/replacer.go:337-348 | modules/caddyhttp/replacer.go:358-369 — 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/caddyhttp/replacer.go:337` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `modules/caddyhttp/replacer.go:357` calls `Context`, `Value` and `modules/caddyhttp/replacer.go:336` 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 (12 lines × 2) modules/caddytls/acmeissuer.go:652— modules/caddytls/acmeissuer.go:652-663 | modules/caddytls/zerosslissuer.go:226-237 — 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 `modules/caddytls/acmeissuer.go:652` 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 (12 lines × 2) REDACTED:237— REDACTED:237-248 | REDACTED:322-333 — 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 (12 lines × 2) REDACTED:432— REDACTED:432-443 | REDACTED:694-705 — 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:432` 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) caddyconfig/httpcaddyfile/options.go:205— caddyconfig/httpcaddyfile/options.go:205-216 | caddyconfig/httpcaddyfile/options.go:467-478 — 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 `caddyconfig/httpcaddyfile/options.go:205` 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. 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 (9 lines × 2) modules/caddyhttp/reverseproxy/command.go:186— modules/caddyhttp/reverseproxy/command.go:186-194 | modules/caddyhttp/reverseproxy/command.go:208-216 — 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/caddyhttp/reverseproxy/command.go:186` 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) modules/caddytls/leafpemloader.go:38— modules/caddytls/leafpemloader.go:38-46 | modules/caddytls/leafstorageloader.go:74-82 — 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 `modules/caddytls/leafstorageloader.go:74` 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) modules/caddytls/matchers.go:360— modules/caddytls/matchers.go:360-368 | modules/caddytls/matchers.go:476-484 — 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/caddytls/matchers.go:360` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) modules/caddyhttp/reverseproxy/caddyfile.go:311— modules/caddyhttp/reverseproxy/caddyfile.go:311-319 | modules/caddyhttp/reverseproxy/caddyfile.go:324-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 `modules/caddyhttp/reverseproxy/caddyfile.go:311` 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 (9 lines × 2) caddyconfig/httpcaddyfile/builtins.go:363— caddyconfig/httpcaddyfile/builtins.go:363-371 | caddyconfig/httpcaddyfile/builtins.go:413-421 — 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 (9 lines × 2) modules/caddyhttp/reverseproxy/healthchecks.go:467— modules/caddyhttp/reverseproxy/healthchecks.go:467-475 | modules/caddyhttp/reverseproxy/healthchecks.go:488-496 — 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 (7 lines × 2) context.go:509— context.go:509-515 | context.go:537-543 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `context.go:507` calls `App` and `context.go:535` 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 (7 lines × 2) modules/caddyhttp/reverseproxy/caddyfile.go:494— modules/caddyhttp/reverseproxy/caddyfile.go:494-500 | modules/caddyhttp/reverseproxy/caddyfile.go:619-625 — 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 (7 lines × 2) modules/caddyhttp/rewrite/rewrite.go:718— modules/caddyhttp/rewrite/rewrite.go:718-724 | modules/caddyhttp/rewrite/rewrite.go:733-739 — 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/caddyhttp/rewrite/rewrite.go:718` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `modules/caddyhttp/rewrite/rewrite.go:742` calls `ReplaceAll` and `modules/caddyhttp/rewrite/rewrite.go:725` 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 (7 lines × 2) caddyconfig/httpcaddyfile/serveroptions.go:147— caddyconfig/httpcaddyfile/serveroptions.go:147-153 | caddyconfig/httpcaddyfile/serveroptions.go:185-191 — 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 `caddyconfig/httpcaddyfile/serveroptions.go:147` 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) modules/caddyhttp/timeouts/caddyfile.go:41— modules/caddyhttp/timeouts/caddyfile.go:41-47 | modules/caddyhttp/timeouts/caddyfile.go:59-65 — 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 (7 lines × 2) REDACTED:793— REDACTED:793-799 | REDACTED:838-844 — 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:793` 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.
TooManyMethods: Server modules/caddyhttp/server.go:49— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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: Dispenser caddyconfig/caddyfile/dispenser.go:29— TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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: Handler modules/caddyhttp/reverseproxy/reverseproxy.go:107— TooManyMethods — 32 methods, declared across 5 files: reverseproxy/reverseproxy.go (20), REDACTED (5), reverseproxy/healthchecks.go (4), reverseproxy/caddyfile.go (2), +1 more file(s). 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: FilterEncoder REDACTED:40— 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: AppendEncoder modules/logging/appendencoder.go:44— 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.
Duplicated block (13 lines × 2) caddyconfig/httpcaddyfile/options.go:76— caddyconfig/httpcaddyfile/options.go:76-88 | caddyconfig/httpcaddyfile/options.go:91-103 — 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. 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 (13 lines × 2) REDACTED:77— REDACTED:77-89 | REDACTED:105-117 — 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:77` 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) REDACTED:515— REDACTED:515-527 | REDACTED:538-550 — 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:515` 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) modules/caddyhttp/reverseproxy/caddyfile.go:576— modules/caddyhttp/reverseproxy/caddyfile.go:576-588 | modules/caddyhttp/reverseproxy/caddyfile.go:630-642 — 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 (13 lines × 2) REDACTED:1012— REDACTED:1012-1024 | REDACTED:1030-1042 — 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 (10 lines × 3) modules/caddyhttp/matchers.go:880— modules/caddyhttp/matchers.go:880-889 | modules/caddyhttp/matchers.go:1353-1362 | modules/caddyhttp/vars.go:427-436 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `modules/caddyhttp/matchers.go:880` 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. 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 × 3) REDACTED:501— REDACTED:501-510 | REDACTED:582-591 | REDACTED:666-675 — 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 `REDACTED:501` 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. 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 × 3) modules/caddyhttp/reverseproxy/caddyfile.go:357— modules/caddyhttp/reverseproxy/caddyfile.go:357-366 | modules/caddyhttp/reverseproxy/caddyfile.go:439-448 | modules/caddyhttp/reverseproxy/caddyfile.go:451-460 — 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 `modules/caddyhttp/reverseproxy/caddyfile.go:357` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `modules/caddyhttp/reverseproxy/caddyfile.go:368` calls `Log`, `Named`, `Warn` and `modules/caddyhttp/reverseproxy/caddyfile.go:451` does not — after which the two agree again for 3 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 (10 lines × 3) modules/caddyhttp/reverseproxy/caddyfile.go:1204— modules/caddyhttp/reverseproxy/caddyfile.go:1204-1213 | modules/caddyhttp/reverseproxy/caddyfile.go:1567-1576 | modules/caddyhttp/reverseproxy/caddyfile.go:1667-1676 — 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 `modules/caddyhttp/reverseproxy/caddyfile.go:1204` 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 (10 lines × 3) modules/caddyhttp/reverseproxy/caddyfile.go:345— modules/caddyhttp/reverseproxy/caddyfile.go:345-354 | modules/caddyhttp/reverseproxy/caddyfile.go:357-366 | modules/caddyhttp/reverseproxy/caddyfile.go:439-448 — 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 `modules/caddyhttp/reverseproxy/caddyfile.go:345` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `modules/caddyhttp/reverseproxy/caddyfile.go:368` calls `Log`, `Named`, `Warn` and `modules/caddyhttp/reverseproxy/caddyfile.go:357` does not — after which the two agree again for 3 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.
X2 · Cancellation propagation· Function without context.Context · ×5
Function without context.Context: reuseUnixSocket listen_reuseUnixSocket_windows.go:32— `reuseUnixSocket` calls `net.DialTimeout(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: downloadBuild REDACTED:292— `downloadBuild` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: cmdRun cmd/commandfuncs.go:189— `cmdRun` calls `net.Dial(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: AdminAPIRequest cmd/commandfuncs.go:950— `AdminAPIRequest` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: dial modules/logging/netwriter.go:217— `dial` calls `net.DialTimeout(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
ClassTooLong: Handler modules/caddyhttp/reverseproxy/reverseproxy.go:107— ClassTooLong — 687 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods, 20 blocks, lines 107-2219. The bar is 400 significant lines; this is 287 over it, 1.72× 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: Server modules/caddyhttp/server.go:49— ClassTooLong — 684 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods, 40 blocks, lines 49-1781. The bar is 400 significant lines; this is 284 over it, 1.71× 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: ServerType REDACTED:56— ClassTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods, 5 blocks, lines 59-1699. The bar is 400 significant lines; this is 210 over it, 1.53× 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: TLS REDACTED:54— ClassTooLong — 486 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods, 22 blocks, lines 54-1090. The bar is 400 significant lines; this is 86 over it, 1.22× 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.
Duplicated block (17 lines × 2) caddyconfig/httpcaddyfile/builtins.go:69— caddyconfig/httpcaddyfile/builtins.go:69-85 | caddyconfig/httpcaddyfile/options.go:350-366 — 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 `caddyconfig/httpcaddyfile/builtins.go:69` 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. 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) modules/caddytls/matchers.go:374— modules/caddytls/matchers.go:374-390 | modules/caddytls/matchers.go:489-505 — 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. 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 (17 lines × 2) modules/logging/appendencoder.go:77— modules/logging/appendencoder.go:77-93 | REDACTED:83-99 — before extracting anything, compare `modules/logging/appendencoder.go` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `modules/logging/appendencoder.go:75` calls `NewReplacer` and `REDACTED:81` 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 (17 lines × 2) modules/logging/appendencoder.go:103— modules/logging/appendencoder.go:103-119 | REDACTED:121-137 — before extracting anything, compare `modules/logging/appendencoder.go` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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.
TooManyFields: Server modules/caddyhttp/server.go:49— TooManyFields — 71 stored fields beside 41 methods. The bar is 30 stored fields; this is 41 over it, 2.37× 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: Handler modules/caddyhttp/reverseproxy/reverseproxy.go:107— TooManyFields — 35 stored fields beside 32 methods. The bar is 30 stored fields; this is 5 over it, 1.17× 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: serverOptions caddyconfig/httpcaddyfile/serveroptions.go:32— TooManyFields — 31 stored fields. 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.
Duplicated block (15 lines × 2) modules/caddypki/command.go:109— modules/caddypki/command.go:109-123 | modules/caddypki/command.go:178-192 — 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) modules/caddytls/acmeissuer.go:620— modules/caddytls/acmeissuer.go:620-634 | modules/caddytls/zerosslissuer.go:200-214 — 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 `modules/caddytls/acmeissuer.go:620` 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) REDACTED:270— REDACTED:270-284 | REDACTED:355-369 — 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. 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 × 3) REDACTED:537— REDACTED:537-550 | REDACTED:617-630 | REDACTED:754-767 — 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 `REDACTED:537` 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, `REDACTED:535` calls `Val` and `REDACTED:753` 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 (14 lines × 3) modules/caddypki/ca.go:111— modules/caddypki/ca.go:111-124 | REDACTED:407-420 | modules/caddytls/leafstorageloader.go:58-71 — 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 (14 lines × 3) modules/logging/appendencoder.go:152— modules/logging/appendencoder.go:152-165 | REDACTED:201-214 | modules/logging/journaldencoder.go:137-150 — before extracting anything, compare `modules/logging/appendencoder.go` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) context.go:233— context.go:233-238 | context.go:251-256 — 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 `context.go:233` 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 (6 lines × 2) modules/caddyhttp/matchers.go:1611— modules/caddyhttp/matchers.go:1611-1616 | modules/caddytls/matchers.go:190-195 — 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 (6 lines × 2) REDACTED:104— REDACTED:104-109 | REDACTED:222-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 `REDACTED:104` 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 (5 lines × 3) modules/caddyhttp/reverseproxy/command.go:190— modules/caddyhttp/reverseproxy/command.go:190-194 | modules/caddyhttp/reverseproxy/command.go:212-216 | modules/caddyhttp/staticresp.go:375-379 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `modules/caddyhttp/reverseproxy/command.go:190` 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 (5 lines × 3) REDACTED:271— REDACTED:271-275 | REDACTED:109-113 | REDACTED:267-271 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:271` 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 (5 lines × 3) modules/caddyhttp/server.go:896— modules/caddyhttp/server.go:896-900 | modules/caddyhttp/server.go:911-915 | modules/caddyhttp/server.go:926-930 — 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.
Low cohesion: Server (LCOM4 6) modules/caddyhttp/server.go:49— Server'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: TemplateContext (LCOM4 6) modules/caddyhttp/templates/tplcontext.go:50— TemplateContext'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: Helper (LCOM4 4) caddyconfig/httpcaddyfile/directives.go:212— Helper'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.
AC4 · Keyboard semantics· Anchor without href · ×2
Anchor without href REDACTED:814— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href REDACTED:822— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
D12 · Dependency Hygiene· Dependency pinned to a stale untagged commit · ×2
Dependency pinned to a stale untagged commit: github.com/aryann/difflib — Direct dependency `github.com/aryann/difflib` is required at `v0.0.0-20210328193216-ff5ff6dc229b` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2021-03-28, 5.6 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/aryann/difflib` and has not moved this requirement in 5.6 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/aryann/difflib` 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/yuin/goldmark-highlighting/v2 — Direct dependency `github.com/yuin/goldmark-highlighting/v2` is required at `v2.0.0-20230729083705-37449abec8cc` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2023-07-29, 3.2 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/yuin/goldmark-highlighting/v2` and has not moved this requirement in 3.2 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/yuin/goldmark-highlighting/v2` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) modules/caddyhttp/intercept/intercept.go:232— modules/caddyhttp/intercept/intercept.go:232-294 | modules/caddyhttp/intercept/intercept.go:300-362 | modules/caddyhttp/reverseproxy/caddyfile.go:152-977 | modules/caddyhttp/reverseproxy/caddyfile.go:981-1043 — 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) modules/caddyhttp/matchers.go:843— modules/caddyhttp/matchers.go:843-890 | modules/caddyhttp/matchers.go:1309-1363 | modules/caddyhttp/urlpatternmatcher.go:156-199 | modules/caddyhttp/vars.go:383-437 — 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.
Duplicated block (24 lines × 2) modules/caddyhttp/matchers.go:1215— modules/caddyhttp/matchers.go:1215-1238 | modules/caddyhttp/vars.go:275-298 — 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 `modules/caddyhttp/matchers.go:1215` 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 after the matched lines, `modules/caddyhttp/matchers.go:1243` calls `Errf` and `modules/caddyhttp/vars.go:300` 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 (24 lines × 2) REDACTED:96— REDACTED:96-119 | REDACTED:254-277 — 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:96` 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) REDACTED:801— REDACTED:801-820 | modules/caddyhttp/fileserver/matcher.go:706-725 — 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 (20 lines × 2) REDACTED:537— REDACTED:537-556 | REDACTED:617-636 — 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:537` 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. 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 (14 lines × 2) REDACTED:825— REDACTED:825-838 | modules/caddyhttp/fileserver/matcher.go:730-743 — 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) REDACTED:876— REDACTED:876-889 | REDACTED:605-618 — 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:876` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 3) modules/caddyhttp/matchers.go:865— modules/caddyhttp/matchers.go:865-875 | modules/caddyhttp/matchers.go:1337-1347 | modules/caddyhttp/vars.go:411-421 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `modules/caddyhttp/matchers.go:865` 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 (11 lines × 3) REDACTED:156— REDACTED:156-166 | REDACTED:433-443 | REDACTED:695-705 — 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 `REDACTED:156` 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 × 4) modules/caddyhttp/matchers.go:882— modules/caddyhttp/matchers.go:882-890 | modules/caddyhttp/matchers.go:1355-1363 | modules/caddyhttp/urlpatternmatcher.go:190-199 | modules/caddyhttp/vars.go:429-437 — there are 4 copies across 3 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `modules/caddyhttp/matchers.go:882` 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 (9 lines × 4) caddyconfig/httpcaddyfile/builtins.go:290— caddyconfig/httpcaddyfile/builtins.go:290-298 | caddyconfig/httpcaddyfile/builtins.go:306-314 | caddyconfig/httpcaddyfile/builtins.go:1113-1121 | caddyconfig/httpcaddyfile/builtins.go:1132-1140 — 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 lines × 3) modules/caddyhttp/matchers.go:864— modules/caddyhttp/matchers.go:864-871 | modules/caddyhttp/matchers.go:1313-1320 | modules/caddyhttp/vars.go:387-394 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `modules/caddyhttp/matchers.go:864` 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 × 3) modules/logging/appendencoder.go:81— modules/logging/appendencoder.go:81-89 | REDACTED:87-95 | modules/logging/journaldencoder.go:71-78 — before extracting anything, compare `modules/logging/appendencoder.go` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `modules/logging/appendencoder.go:81` 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 (5 lines × 2) REDACTED:1776— REDACTED:1776-1780 | REDACTED:1122-1127 — 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:1776` 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 (5 lines × 2) caddyconfig/caddyfile/importargs.go:71— caddyconfig/caddyfile/importargs.go:71-75 | caddyconfig/caddyfile/importargs.go:80-84 — 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 `caddyconfig/caddyfile/importargs.go:71` 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 (7 lines × 3) REDACTED:1432— REDACTED:1432-1438 | REDACTED:967-976 | REDACTED:936-942 — 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 (7 lines × 3) REDACTED:215— REDACTED:215-221 | modules/caddyhttp/ip_matchers.go:146-152 | modules/caddyhttp/ip_matchers.go:253-259 — 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 (8 lines × 4) modules/caddyhttp/reverseproxy/caddyfile.go:1172— modules/caddyhttp/reverseproxy/caddyfile.go:1172-1179 | modules/caddyhttp/reverseproxy/caddyfile.go:1584-1591 | modules/caddyhttp/reverseproxy/caddyfile.go:1684-1691 | modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:90-97 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `modules/caddyhttp/reverseproxy/caddyfile.go:1172` 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 × 4) modules/caddyhttp/reverseproxy/caddyfile.go:1164— modules/caddyhttp/reverseproxy/caddyfile.go:1164-1171 | modules/caddyhttp/reverseproxy/caddyfile.go:1576-1583 | modules/caddyhttp/reverseproxy/caddyfile.go:1676-1683 | modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:82-89 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `modules/caddyhttp/reverseproxy/caddyfile.go:1164` 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.
Outbound HTTP without resilience cmd/commandfuncs.go:1007— `http.Client{` 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.
Outbound HTTP without resilience REDACTED:298— `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.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 1 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
Handler.UnmarshalCaddyfile (cyclomatic 255) modules/caddyhttp/reverseproxy/caddyfile.go:152— Handler.UnmarshalCaddyfile has cyclomatic complexity 255 (threshold 15). Of this number, 244 points are the body's own statements and 11 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.
ServerType.serversFromPairings (cyclomatic 131) REDACTED:566— ServerType.serversFromPairings has cyclomatic complexity 131 (threshold 15). Of this number, 114 points are the body's own statements and 17 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.
ServerType.buildTLSApp (cyclomatic 124) caddyconfig/httpcaddyfile/tlsapp.go:36— ServerType.buildTLSApp has cyclomatic complexity 124 (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.
httpcaddyfile.parseTLS (cyclomatic 121) caddyconfig/httpcaddyfile/builtins.go:119— httpcaddyfile.parseTLS has cyclomatic complexity 121 (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.
HTTPTransport.UnmarshalCaddyfile (cyclomatic 104) modules/caddyhttp/reverseproxy/caddyfile.go:1079— HTTPTransport.UnmarshalCaddyfile has cyclomatic complexity 104 (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.
httpcaddyfile.unmarshalCaddyfileServerOptions (cyclomatic 100) caddyconfig/httpcaddyfile/serveroptions.go:73— httpcaddyfile.unmarshalCaddyfileServerOptions has cyclomatic complexity 100 (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.
caddyhttp.addHTTPVarsToReplacer (cyclomatic 94) modules/caddyhttp/replacer.go:59— caddyhttp.addHTTPVarsToReplacer has cyclomatic complexity 94 (threshold 15). Most of this is not in the body itself: 1 of the 94 points is its own statement and the rest belongs to one function literal inside it that branches (line 62). 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.
lexer.next (cyclomatic 93) caddyconfig/caddyfile/lexer.go:173— lexer.next has cyclomatic complexity 93 (threshold 15). Of this number, 92 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.
App.automaticHTTPSPhase1 (cyclomatic 78) modules/caddyhttp/autohttps.go:77— App.automaticHTTPSPhase1 has cyclomatic complexity 78 (threshold 15). Of this number, 65 points are the body's own statements and 13 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.
ACMEIssuer.UnmarshalCaddyfile (cyclomatic 77) modules/caddytls/acmeissuer.go:448— ACMEIssuer.UnmarshalCaddyfile has cyclomatic complexity 77 (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.
FileServer.ServeHTTP (cyclomatic 70) REDACTED:322— FileServer.ServeHTTP 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.
httpcaddyfile.consolidateConnPolicies (cyclomatic 68) REDACTED:1226— httpcaddyfile.consolidateConnPolicies has cyclomatic complexity 68 (threshold 15). Of this number, 67 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.
ServerType.Setup (cyclomatic 68) REDACTED:59— ServerType.Setup has cyclomatic complexity 68 (threshold 15). Of this number, 63 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.
HTTPTransport.NewTransport (cyclomatic 64) REDACTED:207— HTTPTransport.NewTransport has cyclomatic complexity 64 (threshold 15). Of this number, 38 points are the body's own statements and 26 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.
httpcaddyfile.parseLogHelper (cyclomatic 63) caddyconfig/httpcaddyfile/builtins.go:942— httpcaddyfile.parseLogHelper has cyclomatic complexity 63 (threshold 15). Of this number, 62 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.
caddyfile.formatTokens (cyclomatic 60) caddyconfig/caddyfile/formatter.go:486— caddyfile.formatTokens has cyclomatic complexity 60 (threshold 15). Of this number, 59 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.
httpcaddyfile.fillInGlobalACMEDefaults (cyclomatic 55) caddyconfig/httpcaddyfile/tlsapp.go:570— httpcaddyfile.fillInGlobalACMEDefaults has cyclomatic complexity 55 (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.
parser.doImport (cyclomatic 50) caddyconfig/caddyfile/parse.go:375— parser.doImport has cyclomatic complexity 50 (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.
App.Provision (cyclomatic 49) REDACTED:188— App.Provision has cyclomatic complexity 49 (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.
Handler.Provision (cyclomatic 49) modules/caddyhttp/reverseproxy/reverseproxy.go:308— Handler.Provision has cyclomatic complexity 49 (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.
reverseproxy.cmdReverseProxy (cyclomatic 48) modules/caddyhttp/reverseproxy/command.go:87— reverseproxy.cmdReverseProxy 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.
Server.ServeHTTP (cyclomatic 47) modules/caddyhttp/server.go:598— Server.ServeHTTP has cyclomatic complexity 47 (threshold 15). Of this number, 41 points are the body's own statements and 6 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.
FileWriter.UnmarshalCaddyfile (cyclomatic 46) modules/logging/filewriter.go:387— FileWriter.UnmarshalCaddyfile has cyclomatic complexity 46 (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.
MatchFile.selectFile (cyclomatic 45) modules/caddyhttp/fileserver/matcher.go:333— MatchFile.selectFile has cyclomatic complexity 45 (threshold 15). Of this number, 32 points are the body's own statements and 13 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.
TLS.publishECHConfigs (cyclomatic 45) REDACTED:333— TLS.publishECHConfigs has cyclomatic complexity 45 (threshold 15). Of this number, 42 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.
TLS.Provision (cyclomatic 45) REDACTED:166— TLS.Provision has cyclomatic complexity 45 (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.
caddy.unsyncedConfigAccess (cyclomatic 44) REDACTED:1180— caddy.unsyncedConfigAccess has cyclomatic complexity 44 (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.
httpcaddyfile.parsePKIApp (cyclomatic 42) caddyconfig/httpcaddyfile/pkiapp.go:56— httpcaddyfile.parsePKIApp has cyclomatic complexity 42 (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.
FileServer.UnmarshalCaddyfile (cyclomatic 40) modules/caddyhttp/fileserver/caddyfile.go:67— FileServer.UnmarshalCaddyfile 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.
Rewrite.Rewrite (cyclomatic 40) modules/caddyhttp/rewrite/rewrite.go:158— Rewrite.Rewrite has cyclomatic complexity 40 (threshold 15). Of this number, 38 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.
App.createAutomationPolicies (cyclomatic 39) modules/caddyhttp/autohttps.go:597— App.createAutomationPolicies 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.
HeaderOps.ApplyTo (cyclomatic 39) modules/caddyhttp/headers/headers.go:234— HeaderOps.ApplyTo 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.
caddyhttp.getTLSReplacement (cyclomatic 37) modules/caddyhttp/replacer.go:491— caddyhttp.getTLSReplacement has cyclomatic complexity 37 (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.
App.Start (cyclomatic 37) REDACTED:480— App.Start has cyclomatic complexity 37 (threshold 15). Of this number, 36 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.
fastcgi.parsePHPFastCGI (cyclomatic 36) modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:172— fastcgi.parsePHPFastCGI 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.
caddycmd.cmdFmt (cyclomatic 35) cmd/commandfuncs.go:681— caddycmd.cmdFmt has cyclomatic complexity 35 (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.
ConnectionPolicy.UnmarshalCaddyfile (cyclomatic 35) REDACTED:491— ConnectionPolicy.UnmarshalCaddyfile has cyclomatic complexity 35 (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.
Handler.doActiveHealthCheck (cyclomatic 34) modules/caddyhttp/reverseproxy/healthchecks.go:391— Handler.doActiveHealthCheck has cyclomatic complexity 34 (threshold 15). Of this number, 25 points are the body's own statements and 9 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.
Handler.proxyLoopIteration (cyclomatic 32) modules/caddyhttp/reverseproxy/reverseproxy.go:749— Handler.proxyLoopIteration 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.
caddyhttp.cmdRespond (cyclomatic 31) modules/caddyhttp/staticresp.go:316— caddyhttp.cmdRespond 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.
TLSConfig.MakeTLSClientConfig (cyclomatic 31) REDACTED:798— TLSConfig.MakeTLSClientConfig has cyclomatic complexity 31 (threshold 15). Of this number, 28 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.
ACMEIssuer.Provision (cyclomatic 31) modules/caddytls/acmeissuer.go:129— ACMEIssuer.Provision 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.
caddycmd.cmdRun (cyclomatic 30) cmd/commandfuncs.go:189— caddycmd.cmdRun has cyclomatic complexity 30 (threshold 15). Of this number, 29 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.
acmeserver.parseACMEServer (cyclomatic 30) modules/caddypki/acmeserver/caddyfile.go:45— acmeserver.parseACMEServer 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.
ZeroSSLIssuer.UnmarshalCaddyfile (cyclomatic 30) modules/caddytls/zerosslissuer.go:138— ZeroSSLIssuer.UnmarshalCaddyfile 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.
App.stop (cyclomatic 29) REDACTED:723— App.stop has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 801, 783, 891). 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.
AUpstreams.UnmarshalCaddyfile (cyclomatic 29) modules/caddyhttp/reverseproxy/caddyfile.go:1623— AUpstreams.UnmarshalCaddyfile 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.
Server.serveHTTP (cyclomatic 29) modules/caddyhttp/server.go:846— Server.serveHTTP 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.
TLS.Start (cyclomatic 29) REDACTED:406— TLS.Start has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 443). 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.
FileWriter.OpenWriter (cyclomatic 29) modules/logging/filewriter.go:187— FileWriter.OpenWriter 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.
reverseproxy.parseUpstreamDialAddress (cyclomatic 28) modules/caddyhttp/reverseproxy/addresses.go:65— reverseproxy.parseUpstreamDialAddress 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.
Handler.prepareRequest (cyclomatic 28) modules/caddyhttp/reverseproxy/reverseproxy.go:920— Handler.prepareRequest has cyclomatic complexity 28 (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.
SRVUpstreams.UnmarshalCaddyfile (cyclomatic 28) modules/caddyhttp/reverseproxy/caddyfile.go:1517— SRVUpstreams.UnmarshalCaddyfile 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.
ClientAuthentication.UnmarshalCaddyfile (cyclomatic 28) REDACTED:664— ClientAuthentication.UnmarshalCaddyfile 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.
Handler.finalizeResponse (cyclomatic 27) modules/caddyhttp/reverseproxy/reverseproxy.go:1396— Handler.finalizeResponse has cyclomatic complexity 27 (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.
ConnectionPolicy.buildStandardTLSConfig (cyclomatic 27) REDACTED:279— ConnectionPolicy.buildStandardTLSConfig has cyclomatic complexity 27 (threshold 15). Of this number, 24 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.
LogEncoderConfig.ZapcoreEncoderConfig (cyclomatic 27) modules/logging/encoders.go:203— LogEncoderConfig.ZapcoreEncoderConfig has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
httpcaddyfile.consolidateAutomationPolicies (cyclomatic 26) caddyconfig/httpcaddyfile/tlsapp.go:1067— httpcaddyfile.consolidateAutomationPolicies has cyclomatic complexity 26 (threshold 15). Of this number, 24 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.
caddycmd.cmdListModules (cyclomatic 26) cmd/commandfuncs.go:434— caddycmd.cmdListModules has cyclomatic complexity 26 (threshold 15). Of this number, 18 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.
caddy.Version (cyclomatic 25) caddy.go:1001— caddy.Version 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.
FileServer.Provision (cyclomatic 25) REDACTED:196— FileServer.Provision 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.
Transport.buildEnv (cyclomatic 25) modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go:265— Transport.buildEnv has cyclomatic complexity 25 (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.
Handler.reverseProxy (cyclomatic 25) modules/caddyhttp/reverseproxy/reverseproxy.go:1176— Handler.reverseProxy has cyclomatic complexity 25 (threshold 15). Of this number, 24 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.
AutomationPolicy.makeCertMagicConfig (cyclomatic 25) REDACTED:272— AutomationPolicy.makeCertMagicConfig has cyclomatic complexity 25 (threshold 15). Of this number, 14 points are the body's own statements and 11 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.
CustomLog.loggerAllowed (cyclomatic 24) logging.go:533— CustomLog.loggerAllowed 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.
App.Emit (cyclomatic 24) REDACTED:219— App.Emit has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 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.
FileServer.serveBrowse (cyclomatic 24) REDACTED:78— FileServer.serveBrowse 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.
echConfig.UnmarshalBinary (cyclomatic 24) REDACTED:998— echConfig.UnmarshalBinary has cyclomatic complexity 24 (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.
ServerType.listenersForServerBlockAddress (cyclomatic 23) caddyconfig/httpcaddyfile/addresses.go:270— ServerType.listenersForServerBlockAddress 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.
caddycmd.loadConfigWithLogger (cyclomatic 23) cmd/main.go:145— caddycmd.loadConfigWithLogger 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.
Context.LoadModule (cyclomatic 23) context.go:188— Context.LoadModule 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.
headers.parseCaddyfile (cyclomatic 23) modules/caddyhttp/headers/caddyfile.go:49— headers.parseCaddyfile has cyclomatic complexity 23 (threshold 15). Of this number, 22 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.
ECH.rotateECHKeys (cyclomatic 23) REDACTED:192— ECH.rotateECHKeys has cyclomatic complexity 23 (threshold 15). Of this number, 20 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.
Replacer.replace (cyclomatic 23) replacer.go:175— Replacer.replace 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.
caddy.replaceRemoteAdminServer (cyclomatic 22) REDACTED:511— caddy.replaceRemoteAdminServer has cyclomatic complexity 22 (threshold 15). Of this number, 19 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.
httpcaddyfile.newBaseAutomationPolicy (cyclomatic 22) caddyconfig/httpcaddyfile/tlsapp.go:1001— httpcaddyfile.newBaseAutomationPolicy has cyclomatic complexity 22 (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.
Transport.UnmarshalCaddyfile (cyclomatic 22) modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:50— Transport.UnmarshalCaddyfile 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.
Handler.addForwardedHeaders (cyclomatic 22) modules/caddyhttp/reverseproxy/reverseproxy.go:1074— Handler.addForwardedHeaders 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.
StaticResponse.ServeHTTP (cyclomatic 22) modules/caddyhttp/staticresp.go:181— StaticResponse.ServeHTTP 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.
ConnectionPolicies.TLSConfig (cyclomatic 22) REDACTED:98— ConnectionPolicies.TLSConfig has cyclomatic complexity 22 (threshold 15). 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, 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.
caddyfile.isSingleUnbracedSite (cyclomatic 21) caddyconfig/caddyfile/formatter.go:151— caddyfile.isSingleUnbracedSite 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.
ServerType.buildPKIApp (cyclomatic 21) caddyconfig/httpcaddyfile/pkiapp.go:198— ServerType.buildPKIApp 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.
forwardauth.parseCaddyfile (cyclomatic 21) modules/caddyhttp/reverseproxy/forwardauth/caddyfile.go:64— forwardauth.parseCaddyfile 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.
Handler.ServeHTTP (cyclomatic 21) modules/caddyhttp/reverseproxy/reverseproxy.go:627— Handler.ServeHTTP 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.
LoadBalancing.tryAgain (cyclomatic 21) modules/caddyhttp/reverseproxy/reverseproxy.go:1544— LoadBalancing.tryAgain 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.
CA.Provision (cyclomatic 21) modules/caddypki/ca.go:99— CA.Provision has cyclomatic complexity 21 (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.
FilterEncoder.UnmarshalCaddyfile (cyclomatic 21) REDACTED:152— FilterEncoder.UnmarshalCaddyfile has cyclomatic complexity 21 (threshold 15). Of this number, 14 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.
ServerType.compileEncodedMatcherSets (cyclomatic 20) REDACTED:1625— ServerType.compileEncodedMatcherSets 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.
caddycmd.cmdExportStorage (cyclomatic 20) cmd/storagefuncs.go:135— caddycmd.cmdExportStorage 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.
rewrite.parseCaddyfileURI (cyclomatic 20) modules/caddyhttp/rewrite/caddyfile.go:97— rewrite.parseCaddyfileURI 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.
queryOps.do (cyclomatic 20) modules/caddyhttp/rewrite/rewrite.go:672— queryOps.do 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.
caddy.changeConfig (cyclomatic 19) caddy.go:158— caddy.changeConfig 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.
caddy.finishSettingUp (cyclomatic 19) caddy.go:594— caddy.finishSettingUp has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 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.
parser.addresses (cyclomatic 19) caddyconfig/caddyfile/parse.go:229— parser.addresses 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.
httpcaddyfile.detectConflictingSchemes (cyclomatic 19) REDACTED:1166— httpcaddyfile.detectConflictingSchemes has cyclomatic complexity 19 (threshold 15). Of this number, 14 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.
Context.LoadModuleByID (cyclomatic 19) context.go:366— Context.LoadModuleByID has cyclomatic complexity 19 (threshold 15). Of this number, 18 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.
browseTemplateContext.applySortAndLimit (cyclomatic 19) modules/caddyhttp/fileserver/browsetplcontext.go:229— browseTemplateContext.applySortAndLimit 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.
Handler.doActiveHealthCheckForAllHosts (cyclomatic 19) modules/caddyhttp/reverseproxy/healthchecks.go:297— Handler.doActiveHealthCheckForAllHosts 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 299). 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.
caddytls.tlsCertFromCertAndKeyPEMBundle (cyclomatic 19) modules/caddytls/folderloader.go:106— caddytls.tlsCertFromCertAndKeyPEMBundle 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.
AutomationPolicy.Provision (cyclomatic 19) REDACTED:182— AutomationPolicy.Provision 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.
TLS.cleanStorageUnits (cyclomatic 19) REDACTED:985— TLS.cleanStorageUnits 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.
parser.directive (cyclomatic 18) caddyconfig/caddyfile/parse.go:700— parser.directive 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.
ServerType.evaluateGlobalOptionsBlock (cyclomatic 18) REDACTED:385— ServerType.evaluateGlobalOptionsBlock 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.
caddycmd.cmdStart (cyclomatic 18) cmd/commandfuncs.go:46— caddycmd.cmdStart has cyclomatic complexity 18 (threshold 15). 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: 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.
caddycmd.atomicReplaceFormattedFile (cyclomatic 18) cmd/commandfuncs.go:869— caddycmd.atomicReplaceFormattedFile has cyclomatic complexity 18 (threshold 15). Of this number, 17 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.
fileserver.cmdFileServer (cyclomatic 18) modules/caddyhttp/fileserver/command.go:86— fileserver.cmdFileServer 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.
FileServer.directoryListing (cyclomatic 18) modules/caddyhttp/fileserver/browsetplcontext.go:37— FileServer.directoryListing 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.
Intercept.ServeHTTP (cyclomatic 18) modules/caddyhttp/intercept/intercept.go:115— Intercept.ServeHTTP has cyclomatic complexity 18 (threshold 15). Of this number, 13 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.
MatchPath.matchPatternWithEscapeSequence (cyclomatic 18) modules/caddyhttp/matchers.go:537— MatchPath.matchPatternWithEscapeSequence 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.
ActiveHealthChecks.Provision (cyclomatic 18) modules/caddyhttp/reverseproxy/healthchecks.go:137— ActiveHealthChecks.Provision has cyclomatic complexity 18 (threshold 15). Of this number, 17 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.
rewrite.buildQueryString (cyclomatic 18) modules/caddyhttp/rewrite/rewrite.go:366— rewrite.buildQueryString has cyclomatic complexity 18 (threshold 15). Of this number, 13 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.
Server.logRequest (cyclomatic 18) modules/caddyhttp/server.go:1392— Server.logRequest 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.
CustomCertSelectionPolicy.UnmarshalCaddyfile (cyclomatic 18) modules/caddytls/certselection.go:125— CustomCertSelectionPolicy.UnmarshalCaddyfile 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.
caddy.unsyncedDecodeAndRun (cyclomatic 17) caddy.go:337— caddy.unsyncedDecodeAndRun 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.
caddyhttp.matchHeaders (cyclomatic 17) modules/caddyhttp/matchers.go:1162— caddyhttp.matchHeaders 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.
caddyauth.cmdHashPassword (cyclomatic 17) modules/caddyhttp/caddyauth/command.go:91— caddyauth.cmdHashPassword 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.
headers.applyHeaderOp (cyclomatic 17) modules/caddyhttp/headers/caddyfile.go:239— headers.applyHeaderOp 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.
timeouts.parseCaddyfile (cyclomatic 17) modules/caddyhttp/timeouts/caddyfile.go:31— timeouts.parseCaddyfile 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.
httpcaddyfile.sortRoutes (cyclomatic 16) caddyconfig/httpcaddyfile/directives.go:456— httpcaddyfile.sortRoutes 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 462). 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.
httpcaddyfile.appendSubrouteToRouteList (cyclomatic 16) REDACTED:1389— httpcaddyfile.appendSubrouteToRouteList 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.
httpcaddyfile.buildSubroute (cyclomatic 16) REDACTED:1454— httpcaddyfile.buildSubroute 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.
httpcaddyfile.parseOptOnDemand (cyclomatic 16) caddyconfig/httpcaddyfile/options.go:404— httpcaddyfile.parseOptOnDemand 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.
caddycmd.cmdAdaptConfig (cyclomatic 16) cmd/commandfuncs.go:548— caddycmd.cmdAdaptConfig 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.
caddycmd.parseEnvFile (cyclomatic 16) cmd/main.go:384— caddycmd.parseEnvFile 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.
caddyhttp.CELMatcherDecorator (cyclomatic 16) REDACTED:484— caddyhttp.CELMatcherDecorator 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 485). 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.
caddyhttp.CELValueToMapStrList (cyclomatic 16) REDACTED:684— caddyhttp.CELValueToMapStrList has cyclomatic complexity 16 (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.
Encode.UnmarshalCaddyfile (cyclomatic 16) modules/caddyhttp/encode/caddyfile.go:59— Encode.UnmarshalCaddyfile 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.
MatchPath.MatchWithError (cyclomatic 16) modules/caddyhttp/matchers.go:429— MatchPath.MatchWithError 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.
CustomCertSelectionPolicy.SelectCertificate (cyclomatic 16) modules/caddytls/certselection.go:56— CustomCertSelectionPolicy.SelectCertificate 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.
ClientAuthentication.ConfigureTLSConfig (cyclomatic 16) REDACTED:844— ClientAuthentication.ConfigureTLSConfig 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.
Handler.UnmarshalCaddyfile (cognitive 559) modules/caddyhttp/reverseproxy/caddyfile.go:152— Handler.UnmarshalCaddyfile has cognitive complexity 559 (threshold 15). Drivers by points: if/else 170 (505 pts), boolean chains 19, loops 8 (19 pts), match/switch 6 (16 pts) (nesting depth added 356). Of this number, 548 points are the body's own statements and 11 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.
ServerType.serversFromPairings (cognitive 356) REDACTED:566— ServerType.serversFromPairings has cognitive complexity 356 (threshold 15). Drivers by points: if/else 68 (233 pts), loops 34 (98 pts), boolean chains 22, match/switch 1 (3 pts) (nesting depth added 231). Of this number, 321 points are the body's own statements and 35 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.
ServerType.buildTLSApp (cognitive 311) caddyconfig/httpcaddyfile/tlsapp.go:36— ServerType.buildTLSApp has cognitive complexity 311 (threshold 15). Drivers by points: if/else 83 (219 pts), loops 27 (78 pts), boolean chains 14 (nesting depth added 187). 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.
httpcaddyfile.unmarshalCaddyfileServerOptions (cognitive 240) caddyconfig/httpcaddyfile/serveroptions.go:73— httpcaddyfile.unmarshalCaddyfileServerOptions has cognitive complexity 240 (threshold 15). Drivers by points: if/else 54 (204 pts), loops 8 (22 pts), match/switch 3 (10 pts), boolean chains 4 (nesting depth added 171). 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.
lexer.next (cognitive 227) caddyconfig/caddyfile/lexer.go:173— lexer.next has cognitive complexity 227 (threshold 15). Drivers by points: if/else 62 (190 pts), boolean chains 24, loops 4 (13 pts) (nesting depth added 137). Of this number, 226 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.
httpcaddyfile.parseTLS (cognitive 226) caddyconfig/httpcaddyfile/builtins.go:119— httpcaddyfile.parseTLS has cognitive complexity 226 (threshold 15). Drivers by points: if/else 78 (202 pts), loops 6 (12 pts), boolean chains 8, match/switch 3 (4 pts) (nesting depth added 131). 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.
HTTPTransport.UnmarshalCaddyfile (cognitive 214) modules/caddyhttp/reverseproxy/caddyfile.go:1079— HTTPTransport.UnmarshalCaddyfile has cognitive complexity 214 (threshold 15). Drivers by points: if/else 67 (202 pts), match/switch 4 (11 pts), loops 1 (nesting depth added 142). 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.
App.automaticHTTPSPhase1 (cognitive 179) modules/caddyhttp/autohttps.go:77— App.automaticHTTPSPhase1 has cognitive complexity 179 (threshold 15). Drivers by points: if/else 40 (115 pts), loops 21 (46 pts), boolean chains 16, jumps 2 (nesting depth added 100). Of this number, 162 points are the body's own statements and 17 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.
ACMEIssuer.UnmarshalCaddyfile (cognitive 168) modules/caddytls/acmeissuer.go:448— ACMEIssuer.UnmarshalCaddyfile has cognitive complexity 168 (threshold 15). Drivers by points: if/else 56 (165 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 110). 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.
httpcaddyfile.consolidateConnPolicies (cognitive 165) REDACTED:1226— httpcaddyfile.consolidateConnPolicies has cognitive complexity 165 (threshold 15). Drivers by points: if/else 31 (135 pts), boolean chains 22, loops 3 (8 pts) (nesting depth added 109). Of this number, 164 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.
httpcaddyfile.parseLogHelper (cognitive 151) caddyconfig/httpcaddyfile/builtins.go:942— httpcaddyfile.parseLogHelper has cognitive complexity 151 (threshold 15). Drivers by points: if/else 45 (129 pts), loops 5 (13 pts), match/switch 3 (9 pts) (nesting depth added 98). Of this number, 150 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.
caddyhttp.addHTTPVarsToReplacer (cognitive 142) modules/caddyhttp/replacer.go:59— caddyhttp.addHTTPVarsToReplacer has cognitive complexity 142 (threshold 15). Drivers by points: if/else 48 (130 pts), boolean chains 6, loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 85). None of this is in the body itself: all 142 points belong to one function literal inside it that branches (line 62). 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.
httpcaddyfile.parsePKIApp (cognitive 140) caddyconfig/httpcaddyfile/pkiapp.go:56— httpcaddyfile.parsePKIApp has cognitive complexity 140 (threshold 15). Drivers by points: if/else 20 (107 pts), match/switch 4 (18 pts), loops 4 (14 pts), boolean chains 1 (nesting depth added 111). 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.
TLS.publishECHConfigs (cognitive 136) REDACTED:333— TLS.publishECHConfigs has cognitive complexity 136 (threshold 15). Drivers by points: if/else 29 (80 pts), loops 15 (53 pts), boolean chains 3 (nesting depth added 89). Of this number, 132 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.
FileServer.ServeHTTP (cognitive 125) REDACTED:322— FileServer.ServeHTTP has cognitive complexity 125 (threshold 15). Drivers by points: if/else 57 (111 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 55). 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.
ServerType.Setup (cognitive 120) REDACTED:59— ServerType.Setup has cognitive complexity 120 (threshold 15). Drivers by points: if/else 42 (81 pts), loops 16 (31 pts), boolean chains 8 (nesting depth added 54). Of this number, 116 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.
caddy.unsyncedConfigAccess (cognitive 114) REDACTED:1180— caddy.unsyncedConfigAccess has cognitive complexity 114 (threshold 15). Drivers by points: if/else 28 (97 pts), match/switch 3 (10 pts), boolean chains 5, jumps 1, loops 1 (nesting depth added 76). 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.
App.Provision (cognitive 111) REDACTED:188— App.Provision has cognitive complexity 111 (threshold 15). Drivers by points: if/else 38 (92 pts), loops 7 (16 pts), boolean chains 3 (nesting depth added 63). 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.
HeaderOps.ApplyTo (cognitive 101) modules/caddyhttp/headers/headers.go:234— HeaderOps.ApplyTo has cognitive complexity 101 (threshold 15). Drivers by points: if/else 18 (55 pts), loops 17 (42 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 63). 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.
FileWriter.UnmarshalCaddyfile (cognitive 101) modules/logging/filewriter.go:387— FileWriter.UnmarshalCaddyfile has cognitive complexity 101 (threshold 15). Drivers by points: if/else 25 (78 pts), loops 5 (15 pts), match/switch 3 (8 pts) (nesting depth added 68). 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.
App.Start (cognitive 99) REDACTED:480— App.Start has cognitive complexity 99 (threshold 15). Drivers by points: if/else 20 (72 pts), loops 6 (19 pts), boolean chains 8 (nesting depth added 65). Of this number, 97 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.
HTTPTransport.NewTransport (cognitive 99) REDACTED:207— HTTPTransport.NewTransport has cognitive complexity 99 (threshold 15). Drivers by points: if/else 47 (83 pts), boolean chains 8, match/switch 4 (8 pts) (nesting depth added 40). Of this number, 57 points are the body's own statements and 42 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.
parser.doImport (cognitive 95) caddyconfig/caddyfile/parse.go:375— parser.doImport has cognitive complexity 95 (threshold 15). Drivers by points: if/else 32 (65 pts), loops 7 (17 pts), boolean chains 9, match/switch 2 (4 pts) (nesting depth added 45). 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.UnmarshalCaddyfile (cognitive 92) modules/caddyhttp/fileserver/caddyfile.go:67— FileServer.UnmarshalCaddyfile has cognitive complexity 92 (threshold 15). Drivers by points: if/else 19 (67 pts), match/switch 4 (13 pts), loops 4 (12 pts) (nesting depth added 65). 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.ServeHTTP (cognitive 89) modules/caddyhttp/server.go:598— Server.ServeHTTP has cognitive complexity 89 (threshold 15). Drivers by points: if/else 36 (73 pts), boolean chains 8, loops 3 (8 pts) (nesting depth added 42). Of this number, 83 points are the body's own statements and 6 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.
Handler.Provision (cognitive 82) modules/caddyhttp/reverseproxy/reverseproxy.go:308— Handler.Provision has cognitive complexity 82 (threshold 15). Drivers by points: if/else 43 (76 pts), boolean chains 3, loops 3 (nesting depth added 33). 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.
MatchFile.selectFile (cognitive 81) modules/caddyhttp/fileserver/matcher.go:333— MatchFile.selectFile has cognitive complexity 81 (threshold 15). Drivers by points: if/else 24 (52 pts), loops 9 (21 pts), boolean chains 6, match/switch 2 (nesting depth added 40). Of this number, 64 points are the body's own statements and 17 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.
TLS.Provision (cognitive 76) REDACTED:166— TLS.Provision has cognitive complexity 76 (threshold 15). Drivers by points: if/else 33 (59 pts), loops 7 (12 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 32). 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.
App.createAutomationPolicies (cognitive 75) modules/caddyhttp/autohttps.go:597— App.createAutomationPolicies has cognitive complexity 75 (threshold 15). Drivers by points: if/else 33 (66 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 35). 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.
caddyfile.formatTokens (cognitive 73) caddyconfig/caddyfile/formatter.go:486— caddyfile.formatTokens has cognitive complexity 73 (threshold 15). Drivers by points: if/else 21 (46 pts), boolean chains 18, loops 4 (7 pts), match/switch 1 (2 pts) (nesting depth added 29). Of this number, 72 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.
fastcgi.parsePHPFastCGI (cognitive 72) modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:172— fastcgi.parsePHPFastCGI has cognitive complexity 72 (threshold 15). Drivers by points: if/else 23 (65 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 45). 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.
reverseproxy.cmdReverseProxy (cognitive 66) modules/caddyhttp/reverseproxy/command.go:87— reverseproxy.cmdReverseProxy has cognitive complexity 66 (threshold 15). Drivers by points: if/else 34 (48 pts), loops 5 (9 pts), boolean chains 6, match/switch 2 (3 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.
Rewrite.Rewrite (cognitive 66) modules/caddyhttp/rewrite/rewrite.go:158— Rewrite.Rewrite has cognitive complexity 66 (threshold 15). Drivers by points: if/else 26 (49 pts), boolean chains 9, loops 3 (4 pts), match/switch 1 (3 pts), jumps 1 (nesting depth added 26). Of this number, 64 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.
ConnectionPolicy.UnmarshalCaddyfile (cognitive 64) REDACTED:491— ConnectionPolicy.UnmarshalCaddyfile has cognitive complexity 64 (threshold 15). Drivers by points: if/else 21 (60 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 40). 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.
ZeroSSLIssuer.UnmarshalCaddyfile (cognitive 64) modules/caddytls/zerosslissuer.go:138— ZeroSSLIssuer.UnmarshalCaddyfile has cognitive complexity 64 (threshold 15). Drivers by points: if/else 22 (61 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 40). 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.
httpcaddyfile.fillInGlobalACMEDefaults (cognitive 63) caddyconfig/httpcaddyfile/tlsapp.go:570— httpcaddyfile.fillInGlobalACMEDefaults has cognitive complexity 63 (threshold 15). Drivers by points: if/else 25 (40 pts), boolean chains 23 (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.
ConnectionPolicies.TLSConfig (cognitive 62) REDACTED:98— ConnectionPolicies.TLSConfig has cognitive complexity 62 (threshold 15). Drivers by points: loops 9 (32 pts), if/else 10 (27 pts), boolean chains 2, jumps 1 (nesting depth added 40). Of this number, 52 points are the body's own statements and 10 belong to one function literal inside it that branches. 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.
TLS.Start (cognitive 62) REDACTED:406— TLS.Start has cognitive complexity 62 (threshold 15). Drivers by points: if/else 18 (49 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 35). Of this number, 20 points are the body's own statements and 42 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.
caddycmd.cmdFmt (cognitive 57) cmd/commandfuncs.go:681— caddycmd.cmdFmt has cognitive complexity 57 (threshold 15). Drivers by points: if/else 21 (34 pts), loops 4 (10 pts), match/switch 2 (8 pts), boolean chains 5 (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.
AUpstreams.UnmarshalCaddyfile (cognitive 56) modules/caddyhttp/reverseproxy/caddyfile.go:1623— AUpstreams.UnmarshalCaddyfile has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (46 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 35). 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.
ClientAuthentication.UnmarshalCaddyfile (cognitive 56) REDACTED:664— ClientAuthentication.UnmarshalCaddyfile has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (52 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 35). 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.
acmeserver.parseACMEServer (cognitive 55) modules/caddypki/acmeserver/caddyfile.go:45— acmeserver.parseACMEServer has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (38 pts), match/switch 3 (10 pts), loops 3 (7 pts) (nesting depth added 35). 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.serveHTTP (cognitive 54) modules/caddyhttp/server.go:846— Server.serveHTTP has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (46 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (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.
Handler.doActiveHealthCheck (cognitive 53) modules/caddyhttp/reverseproxy/healthchecks.go:391— Handler.doActiveHealthCheck has cognitive complexity 53 (threshold 15). Drivers by points: if/else 31 (49 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 19). Of this number, 38 points are the body's own statements and 15 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.
SRVUpstreams.UnmarshalCaddyfile (cognitive 53) modules/caddyhttp/reverseproxy/caddyfile.go:1517— SRVUpstreams.UnmarshalCaddyfile has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (50 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 33). 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.
Handler.proxyLoopIteration (cognitive 51) modules/caddyhttp/reverseproxy/reverseproxy.go:749— Handler.proxyLoopIteration has cognitive complexity 51 (threshold 15). Drivers by points: if/else 25 (44 pts), boolean chains 4, loops 1 (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.
Context.LoadModule (cognitive 50) context.go:188— Context.LoadModule has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (35 pts), loops 4 (13 pts), boolean chains 1, match/switch 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.
ACMEIssuer.Provision (cognitive 50) modules/caddytls/acmeissuer.go:129— ACMEIssuer.Provision has cognitive complexity 50 (threshold 15). Drivers by points: if/else 25 (46 pts), boolean chains 2, loops 1 (2 pts) (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.
httpcaddyfile.consolidateAutomationPolicies (cognitive 48) caddyconfig/httpcaddyfile/tlsapp.go:1067— httpcaddyfile.consolidateAutomationPolicies has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 4 (9 pts), boolean chains 4, jumps 2 (nesting depth added 26). Of this number, 46 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.
ServerType.buildPKIApp (cognitive 48) caddyconfig/httpcaddyfile/pkiapp.go:198— ServerType.buildPKIApp has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 7 (16 pts), boolean chains 1 (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.
reverseproxy.parseUpstreamDialAddress (cognitive 48) modules/caddyhttp/reverseproxy/addresses.go:65— reverseproxy.parseUpstreamDialAddress has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (39 pts), boolean chains 6, match/switch 1 (3 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.
RemoteAdmin.enforceAccessControls (cognitive 47) REDACTED:681— RemoteAdmin.enforceAccessControls has cognitive complexity 47 (threshold 15). Drivers by points: if/else 4 (24 pts), loops 6 (21 pts), boolean chains 2 (nesting depth added 35). 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.
caddyhttp.getTLSReplacement (cognitive 47) modules/caddyhttp/replacer.go:491— caddyhttp.getTLSReplacement has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (36 pts), match/switch 4 (9 pts), boolean chains 2 (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.
App.stop (cognitive 47) REDACTED:723— App.stop has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (28 pts), loops 8 (15 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 18). Of this number, 28 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.
forwardauth.parseCaddyfile (cognitive 47) modules/caddyhttp/reverseproxy/forwardauth/caddyfile.go:64— forwardauth.parseCaddyfile has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 6 (13 pts), match/switch 1 (3 pts) (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.
caddyhttp.cmdRespond (cognitive 46) modules/caddyhttp/staticresp.go:316— caddyhttp.cmdRespond has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (32 pts), loops 5 (8 pts), boolean chains 5, match/switch 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.
TLSConfig.MakeTLSClientConfig (cognitive 45) REDACTED:798— TLSConfig.MakeTLSClientConfig has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (32 pts), loops 4 (7 pts), boolean chains 5, match/switch 1 (nesting depth added 17). Of this number, 38 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.
caddy.Version (cognitive 44) caddy.go:1001— caddy.Version has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (37 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (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.
headers.parseCaddyfile (cognitive 44) modules/caddyhttp/headers/caddyfile.go:49— headers.parseCaddyfile has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (37 pts), loops 4 (7 pts) (nesting depth added 22). Of this number, 43 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.
ECH.rotateECHKeys (cognitive 44) REDACTED:192— ECH.rotateECHKeys has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (38 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 22). Of this number, 38 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.
caddy.finishSettingUp (cognitive 43) caddy.go:594— caddy.finishSettingUp has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (35 pts), match/switch 1 (4 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 27). Most of this is not in the body itself: 12 of the 43 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 636, 621). 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.
AutomationPolicy.makeCertMagicConfig (cognitive 43) REDACTED:272— AutomationPolicy.makeCertMagicConfig has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (37 pts), boolean chains 6 (nesting depth added 20). Of this number, 16 points are the body's own statements and 27 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.
ServerType.mapAddressToProtocolToServerBlocks (cognitive 41) caddyconfig/httpcaddyfile/addresses.go:80— ServerType.mapAddressToProtocolToServerBlocks has cognitive complexity 41 (threshold 15). Drivers by points: loops 9 (24 pts), if/else 5 (17 pts) (nesting depth added 27). 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.
caddycmd.cmdRun (cognitive 41) cmd/commandfuncs.go:189— caddycmd.cmdRun has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (35 pts), boolean chains 4, match/switch 2 (nesting depth added 12). Of this number, 39 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.
Handler.reverseProxy (cognitive 41) modules/caddyhttp/reverseproxy/reverseproxy.go:1176— Handler.reverseProxy has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 17). Of this number, 40 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.
queryOps.do (cognitive 41) modules/caddyhttp/rewrite/rewrite.go:672— queryOps.do has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 8 (14 pts), boolean chains 1 (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.
caddycmd.loadConfigWithLogger (cognitive 40) cmd/main.go:145— caddycmd.loadConfigWithLogger has cognitive complexity 40 (threshold 15). Drivers by points: if/else 22 (37 pts), loops 1 (2 pts), 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.
FilterEncoder.UnmarshalCaddyfile (cognitive 40) REDACTED:152— FilterEncoder.UnmarshalCaddyfile has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (30 pts), loops 4 (8 pts), match/switch 1 (2 pts) (nesting depth added 20). Of this number, 33 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.
caddycmd.cmdListModules (cognitive 39) cmd/commandfuncs.go:434— caddycmd.cmdListModules has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 5 (11 pts), boolean chains 5 (nesting depth added 14). Of this number, 27 points are the body's own statements and 12 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.
App.Emit (cognitive 39) REDACTED:219— App.Emit has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 3 (6 pts), match/switch 2 (5 pts) (nesting depth added 21). Of this number, 35 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.
Transport.UnmarshalCaddyfile (cognitive 39) modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:50— Transport.UnmarshalCaddyfile has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (36 pts), match/switch 1 (2 pts), loops 1 (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.
caddytls.tlsCertFromCertAndKeyPEMBundle (cognitive 39) modules/caddytls/folderloader.go:106— caddytls.tlsCertFromCertAndKeyPEMBundle has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (36 pts), boolean chains 2, loops 1 (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.
FileServer.Provision (cognitive 38) REDACTED:196— FileServer.Provision has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 3 (4 pts), boolean chains 3, match/switch 1 (3 pts) (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.
Handler.doActiveHealthCheckForAllHosts (cognitive 38) modules/caddyhttp/reverseproxy/healthchecks.go:297— Handler.doActiveHealthCheckForAllHosts has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 2, loops 1 (nesting depth added 20). Most of this is not in the body itself: 1 of the 38 points is its own statement and the rest belongs to one function literal inside it that branches (line 299). 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.
FileWriter.OpenWriter (cognitive 38) modules/logging/filewriter.go:187— FileWriter.OpenWriter has cognitive complexity 38 (threshold 15). Drivers by points: if/else 23 (34 pts), boolean chains 3, match/switch 1 (nesting depth added 11). Of this number, 37 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.
Replacer.replace (cognitive 38) replacer.go:175— Replacer.replace has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 4, loops 2 (3 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.
parser.addresses (cognitive 37) caddyconfig/caddyfile/parse.go:229— parser.addresses has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (32 pts), boolean chains 4, loops 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.
ServerType.evaluateGlobalOptionsBlock (cognitive 37) REDACTED:385— ServerType.evaluateGlobalOptionsBlock has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (33 pts), loops 2 (3 pts), boolean chains 1 (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.
caddycmd.cmdExportStorage (cognitive 37) cmd/storagefuncs.go:135— caddycmd.cmdExportStorage has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 1, loops 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.
MatchPath.matchPatternWithEscapeSequence (cognitive 37) modules/caddyhttp/matchers.go:537— MatchPath.matchPatternWithEscapeSequence has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (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.
timeouts.parseCaddyfile (cognitive 37) modules/caddyhttp/timeouts/caddyfile.go:31— timeouts.parseCaddyfile has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (32 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (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.
CustomCertSelectionPolicy.SelectCertificate (cognitive 37) modules/caddytls/certselection.go:56— CustomCertSelectionPolicy.SelectCertificate has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 3 (7 pts), boolean chains 1, jumps 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.
ServerType.consolidateAddrMappings (cognitive 36) caddyconfig/httpcaddyfile/addresses.go:195— ServerType.consolidateAddrMappings has cognitive complexity 36 (threshold 15). Drivers by points: loops 9 (23 pts), if/else 2 (11 pts), boolean chains 2 (nesting depth added 23). 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.
FileServer.directoryListing (cognitive 36) modules/caddyhttp/fileserver/browsetplcontext.go:37— FileServer.directoryListing has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (32 pts), boolean chains 3, loops 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.
ConnectionPolicy.buildStandardTLSConfig (cognitive 36) REDACTED:279— ConnectionPolicy.buildStandardTLSConfig has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 4, loops 2 (nesting depth added 10). Of this number, 32 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.
CustomLog.loggerAllowed (cognitive 35) logging.go:533— CustomLog.loggerAllowed has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 10, 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.
MatchPath.MatchWithError (cognitive 35) modules/caddyhttp/matchers.go:429— MatchPath.MatchWithError has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (33 pts), boolean chains 1, loops 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.
TLS.cleanStorageUnits (cognitive 35) REDACTED:985— TLS.cleanStorageUnits has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 3, loops 1 (2 pts) (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.
caddy.replaceRemoteAdminServer (cognitive 34) REDACTED:511— caddy.replaceRemoteAdminServer has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 13). Of this number, 30 points are the body's own statements and 4 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.
ServerType.listenersForServerBlockAddress (cognitive 34) caddyconfig/httpcaddyfile/addresses.go:270— ServerType.listenersForServerBlockAddress has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 5 (10 pts), boolean chains 3, match/switch 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.
FileServer.serveBrowse (cognitive 34) REDACTED:78— FileServer.serveBrowse has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 2, loops 1 (2 pts), match/switch 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.
Transport.buildEnv (cognitive 34) modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go:265— Transport.buildEnv has cognitive complexity 34 (threshold 15). Drivers by points: if/else 22 (29 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). 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.
CustomCertSelectionPolicy.UnmarshalCaddyfile (cognitive 34) modules/caddytls/certselection.go:125— CustomCertSelectionPolicy.UnmarshalCaddyfile has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 2 (4 pts), match/switch 1 (2 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.
Context.LoadModuleByID (cognitive 33) context.go:366— Context.LoadModuleByID has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (33 pts) (nesting depth added 15). Of this number, 31 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.
templates.parseCaddyfile (cognitive 33) modules/caddyhttp/templates/caddyfile.go:36— templates.parseCaddyfile has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (27 pts), loops 2 (4 pts), match/switch 1 (2 pts) (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.
ServerType.compileEncodedMatcherSets (cognitive 32) REDACTED:1625— ServerType.compileEncodedMatcherSets has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 5, loops 4 (5 pts) (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.
caddyauth.cmdHashPassword (cognitive 32) modules/caddyhttp/caddyauth/command.go:91— caddyauth.cmdHashPassword has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 1, match/switch 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.
Metrics.scanConfigForHosts (cognitive 31) modules/caddyhttp/metrics.go:232— Metrics.scanConfigForHosts has cognitive complexity 31 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 4 (15 pts) (nesting depth added 22). 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.
Handler.prepareRequest (cognitive 31) modules/caddyhttp/reverseproxy/reverseproxy.go:920— Handler.prepareRequest has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 7, 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.
Handler.addForwardedHeaders (cognitive 31) modules/caddyhttp/reverseproxy/reverseproxy.go:1074— Handler.addForwardedHeaders has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 3, loops 1 (3 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.
Handler.finalizeResponse (cognitive 31) modules/caddyhttp/reverseproxy/reverseproxy.go:1396— Handler.finalizeResponse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 6). 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.
ECHDNSPublisher.PublishECHConfigList (cognitive 31) REDACTED:851— ECHDNSPublisher.PublishECHConfigList has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (3 pts), boolean chains 2, jumps 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.
httpcaddyfile.detectConflictingSchemes (cognitive 30) REDACTED:1166— httpcaddyfile.detectConflictingSchemes has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 13). 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, 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.
Encode.UnmarshalCaddyfile (cognitive 30) modules/caddyhttp/encode/caddyfile.go:59— Encode.UnmarshalCaddyfile has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 2, match/switch 1 (2 pts), 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.
rewrite.parseCaddyfileURI (cognitive 30) modules/caddyhttp/rewrite/caddyfile.go:97— rewrite.parseCaddyfileURI has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (25 pts), match/switch 2 (3 pts), loops 1 (2 pts) (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.
caddy.changeConfig (cognitive 29) caddy.go:158— caddy.changeConfig has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 2, match/switch 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.
httpcaddyfile.parseHandleErrors (cognitive 29) caddyconfig/httpcaddyfile/builtins.go:829— httpcaddyfile.parseHandleErrors has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 1 (2 pts) (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.
httpcaddyfile.appendSubrouteToRouteList (cognitive 29) REDACTED:1389— httpcaddyfile.appendSubrouteToRouteList has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (9 pts), boolean chains 4, 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.
httpcaddyfile.parseOptOnDemand (cognitive 29) caddyconfig/httpcaddyfile/options.go:404— httpcaddyfile.parseOptOnDemand has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (26 pts), match/switch 1 (2 pts), loops 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.
caddyhttp.ParseNamedResponseMatcher (cognitive 29) modules/caddyhttp/responsematchers.go:69— caddyhttp.ParseNamedResponseMatcher has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (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.
fileserver.cmdFileServer (cognitive 29) modules/caddyhttp/fileserver/command.go:86— fileserver.cmdFileServer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (26 pts), loops 1 (2 pts), match/switch 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.
MatchHost.MatchWithError (cognitive 29) modules/caddyhttp/matchers.go:307— MatchHost.MatchWithError has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (4 pts), boolean chains 2, jumps 1 (nesting depth added 14). Of this number, 27 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.
Tracing.UnmarshalCaddyfile (cognitive 29) modules/caddyhttp/tracing/module.go:80— Tracing.UnmarshalCaddyfile has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 16). Of this number, 26 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.
httpcaddyfile.buildSubroute (cognitive 28) REDACTED:1454— httpcaddyfile.buildSubroute has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 5 (7 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.
caddyhttp.matchHeaders (cognitive 28) modules/caddyhttp/matchers.go:1162— caddyhttp.matchHeaders has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 pts), match/switch 1 (4 pts), boolean chains 3, jumps 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.
Authentication.ServeHTTP (cognitive 28) REDACTED:89— Authentication.ServeHTTP has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 1, 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.
Handler.ServeHTTP (cognitive 28) modules/caddyhttp/reverseproxy/reverseproxy.go:627— Handler.ServeHTTP has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 4, 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.
LoadBalancing.tryAgain (cognitive 28) modules/caddyhttp/reverseproxy/reverseproxy.go:1544— LoadBalancing.tryAgain has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 6, match/switch 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.
CookieHashSelection.UnmarshalCaddyfile (cognitive 28) REDACTED:742— CookieHashSelection.UnmarshalCaddyfile has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (24 pts), match/switch 2 (3 pts), loops 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.
caddyfile.isSingleUnbracedSite (cognitive 27) caddyconfig/caddyfile/formatter.go:151— caddyfile.isSingleUnbracedSite has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 5, loops 2, match/switch 1 (2 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.
caddycmd.parseEnvFile (cognitive 27) cmd/main.go:384— caddycmd.parseEnvFile has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4, 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.
Intercept.UnmarshalCaddyfile (cognitive 27) modules/caddyhttp/intercept/intercept.go:232— Intercept.UnmarshalCaddyfile has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 1 (2 pts), boolean chains 1, loops 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.
maphandler.parseCaddyfile (cognitive 27) modules/caddyhttp/map/caddyfile.go:44— maphandler.parseCaddyfile has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 5 (9 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.
StaticResponse.ServeHTTP (cognitive 27) modules/caddyhttp/staticresp.go:181— StaticResponse.ServeHTTP has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 6, loops 2 (3 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.
CA.Provision (cognitive 27) modules/caddypki/ca.go:99— CA.Provision has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 2 (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.
caddytls.ParseCaddyfilePreferredChainsOptions (cognitive 27) modules/caddytls/acmeissuer.go:699— caddytls.ParseCaddyfilePreferredChainsOptions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 1 (2 pts), boolean chains 1, loops 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.
AutomationPolicy.Provision (cognitive 27) REDACTED:182— AutomationPolicy.Provision has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 4 (6 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.
TLSConfig.unmarshalCaddyfile (cognitive 27) REDACTED:539— TLSConfig.unmarshalCaddyfile has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (21 pts), match/switch 2 (5 pts), loops 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.
TLS.Cleanup (cognitive 27) REDACTED:522— TLS.Cleanup has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (4 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.
parser.directive (cognitive 26) caddyconfig/caddyfile/parse.go:700— parser.directive has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 5, 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.
caddyhttp.CELValueToMapStrList (cognitive 26) REDACTED:684— caddyhttp.CELValueToMapStrList has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (9 pts), match/switch 2 (6 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.
Transport.splitPos (cognitive 26) modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go:468— Transport.splitPos has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (6 pts), boolean chains 2 (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.
httpcaddyfile.parseSegmentAsConfig (cognitive 25) caddyconfig/httpcaddyfile/directives.go:366— httpcaddyfile.parseSegmentAsConfig has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 5 (10 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.
Intercept.ServeHTTP (cognitive 25) modules/caddyhttp/intercept/intercept.go:115— Intercept.ServeHTTP has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 3, loops 2 (nesting depth added 6). Of this number, 15 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.
push.parseCaddyfile (cognitive 25) modules/caddyhttp/push/caddyfile.go:46— push.parseCaddyfile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 2 (6 pts), loops 2 (4 pts) (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.
Server.logRequest (cognitive 25) modules/caddyhttp/server.go:1392— Server.logRequest has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 4, 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.
AppendEncoder.UnmarshalCaddyfile (cognitive 25) modules/logging/appendencoder.go:130— AppendEncoder.UnmarshalCaddyfile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 14). Of this number, 22 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.
caddycmd.overwriteFormattedFiles (cognitive 24) cmd/commandfuncs.go:820— caddycmd.overwriteFormattedFiles has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2, 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.
rewrite.buildQueryString (cognitive 24) modules/caddyhttp/rewrite/rewrite.go:366— rewrite.buildQueryString has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 8). Of this number, 19 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.
HTTPCertPool.Provision (cognitive 24) REDACTED:660— HTTPCertPool.Provision has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (3 pts), boolean chains 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.
TLS.HandleHTTPChallenge (cognitive 24) REDACTED:810— TLS.HandleHTTPChallenge has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (19 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.
IPMaskFilter.UnmarshalCaddyfile (cognitive 24) modules/logging/filters.go:173— IPMaskFilter.UnmarshalCaddyfile has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 1 (2 pts), loops 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.
httpcaddyfile.applyServerOptions (cognitive 23) caddyconfig/httpcaddyfile/serveroptions.go:412— httpcaddyfile.applyServerOptions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3, boolean chains 1 (nesting depth added 10). Of this number, 22 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.
HTTPLoader.makeClient (cognitive 23) REDACTED:170— HTTPLoader.makeClient has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (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.
caddycmd.cmdImportStorage (cognitive 23) cmd/storagefuncs.go:63— caddycmd.cmdImportStorage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 1, 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.
ConnectionPolicies.Provision (cognitive 23) REDACTED:52— ConnectionPolicies.Provision has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (6 pts), boolean chains 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.
caddy.indexConfigObjects (cognitive 22) caddy.go:290— caddy.indexConfigObjects has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 2 (5 pts), loops 2 (4 pts) (nesting depth added 14). 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.
caddy.listenReusable (cognitive 22) listen_unix.go:108— caddy.listenReusable has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (22 pts) (nesting depth added 8). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 43, 67, 88). 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.
caddyfile.hasUnformattableToken (cognitive 22) caddyconfig/caddyfile/formatter.go:373— caddyfile.hasUnformattableToken has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5, 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.
App.Validate (cognitive 22) REDACTED:426— App.Validate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (13 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.
MatchFile.UnmarshalCaddyfile (cognitive 22) modules/caddyhttp/fileserver/matcher.go:132— MatchFile.UnmarshalCaddyfile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 2 (3 pts), match/switch 1 (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.
headers.applyHeaderOp (cognitive 22) modules/caddyhttp/headers/caddyfile.go:239— headers.applyHeaderOp has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 1, match/switch 1 (nesting depth added 10). 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.
TLS.Manage (cognitive 22) REDACTED:605— TLS.Manage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (4 pts), boolean chains 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.
network.SRV (cognitive 22) modules/internal/network/dynamicupstreams.go:59— network.SRV has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (3 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.
caddyhttp.CELMatcherDecorator (cognitive 21) REDACTED:484— caddyhttp.CELMatcherDecorator has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 2 (nesting depth added 6). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 485). 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.
Zstd.UnmarshalCaddyfile (cognitive 21) modules/caddyhttp/encode/zstd/zstd.go:53— Zstd.UnmarshalCaddyfile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 2 (3 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.
fileserver.parseTryFiles (cognitive 21) modules/caddyhttp/fileserver/caddyfile.go:262— fileserver.parseTryFiles has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (5 pts), loops 2 (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.
fileserver.fileHidden (cognitive 21) REDACTED:743— fileserver.fileHidden has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (4 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.
ActiveHealthChecks.Provision (cognitive 21) modules/caddyhttp/reverseproxy/healthchecks.go:137— ActiveHealthChecks.Provision has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (17 pts), loops 3 (4 pts) (nesting depth added 4). Of this number, 20 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.
templates.extractFrontMatter (cognitive 21) modules/caddyhttp/templates/frontmatter.go:13— templates.extractFrontMatter has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 3 (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.
StoragePool.Provision (cognitive 21) REDACTED:406— StoragePool.Provision has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 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.
ServerType.extractNamedRoutes (cognitive 20) REDACTED:475— ServerType.extractNamedRoutes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 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.
caddycmd.cmdStart (cognitive 20) cmd/commandfuncs.go:46— caddycmd.cmdStart has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 2, match/switch 1 (nesting depth added 4). Of this number, 12 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.
caddycmd.cmdAdaptConfig (cognitive 20) cmd/commandfuncs.go:548— caddycmd.cmdAdaptConfig has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 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.
NetworkAddress.listen (cognitive 20) REDACTED:150— NetworkAddress.listen has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 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.
Logging.Logger (cognitive 20) logging.go:219— Logging.Logger has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). 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.
TLS.Validate (cognitive 20) REDACTED:374— TLS.Validate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (5 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.
caddy.provisionContext (cognitive 19) caddy.go:484— caddy.provisionContext has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 540, 505, 573). 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.
httpcaddyfile.newBaseAutomationPolicy (cognitive 19) caddyconfig/httpcaddyfile/tlsapp.go:1001— httpcaddyfile.newBaseAutomationPolicy has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, loops 1 (2 pts) (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.
caddycmd.getModules (cognitive 19) REDACTED:224— caddycmd.getModules has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 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.
CustomLog.provision (cognitive 19) logging.go:490— CustomLog.provision has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (7 pts), boolean chains 2, jumps 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.
Intercept.FinalizeUnmarshalCaddyfile (cognitive 19) modules/caddyhttp/intercept/intercept.go:300— Intercept.FinalizeUnmarshalCaddyfile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 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.
Handler.FinalizeUnmarshalCaddyfile (cognitive 19) modules/caddyhttp/reverseproxy/caddyfile.go:981— Handler.FinalizeUnmarshalCaddyfile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 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.
StaticResponse.UnmarshalCaddyfile (cognitive 19) modules/caddyhttp/staticresp.go:141— StaticResponse.UnmarshalCaddyfile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (3 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.
caddytls.loadECHConfig (cognitive 19) REDACTED:559— caddytls.loadECHConfig has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (19 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.
ACMEIssuer.makeIssuerTemplate (cognitive 19) modules/caddytls/acmeissuer.go:254— ACMEIssuer.makeIssuerTemplate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (19 pts) (nesting depth added 7). Of this number, 17 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.
ECH.Provision (cognitive 19) REDACTED:80— ECH.Provision has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 6). 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.
MultiRegexpFilter.UnmarshalCaddyfile (cognitive 19) modules/logging/filters.go:871— MultiRegexpFilter.UnmarshalCaddyfile 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.
caddycmd.DetermineAdminAPIAddress (cognitive 18) cmd/commandfuncs.go:1038— caddycmd.DetermineAdminAPIAddress has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (18 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.
caddycmd.upgradeBuild (cognitive 18) REDACTED:132— caddycmd.upgradeBuild has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (17 pts), loops 1 (nesting depth added 3). 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, 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.
BaseLog.provisionCommon (cognitive 18) logging.go:342— BaseLog.provisionCommon has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (18 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.
caddyhttp.ParseCaddyfileNestedMatcherSet (cognitive 18) modules/caddyhttp/matchers.go:1690— caddyhttp.ParseCaddyfileNestedMatcherSet has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3, 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.
fileserver.hasWindowsShortName (cognitive 18) REDACTED:293— fileserver.hasWindowsShortName has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 6). Of this number, 17 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.
HeaderOps.Provision (cognitive 18) modules/caddyhttp/headers/headers.go:136— HeaderOps.Provision has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 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.
MatchHeader.UnmarshalCaddyfile (cognitive 18) modules/caddyhttp/matchers.go:1069— MatchHeader.UnmarshalCaddyfile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 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.
echConfig.UnmarshalBinary (cognitive 18) REDACTED:998— echConfig.UnmarshalBinary has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, loops 1 (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.
MatchRemoteIP.UnmarshalCaddyfile (cognitive 18) modules/caddytls/matchers.go:403— MatchRemoteIP.UnmarshalCaddyfile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 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.
caddy.exitProcess (cognitive 17) caddy.go:758— caddy.exitProcess has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2 (nesting depth added 3). Of this number, 9 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.
parser.begin (cognitive 17) caddyconfig/caddyfile/parse.go:158— parser.begin has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (2 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.
httpcaddyfile.sortRoutes (cognitive 17) caddyconfig/httpcaddyfile/directives.go:456— httpcaddyfile.sortRoutes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, loops 1 (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 462). 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.
httpcaddyfile.parseMatcherDefinitions (cognitive 17) REDACTED:1701— httpcaddyfile.parseMatcherDefinitions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2, boolean chains 1 (nesting depth added 4). Of this number, 12 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.
Tester.initServer (cognitive 17) REDACTED:131— Tester.initServer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 4 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.
HTTPBasicAuth.Provision (cognitive 17) REDACTED:79— HTTPBasicAuth.Provision has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, loops 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.
fileserver.isCELTryFilesLiteral (cognitive 17) modules/caddyhttp/fileserver/matcher.go:637— fileserver.isCELTryFilesLiteral has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 2 (4 pts), loops 1 (2 pts) (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.
browseTemplateContext.applySortAndLimit (cognitive 17) modules/caddyhttp/fileserver/browsetplcontext.go:229— browseTemplateContext.applySortAndLimit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (2 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.
FolderLoader.LoadCertificates (cognitive 17) modules/caddytls/folderloader.go:63— FolderLoader.LoadCertificates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (nesting depth added 8). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 70). 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.
NetWriter.UnmarshalCaddyfile (cognitive 17) modules/logging/netwriter.go:119— NetWriter.UnmarshalCaddyfile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), 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.
caddy.handleConfig (cognitive 16) REDACTED:1027— caddy.handleConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 8). 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.
caddy.run (cognitive 16) caddy.go:419— caddy.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (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 444, 430). 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.
caddy.ParseNetworkAddressWithDefaults (cognitive 16) REDACTED:324— caddy.ParseNetworkAddressWithDefaults has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 pts) (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.
caddyfile.makeArgsReplacer (cognitive 16) caddyconfig/caddyfile/importargs.go:98— caddyfile.makeArgsReplacer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 pts) (nesting depth added 7). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 100). 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.
ListenerWrapper.Provision (cognitive 16) modules/caddyhttp/proxyprotocol/listenerwrapper.go:89— ListenerWrapper.Provision has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4, boolean chains 1 (nesting depth added 4). 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 105). 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.
ListenerWrapper.UnmarshalCaddyfile (cognitive 16) modules/caddyhttp/proxyprotocol/module.go:41— ListenerWrapper.UnmarshalCaddyfile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), 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.
CookieHashSelection.Select (cognitive 16) REDACTED:678— CookieHashSelection.Select has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, loops 1 (nesting depth added 2). 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, 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.
MatcherSet.MatchWithError (cognitive 16) REDACTED:374— MatcherSet.MatchWithError has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (14 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.
StaticError.UnmarshalCaddyfile (cognitive 16) modules/caddyhttp/staticerror.go:62— StaticError.UnmarshalCaddyfile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 2 (3 pts), boolean chains 1, 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.
TemplateContext.funcMaybe (cognitive 16) modules/caddyhttp/templates/tplcontext.go:532— TemplateContext.funcMaybe has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (4 pts), match/switch 1 (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.
Timeouts.ServeHTTP (cognitive 16) modules/caddyhttp/timeouts/timeouts.go:89— Timeouts.ServeHTTP has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (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.
MatchURLPattern.UnmarshalCaddyfile (cognitive 16) modules/caddyhttp/urlpatternmatcher.go:207— MatchURLPattern.UnmarshalCaddyfile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (3 pts), match/switch 1 (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.
VarsMatcher.MatchWithError (cognitive 16) modules/caddyhttp/vars.go:177— VarsMatcher.MatchWithError has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), match/switch 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.
CA.loadOrGenRoot (cognitive 16) modules/caddypki/ca.go:277— CA.loadOrGenRoot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (16 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.
KeyPair.Load (cognitive 16) modules/caddypki/crypto.go:91— KeyPair.Load has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 1 (nesting depth added 9). 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.
ClientAuthentication.ConfigureTLSConfig (cognitive 16) REDACTED:844— ClientAuthentication.ConfigureTLSConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 1 (2 pts), match/switch 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.
TLS.AddAutomationPolicy (cognitive 16) REDACTED:859— TLS.AddAutomationPolicy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 pts), boolean chains 1, jumps 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.
FileStorage.UnmarshalCaddyfile (cognitive 16) modules/filestorage/filestorage.go:48— FileStorage.UnmarshalCaddyfile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (2 pts), 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.
LogEncoderConfig.ZapcoreEncoderConfig (cognitive 16) modules/logging/encoders.go:203— LogEncoderConfig.ZapcoreEncoderConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), match/switch 4 (5 pts) (nesting depth added 2). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. 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.
Duplicated block (62 lines × 2) modules/caddyhttp/intercept/intercept.go:301— modules/caddyhttp/intercept/intercept.go:301-362 | modules/caddyhttp/reverseproxy/caddyfile.go:982-1043 — 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 (41 lines × 2) modules/logging/filters.go:499— modules/logging/filters.go:499-539 | modules/logging/filters.go:622-662 — 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. 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 (38 lines × 2) modules/logging/appendencoder.go:146— modules/logging/appendencoder.go:146-183 | REDACTED:195-232 — before extracting anything, compare `modules/logging/appendencoder.go` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `modules/logging/appendencoder.go:146` 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 (37 lines × 2) modules/caddyhttp/intercept/intercept.go:250— modules/caddyhttp/intercept/intercept.go:250-286 | modules/caddyhttp/reverseproxy/caddyfile.go:883-919 — 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 `modules/caddyhttp/intercept/intercept.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 (31 lines × 2) modules/caddyhttp/vars.go:186— modules/caddyhttp/vars.go:186-216 | modules/caddyhttp/vars.go:332-362 — 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/caddyhttp/vars.go:186` 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 (30 lines × 2) modules/caddyhttp/matchers.go:1623— modules/caddyhttp/matchers.go:1623-1652 | modules/caddytls/matchers.go:202-231 — 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 (29 lines × 2) modules/caddytls/fileloader.go:88— modules/caddytls/fileloader.go:88-116 | modules/caddytls/storageloader.go:84-112 — 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 `modules/caddytls/fileloader.go:88` 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. 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 (27–28 lines × 2) listen.go:36— listen.go:36-63 | listen_unix.go:119-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 `listen_unix.go:119` 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 (25–27 lines × 2) modules/caddyhttp/matchers.go:1657— modules/caddyhttp/matchers.go:1657-1681 | modules/caddytls/matchers.go:236-262 — 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 `modules/caddyhttp/matchers.go:1657` 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 (27 lines × 2) modules/caddyhttp/reverseproxy/caddyfile.go:1557— modules/caddyhttp/reverseproxy/caddyfile.go:1557-1583 | modules/caddyhttp/reverseproxy/caddyfile.go:1657-1683 — 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/caddyhttp/reverseproxy/caddyfile.go:1557` 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 (21 lines × 2) cmd/storagefuncs.go:75— cmd/storagefuncs.go:75-95 | cmd/storagefuncs.go:147-167 — 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 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–20 lines × 2) REDACTED:252— REDACTED:252-267 | REDACTED:400-419 — 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:252` 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. 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 (14–19 lines × 2) caddyconfig/httpcaddyfile/addresses.go:135— caddyconfig/httpcaddyfile/addresses.go:135-153 | caddyconfig/httpcaddyfile/addresses.go:198-211 — 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 `caddyconfig/httpcaddyfile/addresses.go:135` 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 (19 lines × 2) modules/caddypki/adminapi.go:95— modules/caddypki/adminapi.go:95-113 | modules/caddypki/adminapi.go:145-163 — 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 (18 lines × 2) caddyconfig/load.go:74— caddyconfig/load.go:74-91 | caddyconfig/load.go:145-162 — 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. 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–17 lines × 2) modules/caddyhttp/fileserver/command.go:193— modules/caddyhttp/fileserver/command.go:193-209 | modules/caddyhttp/staticresp.go:420-434 — 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 `modules/caddyhttp/fileserver/command.go:193` 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 (14–17 lines × 2) modules/caddyhttp/headers/headers.go:318— modules/caddyhttp/headers/headers.go:318-334 | modules/caddyhttp/headers/headers.go:347-360 — 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/caddyhttp/headers/headers.go:318` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `modules/caddyhttp/headers/headers.go:344` calls `CanonicalHeaderKey` and `modules/caddyhttp/headers/headers.go:317` 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 (16 lines × 3) modules/caddyhttp/reverseproxy/caddyfile.go:1164— modules/caddyhttp/reverseproxy/caddyfile.go:1164-1179 | modules/caddyhttp/reverseproxy/caddyfile.go:1576-1591 | modules/caddyhttp/reverseproxy/caddyfile.go:1676-1691 — 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 `modules/caddyhttp/reverseproxy/caddyfile.go:1164` 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 (11–15 lines × 2) caddy.go:228— caddy.go:228-238 | caddy.go:248-262 — 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 `caddy.go:228` 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–14 lines × 2) modules/caddyhttp/headers/caddyfile.go:83— modules/caddyhttp/headers/caddyfile.go:83-95 | modules/caddyhttp/headers/caddyfile.go:127-140 — 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–13 lines × 2) modules/caddyhttp/reverseproxy/command.go:301— modules/caddyhttp/reverseproxy/command.go:301-312 | modules/caddyhttp/staticresp.go:432-444 — 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 (8–10 lines × 4) modules/caddyhttp/intercept/intercept.go:264— modules/caddyhttp/intercept/intercept.go:264-271 | modules/caddyhttp/intercept/intercept.go:311-320 | modules/caddyhttp/reverseproxy/caddyfile.go:897-904 | modules/caddyhttp/reverseproxy/caddyfile.go:992-1001 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `modules/caddyhttp/intercept/intercept.go:264` 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 (9–10 lines × 2) REDACTED:550— REDACTED:550-558 | REDACTED:588-597 — 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:588` 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. 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) caddyconfig/httpcaddyfile/builtins.go:350— caddyconfig/httpcaddyfile/builtins.go:350-358 | caddyconfig/httpcaddyfile/builtins.go:372-380 | caddyconfig/httpcaddyfile/builtins.go:400-408 | caddyconfig/httpcaddyfile/builtins.go:422-430 | caddyconfig/httpcaddyfile/builtins.go:439-447 — 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 (10 lines × 4) modules/caddyhttp/reverseproxy/caddyfile.go:357— modules/caddyhttp/reverseproxy/caddyfile.go:357-366 | modules/caddyhttp/reverseproxy/caddyfile.go:390-399 | modules/caddyhttp/reverseproxy/caddyfile.go:439-448 | modules/caddyhttp/reverseproxy/caddyfile.go:451-460 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `modules/caddyhttp/reverseproxy/caddyfile.go:357` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `modules/caddyhttp/reverseproxy/caddyfile.go:368` calls `Log`, `Named`, `Warn` and `modules/caddyhttp/reverseproxy/caddyfile.go:451` does not — after which the two agree again for 3 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 (6 lines × 3) modules/caddyhttp/server.go:902— modules/caddyhttp/server.go:902-907 | modules/caddyhttp/server.go:917-922 | modules/caddyhttp/server.go:932-937 — 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 `modules/caddyhttp/server.go:902` 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.
P12 · CI test-gate honesty· Coverage collected but not gated · ×1
Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Orphaned file modules/caddyhttp/caddyauth/argon2id.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.
Orphaned file caddyconfig/httpcaddyfile/shorthands.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.
Orphaned file modules/caddyhttp/tracing/module.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.
Orphaned file modules/caddytls/leafstorageloader.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.
Orphaned file modules/metrics/metrics.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.
Orphaned file notify/notify_windows.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.
Orphaned file modules/caddytls/leaffileloader.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.
Orphaned file modules/caddytls/leaffolderloader.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.
Orphaned file modules/caddyfs/filesystem.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.
Orphaned file metrics.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.
Orphaned file modules/caddytls/leafpemloader.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.
Orphaned file modules/logging/filewriter_test_windows.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.
Duplicated predicate REDACTED:105— `!errors.Is(err, context.Canceled) && ctx.Err() == nil` appears character-identically in 2 files — REDACTED, REDACTED. 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 caddy.go:875— `b[0] == byte('"') && b[len(b)-1] == byte('"')` appears character-identically in 2 files — caddy.go, modules/caddyhttp/caddyhttp.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 modules/logging/appendencoder.go:110— `caddy.IsWriterStandardStream(wo) && term.IsTerminal(int(os.Stderr.Fd()))` appears character-identically in 3 files — modules/logging/appendencoder.go, REDACTED, modules/logging/journaldencoder.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 modules/caddyhttp/reverseproxy/reverseproxy.go:1435— `h.Headers != nil && h.Headers.Response != nil` appears character-identically in 2 files — modules/caddyhttp/reverseproxy/reverseproxy.go, REDACTED. 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 modules/caddyhttp/reverseproxy/caddyfile.go:278— `h.LoadBalancing != nil && h.LoadBalancing.SelectionPolicyRaw != nil` appears character-identically in 2 files — modules/caddyhttp/reverseproxy/caddyfile.go, modules/caddyhttp/reverseproxy/reverseproxy.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 REDACTED:766— `isCELStringLiteral(e) || isCELCaddyPlaceholderCall(e) || isCELConcatCall(e)` appears character-identically in 2 files — REDACTED, modules/caddyhttp/fileserver/matcher.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 modules/caddyhttp/responsematchers.go:104— `len(arg) == 3 && strings.HasSuffix(arg, "xx")` appears character-identically in 2 files — modules/caddyhttp/responsematchers.go, modules/caddyhttp/reverseproxy/caddyfile.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 modules/caddyhttp/matchers.go:1612— `mre.Name != "" && !wordRE.MatchString(mre.Name)` appears character-identically in 2 files — modules/caddyhttp/matchers.go, modules/caddytls/matchers.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 modules/caddyhttp/server.go:655— `r.ProtoMajor == 1 && r.ContentLength != 0` appears character-identically in 2 files — modules/caddyhttp/server.go, modules/caddyhttp/timeouts/timeouts.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 modules/caddyhttp/replacer.go:154— `req.TLS != nil && !req.TLS.HandshakeComplete` appears character-identically in 2 files — modules/caddyhttp/replacer.go, modules/caddyhttp/reverseproxy/reverseproxy.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 modules/caddyhttp/push/handler.go:89— `server.Logs != nil && server.Logs.ShouldLogCredentials` appears character-identically in 3 files — modules/caddyhttp/push/handler.go, modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go, modules/caddyhttp/reverseproxy/reverseproxy.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 REDACTED:738— `srv.AutoHTTPS == nil || !srv.AutoHTTPS.Disabled` appears character-identically in 2 files — REDACTED, modules/caddyhttp/autohttps.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 modules/caddyhttp/replacer.go:579— `getTLSReplacement` turns a non-nil `err` into `return nil, true` — 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 modules/caddyhttp/server.go:1864— `determineTrustedProxy` turns a non-nil `err` into `return false, ""` — 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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: modules/caddytls/sessiontickets.go. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 8 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 (9 single-owned of 162 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 162 of the 227 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)) (+2 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: modules/logging/journaldencoder.go, modules/internal/network/networkproxy.go, modules/caddyhttp/reverseproxy/fastcgi/writer.go, listen_reuseUnixSocket_windows.go, notify/notify_windows.go, modules/caddyhttp/templates/frontmatter.go, caddyconfig/caddyfile/importgraph.go, modules/caddytls/pemloader.go.
No ADRs found — 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/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (66507 LoC, 386 module-visible types across 45 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· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 12 of 165 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 165 of the 227 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: modules/caddyhttp/caddyauth/argon2id.go, caddyconfig/httpcaddyfile/shorthands.go, modules/caddyhttp/tracing/module.go, modules/caddytls/leafstorageloader.go, modules/metrics/metrics.go, notify/notify_windows.go, modules/caddytls/leaffileloader.go, modules/caddytls/leaffolderloader.go (and 4 more). 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.
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.
README/code drift README.md:116— README.md changes into `caddy/cmd/caddy/`, but no such folder exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
No security response headers detected caddytest/integration/testdata/issue_7557_invalid_subdirective_snippet.conf:4— 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 `issue_7557_invalid_subdirective_snippet.conf` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
X2 · Cancellation propagation· Not all functions that make a request accept a context.Context · ×1
Not all functions that make a request accept a context.Context — Only 7/12 functions that make a cancellable request (net/http, net.Dial) accept a context.Context or pass one on, so a request keeps running after whatever wanted it has given up — a cancelled request, a shutdown, an expired deadline. Take `ctx context.Context` as the first parameter and build the request with it (`http.NewRequestWithContext`, `DialContext`); where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Outdated: github.com/DeRuina/timberjack — `github.com/DeRuina/timberjack` is required at v1.4.8 in REDACTED, but v1.4.9 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/DeRuina/timberjack@v1.4.9 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/KimMachineGun/automemlimit — `github.com/KimMachineGun/automemlimit` is required at v1.0.0 in REDACTED, but v1.0.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/KimMachineGun/automemlimit@v1.0.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/dunglas/httpsfv — `github.com/dunglas/httpsfv` is required at v1.1.1 in REDACTED, but v1.1.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/dunglas/httpsfv@v1.1.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/go-chi/chi/v5 — `github.com/go-chi/chi/v5` is required at v5.3.2 in REDACTED, but v5.5.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/go-chi/chi/v5@v5.5.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/klauspost/compress — `github.com/klauspost/compress` is required at v1.20.1 in REDACTED, but v1.20.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/klauspost/compress@v1.20.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/klauspost/cpuid/v2 — `github.com/klauspost/cpuid/v2` is required at v2.4.0 in REDACTED, but v2.4.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/klauspost/cpuid/v2@v2.4.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/pires/go-proxyproto — `github.com/pires/go-proxyproto` is required at v0.15.0 in REDACTED, but v0.16.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/pires/go-proxyproto@v0.16.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/prometheus/client_golang — `github.com/prometheus/client_golang` is required at v1.24.1 in REDACTED, but v1.25.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/prometheus/client_golang@v1.25.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/quic-go/quic-go — `github.com/quic-go/quic-go` is required at v0.63.0 in REDACTED, but v0.64.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/quic-go/quic-go@v0.64.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: go.opentelemetry.io/contrib/bridges/prometheus — `go.opentelemetry.io/contrib/bridges/prometheus` is required at v0.71.0 in REDACTED, but v0.72.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get go.opentelemetry.io/contrib/bridges/prometheus@v0.72.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: go.opentelemetry.io/contrib/exporters/autoexport — `go.opentelemetry.io/contrib/exporters/autoexport` is required at v0.71.0 in REDACTED, but v0.72.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get go.opentelemetry.io/contrib/exporters/autoexport@v0.72.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp — `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` is required at v0.71.0 in REDACTED, but v0.72.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.72.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: go.opentelemetry.io/contrib/propagators/autoprop — `go.opentelemetry.io/contrib/propagators/autoprop` is required at v0.71.0 in REDACTED, but v0.72.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get go.opentelemetry.io/contrib/propagators/autoprop@v0.72.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: go.opentelemetry.io/otel — `go.opentelemetry.io/otel` is required at v1.46.0 in REDACTED, but v1.47.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get go.opentelemetry.io/otel@v1.47.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: go.opentelemetry.io/otel/sdk — `go.opentelemetry.io/otel/sdk` is required at v1.46.0 in REDACTED, but v1.47.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get go.opentelemetry.io/otel/sdk@v1.47.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: go.opentelemetry.io/otel/sdk/metric — `go.opentelemetry.io/otel/sdk/metric` is required at v1.46.0 in REDACTED, but v1.47.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get go.opentelemetry.io/otel/sdk/metric@v1.47.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: go.opentelemetry.io/otel/trace — `go.opentelemetry.io/otel/trace` is required at v1.46.0 in REDACTED, but v1.47.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get go.opentelemetry.io/otel/trace@v1.47.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/crypto — `golang.org/x/crypto` is required at v0.57.0 in REDACTED, but v0.58.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/crypto@v0.58.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/net — `golang.org/x/net` is required at v0.60.0 in REDACTED, but v0.61.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/net@v0.61.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/sync — `golang.org/x/sync` is required at v0.23.0 in REDACTED, but v0.24.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/sync@v0.24.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/sys — `golang.org/x/sys` is required at v0.48.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 golang.org/x/sys@v0.49.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/term — `golang.org/x/term` is required at v0.46.0 in REDACTED, but v0.47.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/term@v0.47.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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
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.
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 01a16ad2-3b72-7afd-aabb-3b19047b14fd · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 39 · Warnings: 731 · Recommendations: 51 · Info: 22 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 23-10-2026 @ 22:12 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.