Public report of caddyserver/caddy, published 13 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.3). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 13 November 2026, 10:58 UTC · Survey ID cd_35d8f95ae0c9482faedc5dfcf654b823
caddyserver/caddy
Measured 13 November 2026, 10:58 UTC, at code version 7591cff
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
No change 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: 68,479 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 1.0 person-years · Weakest lens: Accessibility, 36
Findings by how serious they are
25 critical812 serious72 minor
29 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 10:58 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
51of 51 dimensions measured by tools.
874of 909 findings point to an exact file and line, so you can open each one in the code. The other 35 concern the repository as a whole, such as missing documentation.
51dimensions across 7 lenses, read from 68,479 lines of product code in 1 project.
caddyserver/caddy falls short of our standard for production because its Testing dimensions are rated Critical. It scores 51 out of 100, which alone would earn Adequate, but it is rated Weak: a rating can't sit more than one step above its weakest group.
Accessibility, at 36, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the four tests that passed on some runs and failed on others, worth about 4 points. Adding text alternatives would lift Accessibility itself, worth about 7 points. Raising Accessibility to 70 would lift the score to about 62.
Three pipeline steps install packages that can change without warning. Two passwords or keys are open to anyone who can read the repository, and nine buttons or links have no name a screen reader can say. Pinning what the pipeline installs, replacing each exposed password or key and naming the buttons and links would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and the connection that skips the certificate check needs the certificate check switched back on. The form field without a label needs a label.
The product code is 68,479 lines, about €140,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.
If Accessibility rose from 36 to 70, the lowest score rated Strong, the score would rise from 51 to about 62.
Code composition: what the lines of code are
Product code 55%Tests 45%
New since the last survey: 104 findings
These 104 critical or serious findings weren't in the previous survey, on 23 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Exception handling · Swallowed exception (caught, then discarded) replacer.go
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 48 findings
These 48 critical or serious findings were in the previous survey, on 23 October 2026, and are gone from this one.
Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
Exception handling · Swallowed exception (caught, then discarded) caddyconfig/caddyfile/lexer_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) REDACTED
Exception handling · Swallowed exception (caught, then discarded) REDACTED
Exception handling · Swallowed exception (caught, then discarded) REDACTED
Exception handling · Swallowed exception (caught, then discarded) internal/bindcap_linux.go
Exception handling · Swallowed exception (caught, then discarded) REDACTED
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/fileserver/matcher.go
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/fileserver/browsetplcontext.go
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/push/handler.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) modules/caddyhttp/reverseproxy/reverseproxy.go
Exception handling · Swallowed exception (caught, then discarded) modules/caddyhttp/reverseproxy/reverseproxy.go
A11y enforcement · Accessibility enforcement below the top rung
Rebuild cost: about €140,000 · Estimate
Cost to rebuild
€47,000 to €240,000, for 786 to 2,494 hours of work, about 1.0 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: 68,479 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 4 Flaky test finding(s) in Test Reliability.
Raises the score by about 4 points · Low effort · Test Reliability
2
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 7 points · Medium effort · Text alternatives
3
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 €140,000 to build again, about 1.0 person-years of work. Its weakest lens is Accessibility, at 36 (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
Resolve the 4 Flaky test finding(s) in Test Reliability. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 4 Test Reliability findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.7 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 13% on every change. The history of the code shows how much it changes: about 46,032 lines over the last 90 days, which is about 186,685 lines a year. At that pace, the extra work comes to an estimated 26.5 to 159.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
48 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; 8 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
4 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
84 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
60
High / Critical
A07:2025 — Authentication Failures
6
High / Critical
A03:2025 — Software Supply Chain Failures
4
Medium
Roadmap
Top priorities: 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; Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 4 Flaky test finding(s) in Test Reliability.
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.
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.
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 — 25
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 — 812
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 — 72
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 29
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 51 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 51 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, 874 of 909 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT 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.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (68476 LoC, 388 module-visible types across 46 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), 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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 18 further occurrence(s) are not listed individually; the score already reflects all 58.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded and 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
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
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.
D11 Test Reliability: Flakiness is inferred from history/markers — we run 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 publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
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.
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.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
135 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Handler.UnmarshalCaddyfile at 255. A further 3 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.
+ 130 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.
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.
+ 217 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 222 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 222 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.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes7.3 / 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 23 MethodTooLong finding(s) in God Classes — start with caddyfile.go (3), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (23 warning-level).
Resolve the 18 FileTooLong finding(s) in God Classes — start with reverseproxy.go, caddyfile.go, REDACTED. — One of this dimension's main actionable groups (18 warning-level).
Resolve the 10 FunctionTooLong finding(s) in God Classes — start with builtins.go (2), caddyfile.go (2), replacer.go. — One of this dimension's main actionable groups (10 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
126 duplicated block group(s) detected. A further 60 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 82 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 15 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 (15 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 REDACTED (2), caddyfile.go (2), REDACTED. — One of this dimension's main actionable groups (10 warning-level).
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:50
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).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability2.0 / 10Critical✓ 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, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
19 outdated, 0 author-deprecated direct Go module(s), 2 pinning or checksum defect(s). 56 of 56 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: cel.dev/cel-go · ×19
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.
REDACTED scan ran and found no leaked secrets. 2 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material. 1 password hash(es) are listed to check and are not counted as leaked credentials.
REDACTED
✓ On the Gold path — maintain.
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 168 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 28 Hotspot finding(s) in Churn × Complexity Hotspots — start with caddyfile.go (2), REDACTED (2), reverseproxy.go. — One of this dimension's main actionable groups (28 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.
10 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 166 of the 229 production source files in this repository: 60 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.
80 deducted task-comment markers across 68479 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 · ×80caddy.go:470
What to do
Resolve the 80 TodoComment finding(s) in Explicit Debt — start with REDACTED (8), server.go (7), REDACTED (7). — One of this dimension's main actionable groups (80 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 1 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with main.go. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D27 · Navigability8.5 / 10Strong✓ Tool-verified
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
52 % of calls cross a namespace and 2 % go through an interface, but 46 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.
Scattered collaborators
What to do
Resolve the 1 Scattered collaborators finding(s) in Navigability. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d27_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.
4 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 recommendation-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).
61 finding(s): 0 critical, 6 high, 41 medium, 14 low. semgrep hit a parse error in 5 file(s) — `.github/scripts/changelog-commits.sh`, `.github/scripts/previous-release.sh` (line 27), `.github/scripts/release-notes.sh` (line 17, line 18), `modules/caddyhttp/encode/testdata/caddy_asciinema_player.js`, `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
+ 10 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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 169 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 169 of the 229 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. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 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:1
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.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
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 repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
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.
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_7518_unused_block_panic_snippets.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_7518_unused_block_panic_snippets.conf:5
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.
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
`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
`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
`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
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. (×35) — REDACTED:353, REDACTED:822, REDACTED:1006, …
`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. (×2) — REDACTED:993, REDACTED:1060
`if splitErr != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — REDACTED:799
`if path, err := url.PathUnescape(newPath); 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/rewrite/rewrite.go:282
`if _, err := httpsfv.Marshal(item); 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/reverseproxy/reverseproxy.go:2209
What to do
Swallowed exception (caught, then discarded)
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 — 59 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 — ~57044 lines of test source are present (.go) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Go, html not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. 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 — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .go, .php, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. 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.
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
M4 Documentation accuracy — Not applicable: the 1 current-state document(s) make no claim of a kind M4 checks. 1 claim(s) of kinds M4 does not check were not checked (cd 1); M4 checks only links and versions and artefact counts.
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: Go has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
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
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — 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
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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 — 25 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 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 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 REDACTED:494— // 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:519— // 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 REDACTED:120— // 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:167— // 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:185— // 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:214— // 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:244— // 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:1568— // 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:102— // (TODO: this map does not account for wildcards, see if this is a problem in practice? look for reports of high connection latency with wildcard certs but low latency for non-wildcards in multi-thousand-cert deployments) — 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:293— // TODO: I don't love how this works: we pre-build certmagic configs — 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:317— // TODO: experimental: if a handshake context module is configured, allow it — 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:348— // TODO: Clean up session ticket active locks in storage if app (or process) is being closed! — 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:417— // them at this time. TODO: one of these is a possible future enhancement: — 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:853— // TODO: DEPRECATED — 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:903— // TODO: DEPRECATED: Only here for backwards compatibility. — 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:397— // TODO: use IDs or the outer names? — 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:456— // TODO: Potentially utilize the timestamp (map value) for recent-enough publication, instead of just checking for existence — 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:863— // TODO: we could make resolvers configurable — 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:929— // TODO: low hard-coded value only temporary; change to a higher value once more field-tested and key rotation is implemented — 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:664— // TODO: we could also consider manually-loaded certs using t.HasCertificateForSubject(), — 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:997— // TODO: This check might not be needed anymore now that CertMagic syncs — 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/caddytls/standardstek/stek.go:102— // TODO: improve this handling — 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) REDACTED:353— `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:822— `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:1006— `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) 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) replacer.go:467— `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/logging/filters.go:467— `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/logging/filters.go:726— `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:716— `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:751— `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:993— `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.
Swallowed exception (caught, then discarded) REDACTED:1060— `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.
Swallowed exception (caught, then discarded) REDACTED:799— `if splitErr != 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:829— `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/incremental.go:44— `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/logging.go:116— `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/marshalers.go:37— `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/replacer.go:309— `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/replacer.go:313— `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/replacer.go:341— `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/replacer.go:361— `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/replacer.go:586— `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:959— `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:1009— `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:1025— `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:311— modules/caddyhttp/reverseproxy/reverseproxy.go changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in Handler.Provision at line 311. 4 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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: REDACTED REDACTED:566— REDACTED changed 6 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-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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/server.go modules/caddyhttp/server.go:599— modules/caddyhttp/server.go changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in Server.ServeHTTP at line 599. 1 of those changes was a fix/bug commit, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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:289— REDACTED changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in FileServer.ServeHTTP at line 289. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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/fileserver/matcher.go modules/caddyhttp/fileserver/matcher.go:357— modules/caddyhttp/fileserver/matcher.go changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in MatchFile.selectFile at line 357. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07:00' --full-history --no-merges -- modules/caddyhttp/fileserver/matcher.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:173— modules/caddyhttp/rewrite/rewrite.go changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in Rewrite.Rewrite at line 173. 3 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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: 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-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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:189— REDACTED changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in App.Provision at line 189. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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/tlsapp.go caddyconfig/httpcaddyfile/tlsapp.go:36— caddyconfig/httpcaddyfile/tlsapp.go changed 3 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-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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:95— REDACTED changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in Handler.handleUpgradeResponse at line 95. 1 of those changes was a fix/bug commit, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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/fastcgi/fastcgi.go modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go:267— modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in Transport.buildEnv at line 267. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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/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 95 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-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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: REDACTED REDACTED:207— REDACTED changed 4 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-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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/parse.go caddyconfig/caddyfile/parse.go:388— caddyconfig/caddyfile/parse.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in parser.doImport at line 388. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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: caddyconfig/httpcaddyfile/serveroptions.go caddyconfig/httpcaddyfile/serveroptions.go:73— caddyconfig/httpcaddyfile/serveroptions.go changed 2 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-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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/matchers.go modules/caddyhttp/matchers.go:546— modules/caddyhttp/matchers.go changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in MatchPath.matchPatternWithEscapeSequence at line 546. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07:00' --full-history --no-merges -- modules/caddyhttp/matchers.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/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-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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/headers/headers.go modules/caddyhttp/headers/headers.go:235— modules/caddyhttp/headers/headers.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in HeaderOps.ApplyTo at line 235. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07:00' --full-history --no-merges -- modules/caddyhttp/headers/headers.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:311— REDACTED changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in AutomationPolicy.makeCertMagicConfig at line 311. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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/fileserver/caddyfile.go modules/caddyhttp/fileserver/caddyfile.go:72— modules/caddyhttp/fileserver/caddyfile.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in FileServer.UnmarshalCaddyfile at line 72. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07:00' --full-history --no-merges -- modules/caddyhttp/fileserver/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:345— REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in TLS.publishECHConfigs at line 345. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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/directives.go caddyconfig/httpcaddyfile/directives.go:464— caddyconfig/httpcaddyfile/directives.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in httpcaddyfile.sortRoutes at line 464. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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: modules/caddyhttp/fileserver/browsetplcontext.go modules/caddyhttp/fileserver/browsetplcontext.go:37— modules/caddyhttp/fileserver/browsetplcontext.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in FileServer.directoryListing at line 37. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-13..2026-11-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-13 12:25:23 -07:00' --until='2026-11-11 12:25:23 -07: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.
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: FileServer.ServeHTTP REDACTED:289— MethodTooLong — ServeHTTP runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× 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:452— 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: MatchFile.selectFile modules/caddyhttp/fileserver/matcher.go:357— MethodTooLong — selectFile runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× 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:599— MethodTooLong — ServeHTTP runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.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: 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:189— MethodTooLong — Provision runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× 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:345— 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.handleUpgradeResponse REDACTED:95— MethodTooLong — handleUpgradeResponse runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× 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:311— 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:482— 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: FileServer.UnmarshalCaddyfile modules/caddyhttp/fileserver/caddyfile.go:72— MethodTooLong — UnmarshalCaddyfile runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Handler.reverseProxy modules/caddyhttp/reverseproxy/reverseproxy.go:1242— MethodTooLong — reverseProxy runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× 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: Transport.buildEnv modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go:267— MethodTooLong — buildEnv runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× 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/reverseproxy.go modules/caddyhttp/reverseproxy/reverseproxy.go— FileTooLong — 1127 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: Handler (20 blocks, 107-2299). The bar is 500 significant lines; this is 627 over it, 2.25× 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: 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: REDACTED REDACTED— FileTooLong — 1018 significant lines (blank, comment-only and punctuation-only lines excluded), about 60% of them inside a single declaration: ServerType (5 blocks, 59-1698). The bar is 500 significant lines; this is 518 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/matchers.go modules/caddyhttp/matchers.go— FileTooLong — 951 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 451 over it, 1.90× 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: caddyhttp/server.go modules/caddyhttp/server.go— FileTooLong — 909 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: Server (40 blocks, 50-1802). The bar is 500 significant lines; this is 409 over it, 1.82× 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 — 773 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 273 over it, 1.55× 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: REDACTED REDACTED— FileTooLong — 704 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 204 over it, 1.41× 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 — 672 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 172 over it, 1.34× 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 — 629 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 129 over it, 1.26× 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 — 594 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 94 over it, 1.19× 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: logging/filters.go modules/logging/filters.go— FileTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 71 over it, 1.14× 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 — 562 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: TLS (22 blocks, 54-1094). The bar is 500 significant lines; this is 62 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: 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 — 539 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 39 over it, 1.08× 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 — 502 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2 over it, 1.00× 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) REDACTED:671— REDACTED:671-681 | REDACTED:689-699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) modules/caddyhttp/matchers.go:1687— modules/caddyhttp/matchers.go:1687-1697 | 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:1687` 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:1864— modules/caddyhttp/matchers.go:1864-1874 | REDACTED:1150-1160 — 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:474— context.go:474-485 | context.go:489-499 — 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:474` 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:551— modules/caddytls/acmeissuer.go:551-560 | modules/caddytls/acmeissuer.go:567-576 — 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:335— modules/caddytls/matchers.go:335-344 | modules/caddytls/matchers.go:459-468 — 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:958-967 — 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:957` 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:609— modules/caddytls/acmeissuer.go:609-618 | modules/caddytls/acmeissuer.go:661-670 — 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:609` 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.
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: caddyhttp.addHTTPVarsToReplacer modules/caddyhttp/replacer.go:59— FunctionTooLong — addHTTPVarsToReplacer runs 239 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 139 over it, 2.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.
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: 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: 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: fastcgi.parsePHPFastCGI modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:170— FunctionTooLong — parsePHPFastCGI 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: caddyhttp.celMatchLiteral REDACTED:749— FunctionTooLong — celMatchLiteral runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× 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:1202— 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 (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/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) modules/caddyhttp/rewrite/rewrite.go:767— modules/caddyhttp/rewrite/rewrite.go:767-774 | modules/caddyhttp/rewrite/rewrite.go:782-789 — 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:767` 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:792` calls `ReplaceAll` and `modules/caddyhttp/rewrite/rewrite.go:775` 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 (8 lines × 2) context.go:276— context.go:276-283 | context.go:294-301 — 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:292` calls `Len`, `Index` and `context.go:275` 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 (8 lines × 2) REDACTED:1032— REDACTED:1032-1041 | REDACTED:1050-1057 — 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:1032` 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:272— modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:272-279 | modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:283-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:272` 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:969-976 — 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:888— modules/caddyhttp/server.go:888-895 | modules/caddyhttp/server.go:903-910 — 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:888` 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 (12 lines × 2) REDACTED:1109— REDACTED:1109-1120 | modules/caddyhttp/fileserver/matcher.go:760-771 — 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:1419— modules/caddyhttp/matchers.go:1419-1430 | 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:1419` 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:1446— modules/caddyhttp/matchers.go:1446-1457 | 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:1446` 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:344— modules/caddyhttp/replacer.go:344-355 | modules/caddyhttp/replacer.go:365-376 — 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:344` 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:364` calls `Context`, `Value` and `modules/caddyhttp/replacer.go:343` 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:656— modules/caddytls/acmeissuer.go:656-667 | 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:656` 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:361— modules/caddytls/matchers.go:361-369 | modules/caddytls/matchers.go:477-485 — 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:361` 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:554— context.go:554-560 | context.go:582-588 — 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:552` calls `App` and `context.go:580` 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/fileserver/matcher.go:553— modules/caddyhttp/fileserver/matcher.go:553-559 | modules/caddyhttp/fileserver/matcher.go:574-580 — 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/fileserver/matcher.go:553` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) modules/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) 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:795— REDACTED:795-801 | REDACTED:840-846 — 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:795` 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:50— 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: FilterEncoder REDACTED:43— 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: Handler modules/caddyhttp/reverseproxy/reverseproxy.go:107— TooManyMethods — 31 methods, declared across 5 files: reverseproxy/reverseproxy.go (20), reverseproxy/healthchecks.go (4), REDACTED (4), reverseproxy/caddyfile.go (2), +1 more file(s). The bar is 30 methods; this is 1 over it, 1.03× 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: 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:605— REDACTED:605-617 | REDACTED:628-640 — 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:605` 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:1033— REDACTED:1033-1045 | REDACTED:1051-1063 — 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:968— modules/caddyhttp/matchers.go:968-977 | modules/caddyhttp/matchers.go:1450-1459 | 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:968` 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:489— REDACTED:489-498 | REDACTED:570-579 | REDACTED:654-663 — 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:489` 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: 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, …)`.
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: 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, …)`.
ClassTooLong: Handler modules/caddyhttp/reverseproxy/reverseproxy.go:107— ClassTooLong — 706 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods, 20 blocks, lines 107-2299. The bar is 400 significant lines; this is 306 over it, 1.77× 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:50— ClassTooLong — 696 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods, 40 blocks, lines 50-1802. The bar is 400 significant lines; this is 296 over it, 1.74× 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-1698. 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 — 488 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods, 22 blocks, lines 54-1094. The bar is 400 significant lines; this is 88 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.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×4
Edited copy of a member (8 corresponding lines) caddyconfig/caddyfile/parse.go:799— caddyconfig/caddyfile/parse.go:799-806 | caddyconfig/caddyfile/parse.go:808-815 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) REDACTED:421— REDACTED:421-428 | modules/caddyhttp/templates/tplcontext.go:305-312 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) modules/caddyhttp/matchers.go:1752— modules/caddyhttp/matchers.go:1752-1759 | modules/caddytls/matchers.go:180-188 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) modules/caddyhttp/encode/caddyfile.go:31— modules/caddyhttp/encode/caddyfile.go:31-38 | modules/caddyhttp/reverseproxy/caddyfile.go:1428-1435 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
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:375— modules/caddytls/matchers.go:375-391 | modules/caddytls/matchers.go:490-506 — 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:86-102 — 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:84` 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:124-140 — 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:50— 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 31 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.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) modules/caddytls/matchers.go:357— modules/caddytls/matchers.go:357-372 | modules/caddytls/matchers.go:473-487 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) REDACTED:140— REDACTED:140-159 | REDACTED:305-319 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) modules/caddytls/leaffileloader.go:64— modules/caddytls/leaffileloader.go:64-78 | modules/caddytls/leafstorageloader.go:85-104 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×3
Edited copy of a member (16 corresponding lines) REDACTED:95— REDACTED:95-112 | REDACTED:185-200 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) caddyconfig/caddyfile/dispenser.go:104— caddyconfig/caddyfile/dispenser.go:104-119 | caddyconfig/caddyfile/dispenser.go:125-140 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) modules/caddyhttp/templates/tplcontext.go:113— modules/caddyhttp/templates/tplcontext.go:113-131 | modules/caddyhttp/templates/tplcontext.go:224-239 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) REDACTED:1123— REDACTED:1123-1134 | modules/caddyhttp/fileserver/matcher.go:774-785 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) REDACTED:1851— REDACTED:1851-1866 | modules/caddyhttp/server.go:1006-1017 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) modules/caddyhttp/fileserver/caddyfile.go:38— modules/caddyhttp/fileserver/caddyfile.go:38-49 | modules/caddyhttp/reverseproxy/caddyfile.go:45-56 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×3
Edited copy of a member (14 corresponding lines) caddyconfig/caddyfile/formatter.go:467— caddyconfig/caddyfile/formatter.go:467-480 | caddyconfig/caddyfile/lexer.go:633-655 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) caddyconfig/httpcaddyfile/options.go:203— caddyconfig/httpcaddyfile/options.go:203-216 | caddyconfig/httpcaddyfile/options.go:465-478 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) modules/caddyhttp/reverseproxy/reverseproxy.go:641— modules/caddyhttp/reverseproxy/reverseproxy.go:641-657 | modules/caddyhttp/reverseproxy/reverseproxy.go:2411-2424 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×3
Edited copy of a member (13 corresponding lines) modules/caddyhttp/ip_matchers.go:191— modules/caddyhttp/ip_matchers.go:191-206 | modules/caddyhttp/ip_range.go:90-102 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) listen.go:203— listen.go:203-215 | listen.go:217-230 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) REDACTED:190— REDACTED:190-203 | modules/caddyhttp/encode/gzip/gzip.go:46-58 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (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:624— modules/caddytls/acmeissuer.go:624-638 | 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:624` 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:525— REDACTED:525-538 | REDACTED:605-618 | REDACTED:742-755 — 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:525` 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:523` calls `Val` and `REDACTED:741` 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:204-217 | 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 (8 lines × 3) modules/caddyhttp/matchers.go:952— modules/caddyhttp/matchers.go:952-959 | modules/caddyhttp/matchers.go:1410-1417 | 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:952` 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:90-98 | 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 (8 lines × 3) REDACTED:268— REDACTED:268-275 | REDACTED:114-121 | REDACTED:277-284 — 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:268` 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.
Low cohesion: Server (LCOM4 6) modules/caddyhttp/server.go:50— 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.3 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/yuin/goldmark-highlighting/v2` and has not moved this requirement in 3.3 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/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:931— modules/caddyhttp/matchers.go:931-978 | modules/caddyhttp/matchers.go:1406-1460 | 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.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×2
Edited copy of a member (31 corresponding lines) REDACTED:98— REDACTED:98-128 | REDACTED:258-291 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) modules/caddytls/distributedstek/distributedstek.go:207— modules/caddytls/distributedstek/distributedstek.go:207-237 | modules/caddytls/standardstek/stek.go:84-128 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×2
Edited copy of a member (37 corresponding lines) modules/caddypki/ca.go:277— modules/caddypki/ca.go:277-316 | modules/caddypki/ca.go:345-381 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) modules/caddytls/fileloader.go:80— modules/caddytls/fileloader.go:80-116 | modules/caddytls/storageloader.go:76-112 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) modules/caddyhttp/ip_matchers.go:155— modules/caddyhttp/ip_matchers.go:155-180 | modules/caddyhttp/ip_matchers.go:262-282 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) listen_unix.go:239— listen_unix.go:239-259 | listen_unix.go:268-288 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×2
Edited copy of a member (23 corresponding lines) modules/caddyhttp/reverseproxy/healthchecks.go:271— modules/caddyhttp/reverseproxy/healthchecks.go:271-293 | modules/caddyhttp/reverseproxy/metrics.go:139-165 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) modules/logging/appendencoder.go:73— modules/logging/appendencoder.go:73-96 | modules/logging/journaldencoder.go:65-87 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×2
Edited copy of a member (18 corresponding lines) modules/caddyhttp/matchers.go:1682— modules/caddyhttp/matchers.go:1682-1703 | REDACTED:444-461 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) caddyconfig/httpcaddyfile/options.go:184— caddyconfig/httpcaddyfile/options.go:184-201 | caddyconfig/httpcaddyfile/options.go:278-301 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) REDACTED:917— REDACTED:917-933 | REDACTED:935-951 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) caddyconfig/httpcaddyfile/directives.go:241— caddyconfig/httpcaddyfile/directives.go:241-257 | caddyconfig/httpcaddyfile/directives.go:613-632 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×2
Edited copies of one member (3 members, 14+ corresponding lines) REDACTED:485— REDACTED:485-498 | REDACTED:566-579 | REDACTED:650-663 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) modules/caddyhttp/matchers.go:1133— modules/caddyhttp/matchers.go:1133-1146 | modules/caddyhttp/matchers.go:1217-1230 | modules/caddyhttp/vars.go:241-254 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×2
Edited copy of a member (11 corresponding lines) REDACTED:945— REDACTED:945-955 | REDACTED:957-967 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) modules/caddypki/certificates.go:26— modules/caddypki/certificates.go:26-36 | modules/caddypki/certificates.go:38-48 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×2
Edited copy of a member (7 corresponding lines) modules/caddyhttp/reverseproxy/fastcgi/writer.go:31— modules/caddyhttp/reverseproxy/fastcgi/writer.go:31-39 | modules/caddyhttp/reverseproxy/fastcgi/writer.go:131-137 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) caddyconfig/caddyfile/dispenser.go:460— caddyconfig/caddyfile/dispenser.go:460-466 | caddyconfig/caddyfile/dispenser.go:470-476 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) modules/caddyhttp/idletimeout.go:335— modules/caddyhttp/idletimeout.go:335-345 | modules/caddyhttp/idletimeout.go:487-496 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) caddyconfig/httpcaddyfile/builtins.go:684— caddyconfig/httpcaddyfile/builtins.go:684-693 | modules/caddyhttp/rewrite/caddyfile.go:75-84 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (20 lines × 2) REDACTED:1139— REDACTED:1139-1158 | modules/caddyhttp/fileserver/matcher.go:790-809 — 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:525— REDACTED:525-544 | REDACTED:605-624 — 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:525` 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:1163— REDACTED:1163-1176 | modules/caddyhttp/fileserver/matcher.go:814-827 — 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:953— modules/caddyhttp/matchers.go:953-963 | modules/caddyhttp/matchers.go:1434-1444 | 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:953` 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:970— modules/caddyhttp/matchers.go:970-978 | modules/caddyhttp/matchers.go:1452-1460 | 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:970` 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 (7 lines × 3) REDACTED:1454— REDACTED:1454-1460 | REDACTED:970-979 | REDACTED:957-963 — 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:223— REDACTED:223-229 | 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 (6 lines × 2) modules/caddyhttp/matchers.go:1762— modules/caddyhttp/matchers.go:1762-1767 | modules/caddytls/matchers.go:191-196 — 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.
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.
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 95) modules/caddyhttp/replacer.go:59— caddyhttp.addHTTPVarsToReplacer has cyclomatic complexity 95 (threshold 15). Most of this is not in the body itself: 1 of the 95 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:452— 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 74) REDACTED:289— FileServer.ServeHTTP has cyclomatic complexity 74 (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.
MatchFile.selectFile (cyclomatic 59) modules/caddyhttp/fileserver/matcher.go:357— MatchFile.selectFile has cyclomatic complexity 59 (threshold 15). Of this number, 37 points are the body's own statements and 22 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.
caddyhttp.celMatchLiteral (cyclomatic 57) REDACTED:749— caddyhttp.celMatchLiteral has cyclomatic complexity 57 (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.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:388— 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 50) REDACTED:189— App.Provision 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.
Handler.Provision (cyclomatic 49) modules/caddyhttp/reverseproxy/reverseproxy.go:311— 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 48) modules/caddyhttp/server.go:599— Server.ServeHTTP has cyclomatic complexity 48 (threshold 15). Of this number, 42 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.
FileServer.UnmarshalCaddyfile (cyclomatic 45) modules/caddyhttp/fileserver/caddyfile.go:72— FileServer.UnmarshalCaddyfile 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.
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:1202— 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.
Rewrite.Rewrite (cyclomatic 44) modules/caddyhttp/rewrite/rewrite.go:173— Rewrite.Rewrite has cyclomatic complexity 44 (threshold 15). Of this number, 42 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.
TLS.publishECHConfigs (cyclomatic 44) REDACTED:345— TLS.publishECHConfigs has cyclomatic complexity 44 (threshold 15). Of this number, 41 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.
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.
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.
caddyhttp.getTLSReplacement (cyclomatic 37) modules/caddyhttp/replacer.go:498— 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:482— 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.
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.
fastcgi.parsePHPFastCGI (cyclomatic 35) modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:170— fastcgi.parsePHPFastCGI 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.
Transport.buildEnv (cyclomatic 35) modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go:267— Transport.buildEnv has cyclomatic complexity 35 (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.UnmarshalCaddyfile (cyclomatic 35) REDACTED:503— 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.
HeaderOps.ApplyTo (cyclomatic 34) modules/caddyhttp/headers/headers.go:235— HeaderOps.ApplyTo has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
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.
Server.serveHTTP (cyclomatic 33) modules/caddyhttp/server.go:856— Server.serveHTTP has cyclomatic complexity 33 (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 32) REDACTED:798— TLSConfig.MakeTLSClientConfig has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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:810— 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.
ACMEIssuer.Provision (cyclomatic 31) modules/caddytls/acmeissuer.go:130— 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:725— 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 803, 785, 893). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
FileServer.Provision (cyclomatic 29) REDACTED:199— FileServer.Provision 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.
Handler.prepareRequest (cyclomatic 29) modules/caddyhttp/reverseproxy/reverseproxy.go:981— Handler.prepareRequest has cyclomatic complexity 29 (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.
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.
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.handleUpgradeResponse (cyclomatic 28) REDACTED:95— Handler.handleUpgradeResponse has cyclomatic complexity 28 (threshold 15). Of this number, 25 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.
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.
ConnectionPolicy.buildStandardTLSConfig (cyclomatic 28) REDACTED:279— ConnectionPolicy.buildStandardTLSConfig has cyclomatic complexity 28 (threshold 15). Of this number, 25 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.
ClientAuthentication.UnmarshalCaddyfile (cyclomatic 28) REDACTED:680— 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.
Replacer.replace (cyclomatic 28) replacer.go:178— Replacer.replace 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.
httpcaddyfile.consolidateAutomationPolicies (cyclomatic 27) caddyconfig/httpcaddyfile/tlsapp.go:1067— httpcaddyfile.consolidateAutomationPolicies has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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:1473— 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.
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.
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.
Handler.ServeHTTP (cyclomatic 26) modules/caddyhttp/reverseproxy/reverseproxy.go:673— Handler.ServeHTTP has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Handler.reverseProxy (cyclomatic 26) modules/caddyhttp/reverseproxy/reverseproxy.go:1242— Handler.reverseProxy has cyclomatic complexity 26 (threshold 15). Of this number, 25 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.
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.serveBrowse (cyclomatic 25) REDACTED:85— FileServer.serveBrowse 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.
AutomationPolicy.makeCertMagicConfig (cyclomatic 25) REDACTED:311— AutomationPolicy.makeCertMagicConfig has cyclomatic complexity 25 (threshold 15). Of this number, 13 points are the body's own statements and 12 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:609— 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.
echConfig.UnmarshalBinary (cyclomatic 24) REDACTED:1009— 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:233— 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.
caddy.replaceRemoteAdminServer (cyclomatic 22) REDACTED:512— 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:49— 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:1140— 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.
caddycmd.cmdImportStorage (cyclomatic 21) cmd/storagefuncs.go:65— caddycmd.cmdImportStorage 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.
LoadBalancing.tryAgain (cyclomatic 21) modules/caddyhttp/reverseproxy/reverseproxy.go:1622— 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:155— 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:1624— 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:152— 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:722— 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:411— 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:188— 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:989— 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:713— 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.
caddyhttp.CleanPath (cyclomatic 18) modules/caddyhttp/caddyhttp.go:279— caddyhttp.CleanPath 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.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:546— 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:393— 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:1413— 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.
ClientAuthentication.ConfigureTLSConfig (cyclomatic 18) REDACTED:860— ClientAuthentication.ConfigureTLSConfig 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.CELMatcherDecorator (cyclomatic 17) REDACTED:571— caddyhttp.CELMatcherDecorator has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 575). 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.matchHeaders (cyclomatic 17) modules/caddyhttp/matchers.go:1250— 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:96— 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.
MatchPath.MatchWithError (cyclomatic 17) modules/caddyhttp/matchers.go:436— MatchPath.MatchWithError 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.
RemoteAdmin.enforceAccessControls (cyclomatic 16) REDACTED:682— RemoteAdmin.enforceAccessControls 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.sortRoutes (cyclomatic 16) caddyconfig/httpcaddyfile/directives.go:464— 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 470). 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:1388— 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:1453— 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.CELValueToMapStrList (cyclomatic 16) REDACTED:1022— 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.
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.
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:452— 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.
caddyhttp.celMatchLiteral (cognitive 165) REDACTED:749— caddyhttp.celMatchLiteral has cognitive complexity 165 (threshold 15). Drivers by points: if/else 37 (120 pts), loops 7 (29 pts), boolean chains 8, match/switch 3 (8 pts) (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.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 131) REDACTED:345— TLS.publishECHConfigs has cognitive complexity 131 (threshold 15). Drivers by points: if/else 28 (75 pts), loops 15 (53 pts), boolean chains 3 (nesting depth added 85). Of this number, 127 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 130) REDACTED:289— FileServer.ServeHTTP has cognitive complexity 130 (threshold 15). Drivers by points: if/else 60 (115 pts), boolean chains 12, loops 2 (3 pts) (nesting depth added 56). To reduce it, split the body into named stages: move each independent 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:1202— 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 112) REDACTED:189— App.Provision has cognitive complexity 112 (threshold 15). Drivers by points: if/else 39 (93 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.
FileServer.UnmarshalCaddyfile (cognitive 112) modules/caddyhttp/fileserver/caddyfile.go:72— FileServer.UnmarshalCaddyfile has cognitive complexity 112 (threshold 15). Drivers by points: if/else 23 (87 pts), match/switch 4 (13 pts), loops 4 (12 pts) (nesting depth added 81). To reduce it, split the body into named stages: move each independent 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 107) modules/caddyhttp/fileserver/matcher.go:357— MatchFile.selectFile has cognitive complexity 107 (threshold 15). Drivers by points: if/else 37 (75 pts), loops 9 (21 pts), boolean chains 8, match/switch 2 (3 pts) (nesting depth added 51). Of this number, 75 points are the body's own statements and 32 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.
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:482— 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:388— 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.
Server.ServeHTTP (cognitive 90) modules/caddyhttp/server.go:599— Server.ServeHTTP has cognitive complexity 90 (threshold 15). Drivers by points: if/else 37 (74 pts), boolean chains 8, loops 3 (8 pts) (nesting depth added 42). Of this number, 84 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.
Handler.Provision (cognitive 82) modules/caddyhttp/reverseproxy/reverseproxy.go:311— 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.
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.
HeaderOps.ApplyTo (cognitive 74) modules/caddyhttp/headers/headers.go:235— HeaderOps.ApplyTo has cognitive complexity 74 (threshold 15). Drivers by points: if/else 13 (38 pts), loops 14 (30 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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.
Rewrite.Rewrite (cognitive 71) modules/caddyhttp/rewrite/rewrite.go:173— Rewrite.Rewrite has cognitive complexity 71 (threshold 15). Drivers by points: if/else 27 (52 pts), boolean chains 11, loops 3 (4 pts), match/switch 1 (3 pts), jumps 1 (nesting depth added 28). Of this number, 69 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.
fastcgi.parsePHPFastCGI (cognitive 69) modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:170— fastcgi.parsePHPFastCGI has cognitive complexity 69 (threshold 15). Drivers by points: if/else 22 (62 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent 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.
ConnectionPolicy.UnmarshalCaddyfile (cognitive 64) REDACTED:503— 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.
Server.serveHTTP (cognitive 58) modules/caddyhttp/server.go:856— Server.serveHTTP has cognitive complexity 58 (threshold 15). Drivers by points: if/else 19 (48 pts), boolean chains 7, 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.
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:680— 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.
RemoteAdmin.enforceAccessControls (cognitive 55) REDACTED:682— RemoteAdmin.enforceAccessControls has cognitive complexity 55 (threshold 15). Drivers by points: if/else 7 (32 pts), loops 6 (21 pts), boolean chains 2 (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.
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.
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.
Handler.handleUpgradeResponse (cognitive 53) REDACTED:95— Handler.handleUpgradeResponse has cognitive complexity 53 (threshold 15). Drivers by points: if/else 29 (53 pts) (nesting depth added 24). Of this number, 49 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.
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:810— 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:233— 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:130— 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.
caddyhttp.getTLSReplacement (cognitive 47) modules/caddyhttp/replacer.go:498— 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:725— 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.
TLSConfig.MakeTLSClientConfig (cognitive 47) REDACTED:798— TLSConfig.MakeTLSClientConfig has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (34 pts), loops 4 (7 pts), boolean chains 5, match/switch 1 (nesting depth added 18). Of this number, 40 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.
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.
FileServer.Provision (cognitive 45) REDACTED:199— FileServer.Provision has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (34 pts), loops 4 (5 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Transport.buildEnv (cognitive 45) modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go:267— Transport.buildEnv has cognitive complexity 45 (threshold 15). Drivers by points: if/else 25 (33 pts), boolean chains 6, loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 10). 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.
Replacer.replace (cognitive 45) replacer.go:178— Replacer.replace has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 6, loops 2 (3 pts), jumps 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.
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.
Handler.reverseProxy (cognitive 42) modules/caddyhttp/reverseproxy/reverseproxy.go:1242— Handler.reverseProxy has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 17). Of this number, 41 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.
AutomationPolicy.makeCertMagicConfig (cognitive 42) REDACTED:311— AutomationPolicy.makeCertMagicConfig has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (37 pts), boolean chains 5 (nesting depth added 20). Most of this is not in the body itself: 15 of the 42 points are its own statements and the rest belongs to one function literal inside it that branches (line 351). 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.
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.
queryOps.do (cognitive 41) modules/caddyhttp/rewrite/rewrite.go:722— 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.
ConnectionPolicy.buildStandardTLSConfig (cognitive 40) REDACTED:279— ConnectionPolicy.buildStandardTLSConfig has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (36 pts), boolean chains 2, loops 2 (nesting depth added 13). Of this number, 36 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.
FilterEncoder.UnmarshalCaddyfile (cognitive 40) REDACTED:155— 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:49— 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.
Handler.ServeHTTP (cognitive 39) modules/caddyhttp/reverseproxy/reverseproxy.go:673— Handler.ServeHTTP has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 3, 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.
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.
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.
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:152— 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.MatchWithError (cognitive 37) modules/caddyhttp/matchers.go:436— MatchPath.MatchWithError has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (35 pts), boolean chains 1, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MatchPath.matchPatternWithEscapeSequence (cognitive 37) modules/caddyhttp/matchers.go:546— 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.serveBrowse (cognitive 36) REDACTED:85— FileServer.serveBrowse has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 2, loops 1 (2 pts), match/switch 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.
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.
Metrics.scanConfigForHosts (cognitive 36) modules/caddyhttp/metrics.go:232— Metrics.scanConfigForHosts has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 7 (16 pts) (nesting depth added 23). Most of this is not in the body itself: 6 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 239). 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.
CustomLog.loggerAllowed (cognitive 35) logging.go:609— 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.
TLS.cleanStorageUnits (cognitive 35) REDACTED:989— 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:512— 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.
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:411— 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.
Handler.prepareRequest (cognitive 33) modules/caddyhttp/reverseproxy/reverseproxy.go:981— Handler.prepareRequest has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 7, loops 1 (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, 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.
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:1624— 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.
caddycmd.cmdImportStorage (cognitive 32) cmd/storagefuncs.go:65— caddycmd.cmdImportStorage has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 2, 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.
caddyauth.cmdHashPassword (cognitive 32) modules/caddyhttp/caddyauth/command.go:96— 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.
Handler.addForwardedHeaders (cognitive 31) modules/caddyhttp/reverseproxy/reverseproxy.go:1140— 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:1473— 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:862— 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:1388— 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.
fileserver.fileHidden (cognitive 29) REDACTED:727— fileserver.fileHidden has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (25 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.
MatchHost.MatchWithError (cognitive 29) modules/caddyhttp/matchers.go:309— 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.
Handler.copyBuffer (cognitive 29) REDACTED:498— Handler.copyBuffer has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (27 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.
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:1453— 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:1250— 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.
Transport.splitPos (cognitive 28) modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go:502— Transport.splitPos has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (6 pts), boolean chains 4 (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.
LoadBalancing.tryAgain (cognitive 28) modules/caddyhttp/reverseproxy/reverseproxy.go:1622— 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:730— 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:703— 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:188— 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:713— 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:1022— 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.
httpcaddyfile.parseSegmentAsConfig (cognitive 25) caddyconfig/httpcaddyfile/directives.go:374— 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.
caddyhttp.CELMatcherRuntimeFunction (cognitive 25) REDACTED:659— caddyhttp.CELMatcherRuntimeFunction has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (25 pts) (nesting depth added 12). None of this is in the body itself: all 25 points belong to one function literal inside it that branches (line 660). 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.
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:1413— 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:393— 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:223— 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.
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.
caddyhttp.CELMatcherDecorator (cognitive 22) REDACTED:571— caddyhttp.CELMatcherDecorator has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 2 (nesting depth added 6). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 575). 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.
App.Validate (cognitive 22) REDACTED:428— 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:136— 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.
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:282— 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.
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:293— 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.
caddyhttp.CleanPath (cognitive 20) modules/caddyhttp/caddyhttp.go:279— caddyhttp.CleanPath has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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:566— 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.
caddyhttp.DetachResponseWriterAfterHijack (cognitive 19) modules/caddyhttp/responsewriter.go:418— caddyhttp.DetachResponseWriterAfterHijack has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 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.
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:570— 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:255— 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.
ClientAuthentication.ConfigureTLSConfig (cognitive 19) REDACTED:860— ClientAuthentication.ConfigureTLSConfig has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (2 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.
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:903— 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.
caddy.ParseNetworkAddressWithDefaults (cognitive 18) REDACTED:324— caddy.ParseNetworkAddressWithDefaults 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.
caddyfile.makeArgsReplacer (cognitive 18) caddyconfig/caddyfile/importargs.go:98— caddyfile.makeArgsReplacer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2 (nesting depth added 7). None of this is in the body itself: all 18 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.
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:416— 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.HasWindowsShortName (cognitive 18) modules/caddyhttp/matchers.go:751— caddyhttp.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.
caddyhttp.ParseCaddyfileNestedMatcherSet (cognitive 18) modules/caddyhttp/matchers.go:1841— 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.
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:1157— 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.
reverseproxy.handleUpgradeTunnel (cognitive 18) REDACTED:301— reverseproxy.handleUpgradeTunnel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), jumps 2, match/switch 1 (2 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.
echConfig.UnmarshalBinary (cognitive 18) REDACTED:1009— 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:404— 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:464— 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 470). 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:1700— 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:721— 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:1049— 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.
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:666— 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.
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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×1
REDACTED
D4 · Code Duplication· Edited copy of a member (94 corresponding lines) · ×1
Edited copy of a member (94 corresponding lines) modules/caddyhttp/reverseproxy/caddyfile.go:1517— modules/caddyhttp/reverseproxy/caddyfile.go:1517-1610 | modules/caddyhttp/reverseproxy/caddyfile.go:1623-1723 — These two members are one piece of code written twice and then edited apart: 94 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) modules/caddyhttp/matchers.go:1841— modules/caddyhttp/matchers.go:1841-1899 | REDACTED:1135-1178 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) modules/caddyhttp/vars.go:177— modules/caddyhttp/vars.go:177-232 | modules/caddyhttp/vars.go:326-374 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) modules/caddypki/ca.go:318— modules/caddypki/ca.go:318-343 | modules/caddypki/ca.go:383-408 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) modules/caddyhttp/staticerror.go:62— modules/caddyhttp/staticerror.go:62-95 | modules/caddyhttp/staticresp.go:141-179 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) REDACTED:232— REDACTED:232-260 | REDACTED:317-345 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) REDACTED:76— REDACTED:76-102 | REDACTED:104-130 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) modules/caddyhttp/matchers.go:1302— modules/caddyhttp/matchers.go:1302-1341 | modules/caddyhttp/vars.go:274-306 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) caddyconfig/httpcaddyfile/builtins.go:640— caddyconfig/httpcaddyfile/builtins.go:640-679 | modules/caddyhttp/rewrite/caddyfile.go:41-70 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) REDACTED:517— REDACTED:517-544 | REDACTED:597-624 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) modules/caddyhttp/matchers.go:1806— modules/caddyhttp/matchers.go:1806-1837 | modules/caddytls/matchers.go:235-268 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) caddyconfig/httpcaddyfile/builtins.go:64— caddyconfig/httpcaddyfile/builtins.go:64-85 | caddyconfig/httpcaddyfile/options.go:340-366 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) modules/caddyfs/filesystem.go:89— modules/caddyfs/filesystem.go:89-112 | modules/logging/journaldencoder.go:127-154 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) modules/caddytls/fileloader.go:34— modules/caddytls/fileloader.go:34-51 | modules/caddytls/pemloader.go:34-50 | modules/caddytls/storageloader.go:53-73 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) modules/caddyhttp/ip_matchers.go:75— modules/caddyhttp/ip_matchers.go:75-93 | modules/caddytls/matchers.go:517-542 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) REDACTED:781— REDACTED:781-802 | modules/caddytls/leaffileloader.go:80-101 | modules/caddytls/leafstorageloader.go:106-123 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 15+ corresponding lines) · ×1
Edited copies of one member (4 members, 15+ corresponding lines) modules/caddyhttp/ip_matchers.go:214— modules/caddyhttp/ip_matchers.go:214-238 | modules/caddyhttp/matchers.go:376-392 | modules/caddyhttp/matchers.go:856-876 | modules/caddyhttp/matchers.go:1026-1040 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×1
Edited copy of a member (9 corresponding lines) modules/caddypki/acmeserver/policy.go:43— modules/caddypki/acmeserver/policy.go:43-51 | modules/caddypki/acmeserver/policy.go:56-64 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) modules/caddytls/folderloader.go:48— modules/caddytls/folderloader.go:48-57 | modules/caddytls/leaffileloader.go:45-54 | modules/caddytls/leaffolderloader.go:48-57 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
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:539— modules/logging/filters.go:539-579 | modules/logging/filters.go:662-702 — 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:198-235 — 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:1774— modules/caddyhttp/matchers.go:1774-1803 | modules/caddytls/matchers.go:203-232 — 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:1808— modules/caddyhttp/matchers.go:1808-1832 | modules/caddytls/matchers.go:237-263 — 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:1808` 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 (25 lines × 2) REDACTED:104— REDACTED:104-128 | REDACTED:267-291 — 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 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 (24 lines × 2) modules/caddyhttp/matchers.go:1303— modules/caddyhttp/matchers.go:1303-1326 | 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:1303` 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:1331` 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 (21 lines × 2) cmd/storagefuncs.go:77— cmd/storagefuncs.go:77-97 | cmd/storagefuncs.go:164-184 — 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:258— REDACTED:258-273 | REDACTED:440-459 — 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:258` 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:76— caddyconfig/load.go:76-93 | caddyconfig/load.go:147-164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 (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 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 (8–9 lines × 2) REDACTED:641— REDACTED:641-648 | REDACTED:700-708 — 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:700` 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 (16 lines × 2) modules/caddyhttp/reverseproxy/caddyfile.go:1103— modules/caddyhttp/reverseproxy/caddyfile.go:1103-1118 | modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:91-106 — 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.
Duplicated block (6 lines × 3) modules/caddyhttp/fileserver/matcher.go:554— modules/caddyhttp/fileserver/matcher.go:554-559 | modules/caddyhttp/fileserver/matcher.go:575-580 | modules/caddyhttp/fileserver/matcher.go:595-601 — 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/fileserver/matcher.go:554` 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 (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 (6–7 lines × 2) REDACTED:1774— REDACTED:1774-1779 | REDACTED:1142-1148 — 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:1774` 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 × 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 (16 lines × 4) 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 | modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go:81-96 — 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.
Duplicated block (12 lines × 3) modules/caddyhttp/server.go:882— modules/caddyhttp/server.go:882-893 | modules/caddyhttp/server.go:897-908 | modules/caddyhttp/server.go:912-923 — 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: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.
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.
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 listen_reuseUnixSocket_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:1513— `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:1104— `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:1763— `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:664— `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:586— `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:1888— `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) — 9 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 (10 single-owned of 166 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 166 of the 229 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)) (+3 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, caddyconfig/caddyfile/importargs.go, internal/bindcap_linux.go, modules/internal/network/networkproxy.go, listen_reuseUnixSocket_windows.go, modules/caddyhttp/templates/frontmatter.go, caddyconfig/caddyfile/importgraph.go, modules/caddytls/pemloader.go (+1 more).
No ADRs found cmd/caddy/main.go:29— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `cmd/caddy/main.go` makes this repository a deployable product (line 29).
Scattered collaborators — 52 % of calls cross a namespace and only 46 % of collaborators are co-located — group each feature's code into a vertical slice so a call's collaborators sit together.
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 169 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, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 169 of the 229 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, listen_reuseUnixSocket_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.
No security response headers detected caddytest/integration/testdata/issue_7518_unused_block_panic_snippets.conf:5— 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_7518_unused_block_panic_snippets.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: cel.dev/cel-go — `cel.dev/cel-go` is required at v0.32.0 in REDACTED, but v0.33.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get cel.dev/cel-go@v0.33.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/DeRuina/timberjack — `github.com/DeRuina/timberjack` is required at v1.4.8 in REDACTED, but v1.4.10 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.10 && 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/klauspost/compress — `github.com/klauspost/compress` is required at v1.20.3 in REDACTED, but v1.20.4 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.4 && 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.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/klauspost/cpuid/v2@v2.4.2 && 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/quic-go/quic-go — `github.com/quic-go/quic-go` is required at v0.63.0 in REDACTED, but v0.65.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/quic-go/quic-go@v0.65.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/spf13/pflag — `github.com/spf13/pflag` is required at v1.0.10 in REDACTED, but v1.1.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/spf13/pflag@v1.1.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/yuin/goldmark — `github.com/yuin/goldmark` is required at v1.8.6 in REDACTED, but v1.8.7 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/yuin/goldmark@v1.8.7 && 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: golang.org/x/crypto — `golang.org/x/crypto` is required at v0.58.0 in REDACTED, but v0.59.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.59.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.24.0 in REDACTED, but v0.25.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.25.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.49.0 in REDACTED, but v0.50.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.50.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.47.0 in REDACTED, but v0.48.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/term@v0.48.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/tools — `golang.org/x/tools` is required at v0.51.0 in REDACTED, but v0.52.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/tools@v0.52.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 01a1d48e-a8f9-704b-8253-67dd93fc66f0 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 25 · Warnings: 812 · Recommendations: 53 · Info: 19 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 13-11-2026 @ 10:58 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.