Public report of traefik/traefik, published 26 October 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 26 October 2026, 18:51 UTC · Survey ID cd_058b436ab5424a46bfe6ab0e3a8f3cb9
traefik/traefik
Measured 26 October 2026, 18:39 UTC, at code version b46d3ea
Regression: 1 dimension fell since the last survey
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 3 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: 79,624 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 1.7 person-years · Weakest lens: Production Readiness, 49
Findings by how serious they are
46 critical799 serious132 minor
16 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
26 October 2026, 18:39 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
84of 84 dimensions measured by tools.
901of 977 findings point to an exact file and line, so you can open each one in the code. The other 76 concern the repository as a whole, such as missing documentation.
84dimensions across 7 lenses, read from 79,624 lines of product code in 4 projects.
traefik/traefik falls short of our standard for production, in part because seven passwords or keys sit in the current code. It scores 55 out of 100 and is rated Adequate, and 45 of its 46 critical findings are security problems.
Production Readiness, at 49, is the weakest lens and counts most in the score. The best first steps are replacing the seven exposed passwords or keys and switching the old ones off and pinning the dependencies to tagged releases, each worth about 6 points. Raising Production Readiness to 70 would lift the score to about 61.
Twelve known security holes in the packages the code depends on can be used by attackers. Ten passwords or keys in the code's history and seven in the code are open to anyone who can read the repository, and four pipeline steps run downloads nobody checks. Updating the vulnerable packages, replacing each exposed password or key and checking each download against a checksum would close these risks. Pinning each tool to an exact version would fix the four pipeline tools referenced by a changeable name, and the three pipeline steps that install packages without pinning their versions need the packages they install pinned to exact versions. The loop of files that import each other needs breaking.
The product code is 79,624 lines, about €250,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.
Visual & motion safety · Focus outline removed in CSS without a :focus replacement webui/src/components/buttons/SortButton.tsx
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 20 findings
These 20 critical or serious findings were in the previous survey, on 12 October 2026, and are gone from this one.
Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) pkg/provider/consulcatalog/consul_catalog.go
Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) pkg/provider/file/file.go
Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) pkg/provider/kubernetes/gateway/client.go
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) pkg/provider/kubernetes/crd/client.go
Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) pkg/provider/kubernetes/crd/client.go
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) pkg/provider/kubernetes/crd/client.go
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) pkg/provider/kubernetes/gateway/grpcroute.go
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium CVE: GO-2026-4599 REDACTED
Dependency Vulnerabilities · Medium CVE: GO-2026-6603 REDACTED
Supply-chain Provenance & Signing REDACTED
Exception handling · Swallowed exception (caught, then discarded) REDACTED
Rebuild cost: about €250,000 · Estimate
Cost to rebuild
€82,000 to €410,000, for 1,371 to 4,349 hours of work, about 1.7 person-years for 1 to 4 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.8 at a score of 55. 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: 79,624 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: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 7 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED, REDACTED.
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 €250,000 to build again, about 1.7 person-years of work. Its weakest lens is Production Readiness, at 49 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 7 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for low effort, because it clears the 7 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.4 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 123,379 lines over the last 90 days, which is about 500,370 lines a year. At that pace, the extra work comes to an estimated 49.1 to 294.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, 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 — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
175 modules, with 286 dependencies between them. One loop runs through 3 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 135 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/traefik/traefik/v3/pkg/observability/types uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/observability/types, while a change to com/traefik/traefik/v3/pkg/observability/types can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/observability/types uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/tls uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/pkg/tls, while a change to com/traefik/traefik/v3/pkg/tls can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/tls uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/tls uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/tls, while a change to com/traefik/traefik/v3/pkg/tls can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/tls uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/dynamic uses com/traefik/traefik/v3/pkg/ip, so a change to com/traefik/traefik/v3/pkg/ip can break com/traefik/traefik/v3/pkg/config/dynamic, while a change to com/traefik/traefik/v3/pkg/config/dynamic can't break com/traefik/traefik/v3/pkg/ip.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/dynamic uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/dynamic uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/config/dynamic, while a change to com/traefik/traefik/v3/pkg/config/dynamic can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/dynamic uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/dynamic uses com/traefik/traefik/v3/pkg/observability/types, so a change to com/traefik/traefik/v3/pkg/observability/types can break com/traefik/traefik/v3/pkg/config/dynamic, while a change to com/traefik/traefik/v3/pkg/config/dynamic can't break com/traefik/traefik/v3/pkg/observability/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/dynamic uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/dynamic uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/config/dynamic, while a change to com/traefik/traefik/v3/pkg/config/dynamic can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/dynamic uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/middlewares/accesslog uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/middlewares/accesslog, while a change to com/traefik/traefik/v3/pkg/middlewares/accesslog can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/middlewares/accesslog uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/middlewares/accesslog uses com/traefik/traefik/v3/pkg/observability/types, so a change to com/traefik/traefik/v3/pkg/observability/types can break com/traefik/traefik/v3/pkg/middlewares/accesslog, while a change to com/traefik/traefik/v3/pkg/middlewares/accesslog can't break com/traefik/traefik/v3/pkg/observability/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/middlewares/accesslog uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/runtime uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/config/runtime, while a change to com/traefik/traefik/v3/pkg/config/runtime can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/runtime uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/observability/metrics uses com/traefik/traefik/v3/pkg/observability/types, so a change to com/traefik/traefik/v3/pkg/observability/types can break com/traefik/traefik/v3/pkg/observability/metrics, while a change to com/traefik/traefik/v3/pkg/observability/metrics can't break com/traefik/traefik/v3/pkg/observability/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/observability/metrics uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/observability/metrics uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/observability/metrics, while a change to com/traefik/traefik/v3/pkg/observability/metrics can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/observability/metrics uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/pkg/provider, while a change to com/traefik/traefik/v3/pkg/provider can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/provider, while a change to com/traefik/traefik/v3/pkg/provider can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider, while a change to com/traefik/traefik/v3/pkg/provider can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 uses a type in com/traefik/traefik/v3/pkg/types.
com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 uses a type in com/traefik/traefik/v3/pkg/observability/types.
com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 uses com/traefik/traefik/v3/pkg/observability/types, so a change to com/traefik/traefik/v3/pkg/observability/types can break com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 can't break com/traefik/traefik/v3/pkg/observability/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 uses a type in com/traefik/traefik/v3/pkg/config/dynamic. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx uses a type in com/traefik/traefik/v3/pkg/config/dynamic. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/kubernetes/k8s uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/kubernetes/k8s, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/k8s can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/k8s uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/tcp uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/pkg/tcp, while a change to com/traefik/traefik/v3/pkg/tcp can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/tcp uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/tcp uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/tcp, while a change to com/traefik/traefik/v3/pkg/tcp can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/tcp uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/tcp uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/tcp, while a change to com/traefik/traefik/v3/pkg/tcp can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/tcp uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/healthcheck uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/healthcheck, while a change to com/traefik/traefik/v3/pkg/healthcheck can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/healthcheck uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/healthcheck uses com/traefik/traefik/v3/pkg/config/runtime, so a change to com/traefik/traefik/v3/pkg/config/runtime can break com/traefik/traefik/v3/pkg/healthcheck, while a change to com/traefik/traefik/v3/pkg/healthcheck can't break com/traefik/traefik/v3/pkg/config/runtime.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/healthcheck uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/healthcheck uses com/traefik/traefik/v3/pkg/tcp, so a change to com/traefik/traefik/v3/pkg/tcp can break com/traefik/traefik/v3/pkg/healthcheck, while a change to com/traefik/traefik/v3/pkg/healthcheck can't break com/traefik/traefik/v3/pkg/tcp.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/healthcheck uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/plugins uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/pkg/plugins, while a change to com/traefik/traefik/v3/pkg/plugins can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/plugins uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/plugins uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/plugins, while a change to com/traefik/traefik/v3/pkg/plugins can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/plugins uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/plugins uses com/traefik/traefik/v3/pkg/provider, so a change to com/traefik/traefik/v3/pkg/provider can break com/traefik/traefik/v3/pkg/plugins, while a change to com/traefik/traefik/v3/pkg/plugins can't break com/traefik/traefik/v3/pkg/provider.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/plugins uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/acme uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/pkg/provider/acme, while a change to com/traefik/traefik/v3/pkg/provider/acme can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/acme uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/acme uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/provider/acme, while a change to com/traefik/traefik/v3/pkg/provider/acme can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/acme uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/acme uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/provider/acme, while a change to com/traefik/traefik/v3/pkg/provider/acme can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/acme uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/acme uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/acme, while a change to com/traefik/traefik/v3/pkg/provider/acme can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/acme uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/acme uses com/traefik/traefik/v3/pkg/provider, so a change to com/traefik/traefik/v3/pkg/provider can break com/traefik/traefik/v3/pkg/provider/acme, while a change to com/traefik/traefik/v3/pkg/provider/acme can't break com/traefik/traefik/v3/pkg/provider.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/acme uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/consulcatalog uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/provider/consulcatalog, while a change to com/traefik/traefik/v3/pkg/provider/consulcatalog can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/consulcatalog uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/consulcatalog uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/provider/consulcatalog, while a change to com/traefik/traefik/v3/pkg/provider/consulcatalog can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/consulcatalog uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/consulcatalog uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/consulcatalog, while a change to com/traefik/traefik/v3/pkg/provider/consulcatalog can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/consulcatalog uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/consulcatalog uses com/traefik/traefik/v3/pkg/provider, so a change to com/traefik/traefik/v3/pkg/provider can break com/traefik/traefik/v3/pkg/provider/consulcatalog, while a change to com/traefik/traefik/v3/pkg/provider/consulcatalog can't break com/traefik/traefik/v3/pkg/provider.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/consulcatalog uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/docker uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/provider/docker, while a change to com/traefik/traefik/v3/pkg/provider/docker can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/docker uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/docker uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/docker, while a change to com/traefik/traefik/v3/pkg/provider/docker can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/docker uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/docker uses com/traefik/traefik/v3/pkg/provider, so a change to com/traefik/traefik/v3/pkg/provider can break com/traefik/traefik/v3/pkg/provider/docker, while a change to com/traefik/traefik/v3/pkg/provider/docker can't break com/traefik/traefik/v3/pkg/provider.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/docker uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/file uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/pkg/provider/file, while a change to com/traefik/traefik/v3/pkg/provider/file can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/file uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/file uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/provider/file, while a change to com/traefik/traefik/v3/pkg/provider/file can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/file uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/file uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/file, while a change to com/traefik/traefik/v3/pkg/provider/file can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/file uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/file uses com/traefik/traefik/v3/pkg/provider, so a change to com/traefik/traefik/v3/pkg/provider can break com/traefik/traefik/v3/pkg/provider/file, while a change to com/traefik/traefik/v3/pkg/provider/file can't break com/traefik/traefik/v3/pkg/provider.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/file uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/http uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/provider/http, while a change to com/traefik/traefik/v3/pkg/provider/http can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/http uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/http uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/http, while a change to com/traefik/traefik/v3/pkg/provider/http can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/http uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/http uses com/traefik/traefik/v3/pkg/provider, so a change to com/traefik/traefik/v3/pkg/provider can break com/traefik/traefik/v3/pkg/provider/http, while a change to com/traefik/traefik/v3/pkg/provider/http can't break com/traefik/traefik/v3/pkg/provider.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/http uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/kubernetes/gateway uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/provider/kubernetes/gateway, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/gateway can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/gateway uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/kubernetes/gateway uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/provider/kubernetes/gateway, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/gateway can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/gateway uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/kubernetes/gateway uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/kubernetes/gateway, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/gateway can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/gateway uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/traefik/traefik/v3/pkg/provider/kubernetes/gateway uses a type in com/traefik/traefik/v3/pkg/provider/kubernetes/k8s.
com/traefik/traefik/v3/pkg/provider/kubernetes/gateway uses com/traefik/traefik/v3/pkg/provider/kubernetes/k8s, so a change to com/traefik/traefik/v3/pkg/provider/kubernetes/k8s can break com/traefik/traefik/v3/pkg/provider/kubernetes/gateway, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/gateway can't break com/traefik/traefik/v3/pkg/provider/kubernetes/k8s.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/gateway uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/kubernetes/ingress uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/provider/kubernetes/ingress, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/ingress can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/ingress uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/kubernetes/ingress uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/provider/kubernetes/ingress, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/ingress can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/ingress uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/kubernetes/ingress uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/kubernetes/ingress, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/ingress can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/ingress uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/traefik/traefik/v3/pkg/provider/kubernetes/ingress uses a type in com/traefik/traefik/v3/pkg/provider/kubernetes/k8s.
com/traefik/traefik/v3/pkg/provider/kubernetes/ingress uses com/traefik/traefik/v3/pkg/provider/kubernetes/k8s, so a change to com/traefik/traefik/v3/pkg/provider/kubernetes/k8s can break com/traefik/traefik/v3/pkg/provider/kubernetes/ingress, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/ingress can't break com/traefik/traefik/v3/pkg/provider/kubernetes/k8s.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/ingress uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/nomad uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/provider/nomad, while a change to com/traefik/traefik/v3/pkg/provider/nomad can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/nomad uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/nomad uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/nomad, while a change to com/traefik/traefik/v3/pkg/provider/nomad can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/nomad uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/nomad uses com/traefik/traefik/v3/pkg/provider, so a change to com/traefik/traefik/v3/pkg/provider can break com/traefik/traefik/v3/pkg/provider/nomad, while a change to com/traefik/traefik/v3/pkg/provider/nomad can't break com/traefik/traefik/v3/pkg/provider.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/nomad uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/rest uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/pkg/provider/rest, while a change to com/traefik/traefik/v3/pkg/provider/rest can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/rest uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/rest uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/rest, while a change to com/traefik/traefik/v3/pkg/provider/rest can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/rest uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/rest uses com/traefik/traefik/v3/pkg/provider, so a change to com/traefik/traefik/v3/pkg/provider can break com/traefik/traefik/v3/pkg/provider/rest, while a change to com/traefik/traefik/v3/pkg/provider/rest can't break com/traefik/traefik/v3/pkg/provider.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/rest uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/tailscale uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/pkg/provider/tailscale, while a change to com/traefik/traefik/v3/pkg/provider/tailscale can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/tailscale uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/tailscale uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/provider/tailscale, while a change to com/traefik/traefik/v3/pkg/provider/tailscale can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/tailscale uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/tailscale uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/tailscale, while a change to com/traefik/traefik/v3/pkg/provider/tailscale can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/tailscale uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/tailscale uses com/traefik/traefik/v3/pkg/provider, so a change to com/traefik/traefik/v3/pkg/provider can break com/traefik/traefik/v3/pkg/provider/tailscale, while a change to com/traefik/traefik/v3/pkg/provider/tailscale can't break com/traefik/traefik/v3/pkg/provider.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/tailscale uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/proxy/httputil uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/proxy/httputil, while a change to com/traefik/traefik/v3/pkg/proxy/httputil can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/proxy/httputil uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/proxy/httputil uses com/traefik/traefik/v3/pkg/observability/metrics, so a change to com/traefik/traefik/v3/pkg/observability/metrics can break com/traefik/traefik/v3/pkg/proxy/httputil, while a change to com/traefik/traefik/v3/pkg/proxy/httputil can't break com/traefik/traefik/v3/pkg/observability/metrics.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/proxy/httputil uses a module listed above it, which is the healthy direction.
27→38 com/traefik/traefik/v3/pkg/proxy/httputil uses com/traefik/traefik/v3/pkg/server/servicepart of a loop✕
Connections
1 pair of types, where a type in com/traefik/traefik/v3/pkg/proxy/httputil uses a type in com/traefik/traefik/v3/pkg/server/service.
com/traefik/traefik/v3/pkg/proxy/httputil uses com/traefik/traefik/v3/pkg/server/service, so a change to com/traefik/traefik/v3/pkg/server/service can break com/traefik/traefik/v3/pkg/proxy/httputil, while a change to com/traefik/traefik/v3/pkg/proxy/httputil can't break com/traefik/traefik/v3/pkg/server/service.
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/traefik/traefik/v3/pkg/server/router/tcp uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/server/router/tcp, while a change to com/traefik/traefik/v3/pkg/server/router/tcp can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/router/tcp uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/router/tcp uses com/traefik/traefik/v3/pkg/config/runtime, so a change to com/traefik/traefik/v3/pkg/config/runtime can break com/traefik/traefik/v3/pkg/server/router/tcp, while a change to com/traefik/traefik/v3/pkg/server/router/tcp can't break com/traefik/traefik/v3/pkg/config/runtime.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/router/tcp uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/router/tcp uses com/traefik/traefik/v3/pkg/tcp, so a change to com/traefik/traefik/v3/pkg/tcp can break com/traefik/traefik/v3/pkg/server/router/tcp, while a change to com/traefik/traefik/v3/pkg/server/router/tcp can't break com/traefik/traefik/v3/pkg/tcp.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/router/tcp uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/provider/kubernetes/crd, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/crd can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/provider/kubernetes/crd, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/crd can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses a type in com/traefik/traefik/v3/pkg/config/dynamic. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/kubernetes/crd, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/crd can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses a module listed above it, which is the healthy direction.
44 pairs of types, where a type in com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses a type in com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1, so a change to com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1 can break com/traefik/traefik/v3/pkg/provider/kubernetes/crd, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/crd can't break com/traefik/traefik/v3/pkg/provider/kubernetes/crd/traefikio/v1alpha1.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses a type in com/traefik/traefik/v3/pkg/provider/kubernetes/k8s.
com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses com/traefik/traefik/v3/pkg/provider/kubernetes/k8s, so a change to com/traefik/traefik/v3/pkg/provider/kubernetes/k8s can break com/traefik/traefik/v3/pkg/provider/kubernetes/crd, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/crd can't break com/traefik/traefik/v3/pkg/provider/kubernetes/k8s.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses a type in com/traefik/traefik/v3/pkg/provider/kubernetes/gateway.
com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses com/traefik/traefik/v3/pkg/provider/kubernetes/gateway, so a change to com/traefik/traefik/v3/pkg/provider/kubernetes/gateway can break com/traefik/traefik/v3/pkg/provider/kubernetes/crd, while a change to com/traefik/traefik/v3/pkg/provider/kubernetes/crd can't break com/traefik/traefik/v3/pkg/provider/kubernetes/gateway.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/kubernetes/crd uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/observability/types, so a change to com/traefik/traefik/v3/pkg/observability/types can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/observability/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx, so a change to com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/provider/kubernetes/ingress-nginx.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/plugins, so a change to com/traefik/traefik/v3/pkg/plugins can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/plugins.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/provider/acme, so a change to com/traefik/traefik/v3/pkg/provider/acme can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/provider/acme.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/provider/consulcatalog, so a change to com/traefik/traefik/v3/pkg/provider/consulcatalog can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/provider/consulcatalog.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/provider/docker, so a change to com/traefik/traefik/v3/pkg/provider/docker can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/provider/docker.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/provider/file, so a change to com/traefik/traefik/v3/pkg/provider/file can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/provider/file.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/provider/http, so a change to com/traefik/traefik/v3/pkg/provider/http can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/provider/http.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/provider/kubernetes/gateway, so a change to com/traefik/traefik/v3/pkg/provider/kubernetes/gateway can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/provider/kubernetes/gateway.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/provider/kubernetes/ingress, so a change to com/traefik/traefik/v3/pkg/provider/kubernetes/ingress can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/provider/kubernetes/ingress.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/provider/nomad, so a change to com/traefik/traefik/v3/pkg/provider/nomad can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/provider/nomad.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/provider/rest, so a change to com/traefik/traefik/v3/pkg/provider/rest can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/provider/rest.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/config/static uses com/traefik/traefik/v3/pkg/provider/kubernetes/crd, so a change to com/traefik/traefik/v3/pkg/provider/kubernetes/crd can break com/traefik/traefik/v3/pkg/config/static, while a change to com/traefik/traefik/v3/pkg/config/static can't break com/traefik/traefik/v3/pkg/provider/kubernetes/crd.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/config/static uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/observability/tracing uses com/traefik/traefik/v3/pkg/config/static, so a change to com/traefik/traefik/v3/pkg/config/static can break com/traefik/traefik/v3/pkg/observability/tracing, while a change to com/traefik/traefik/v3/pkg/observability/tracing can't break com/traefik/traefik/v3/pkg/config/static.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/observability/tracing uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/aggregator uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/pkg/provider/aggregator, while a change to com/traefik/traefik/v3/pkg/provider/aggregator can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/aggregator uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/aggregator uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/aggregator, while a change to com/traefik/traefik/v3/pkg/provider/aggregator can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/aggregator uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/aggregator uses com/traefik/traefik/v3/pkg/provider, so a change to com/traefik/traefik/v3/pkg/provider can break com/traefik/traefik/v3/pkg/provider/aggregator, while a change to com/traefik/traefik/v3/pkg/provider/aggregator can't break com/traefik/traefik/v3/pkg/provider.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/aggregator uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/aggregator uses com/traefik/traefik/v3/pkg/config/static, so a change to com/traefik/traefik/v3/pkg/config/static can break com/traefik/traefik/v3/pkg/provider/aggregator, while a change to com/traefik/traefik/v3/pkg/provider/aggregator can't break com/traefik/traefik/v3/pkg/config/static.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/aggregator uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/traefik uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/pkg/provider/traefik, while a change to com/traefik/traefik/v3/pkg/provider/traefik can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/traefik uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/provider/traefik, while a change to com/traefik/traefik/v3/pkg/provider/traefik can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/traefik uses com/traefik/traefik/v3/pkg/provider, so a change to com/traefik/traefik/v3/pkg/provider can break com/traefik/traefik/v3/pkg/provider/traefik, while a change to com/traefik/traefik/v3/pkg/provider/traefik can't break com/traefik/traefik/v3/pkg/provider.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/provider/traefik uses com/traefik/traefik/v3/pkg/config/static, so a change to com/traefik/traefik/v3/pkg/config/static can break com/traefik/traefik/v3/pkg/provider/traefik, while a change to com/traefik/traefik/v3/pkg/provider/traefik can't break com/traefik/traefik/v3/pkg/config/static.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/provider/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/proxy/fast uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/proxy/fast, while a change to com/traefik/traefik/v3/pkg/proxy/fast can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/proxy/fast uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/proxy/fast uses com/traefik/traefik/v3/pkg/tcp, so a change to com/traefik/traefik/v3/pkg/tcp can break com/traefik/traefik/v3/pkg/proxy/fast, while a change to com/traefik/traefik/v3/pkg/proxy/fast can't break com/traefik/traefik/v3/pkg/tcp.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/proxy/fast uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/proxy/fast uses com/traefik/traefik/v3/pkg/config/static, so a change to com/traefik/traefik/v3/pkg/config/static can break com/traefik/traefik/v3/pkg/proxy/fast, while a change to com/traefik/traefik/v3/pkg/proxy/fast can't break com/traefik/traefik/v3/pkg/config/static.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/proxy/fast uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/proxy uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/proxy, while a change to com/traefik/traefik/v3/pkg/proxy can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/proxy uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/proxy uses com/traefik/traefik/v3/pkg/proxy/httputil, so a change to com/traefik/traefik/v3/pkg/proxy/httputil can break com/traefik/traefik/v3/pkg/proxy, while a change to com/traefik/traefik/v3/pkg/proxy can't break com/traefik/traefik/v3/pkg/proxy/httputil.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/proxy uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/proxy uses com/traefik/traefik/v3/pkg/config/static, so a change to com/traefik/traefik/v3/pkg/config/static can break com/traefik/traefik/v3/pkg/proxy, while a change to com/traefik/traefik/v3/pkg/proxy can't break com/traefik/traefik/v3/pkg/config/static.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/proxy uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/proxy uses com/traefik/traefik/v3/pkg/proxy/fast, so a change to com/traefik/traefik/v3/pkg/proxy/fast can break com/traefik/traefik/v3/pkg/proxy, while a change to com/traefik/traefik/v3/pkg/proxy can't break com/traefik/traefik/v3/pkg/proxy/fast.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/proxy uses a module listed above it, which is the healthy direction.
35→38 com/traefik/traefik/v3/pkg/proxy uses com/traefik/traefik/v3/pkg/server/servicepart of a loop✕
Connections
2 pairs of types, where a type in com/traefik/traefik/v3/pkg/proxy uses a type in com/traefik/traefik/v3/pkg/server/service.
com/traefik/traefik/v3/pkg/proxy uses com/traefik/traefik/v3/pkg/server/service, so a change to com/traefik/traefik/v3/pkg/server/service can break com/traefik/traefik/v3/pkg/proxy, while a change to com/traefik/traefik/v3/pkg/proxy can't break com/traefik/traefik/v3/pkg/server/service.
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/traefik/traefik/v3/pkg/server/middleware uses com/traefik/traefik/v3/pkg/observability/types, so a change to com/traefik/traefik/v3/pkg/observability/types can break com/traefik/traefik/v3/pkg/server/middleware, while a change to com/traefik/traefik/v3/pkg/server/middleware can't break com/traefik/traefik/v3/pkg/observability/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/middleware uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/middleware uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/server/middleware, while a change to com/traefik/traefik/v3/pkg/server/middleware can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/middleware uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/middleware uses com/traefik/traefik/v3/pkg/middlewares/accesslog, so a change to com/traefik/traefik/v3/pkg/middlewares/accesslog can break com/traefik/traefik/v3/pkg/server/middleware, while a change to com/traefik/traefik/v3/pkg/server/middleware can't break com/traefik/traefik/v3/pkg/middlewares/accesslog.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/middleware uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/middleware uses com/traefik/traefik/v3/pkg/config/runtime, so a change to com/traefik/traefik/v3/pkg/config/runtime can break com/traefik/traefik/v3/pkg/server/middleware, while a change to com/traefik/traefik/v3/pkg/server/middleware can't break com/traefik/traefik/v3/pkg/config/runtime.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/middleware uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/middleware uses com/traefik/traefik/v3/pkg/observability/metrics, so a change to com/traefik/traefik/v3/pkg/observability/metrics can break com/traefik/traefik/v3/pkg/server/middleware, while a change to com/traefik/traefik/v3/pkg/server/middleware can't break com/traefik/traefik/v3/pkg/observability/metrics.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/middleware uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/middleware uses com/traefik/traefik/v3/pkg/plugins, so a change to com/traefik/traefik/v3/pkg/plugins can break com/traefik/traefik/v3/pkg/server/middleware, while a change to com/traefik/traefik/v3/pkg/server/middleware can't break com/traefik/traefik/v3/pkg/plugins.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/middleware uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/middleware uses com/traefik/traefik/v3/pkg/config/static, so a change to com/traefik/traefik/v3/pkg/config/static can break com/traefik/traefik/v3/pkg/server/middleware, while a change to com/traefik/traefik/v3/pkg/server/middleware can't break com/traefik/traefik/v3/pkg/config/static.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/middleware uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/middleware uses com/traefik/traefik/v3/pkg/observability/tracing, so a change to com/traefik/traefik/v3/pkg/observability/tracing can break com/traefik/traefik/v3/pkg/server/middleware, while a change to com/traefik/traefik/v3/pkg/server/middleware can't break com/traefik/traefik/v3/pkg/observability/tracing.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/middleware uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/router uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/server/router, while a change to com/traefik/traefik/v3/pkg/server/router can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/router uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/router uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/server/router, while a change to com/traefik/traefik/v3/pkg/server/router can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/router uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/router uses com/traefik/traefik/v3/pkg/config/runtime, so a change to com/traefik/traefik/v3/pkg/config/runtime can break com/traefik/traefik/v3/pkg/server/router, while a change to com/traefik/traefik/v3/pkg/server/router can't break com/traefik/traefik/v3/pkg/config/runtime.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/router uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/router uses com/traefik/traefik/v3/pkg/server/middleware, so a change to com/traefik/traefik/v3/pkg/server/middleware can break com/traefik/traefik/v3/pkg/server/router, while a change to com/traefik/traefik/v3/pkg/server/router can't break com/traefik/traefik/v3/pkg/server/middleware.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/router uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/config/runtime, so a change to com/traefik/traefik/v3/pkg/config/runtime can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/config/runtime.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/tcp, so a change to com/traefik/traefik/v3/pkg/tcp can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/tcp.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/healthcheck, so a change to com/traefik/traefik/v3/pkg/healthcheck can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/healthcheck.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/proxy/httputil, so a change to com/traefik/traefik/v3/pkg/proxy/httputil can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/proxy/httputil.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/config/static, so a change to com/traefik/traefik/v3/pkg/config/static can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/config/static.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/proxy/fast, so a change to com/traefik/traefik/v3/pkg/proxy/fast can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/proxy/fast.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/proxy, so a change to com/traefik/traefik/v3/pkg/proxy can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/proxy.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/server/middleware, so a change to com/traefik/traefik/v3/pkg/server/middleware can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/server/middleware.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server/service uses com/traefik/traefik/v3/pkg/server/router, so a change to com/traefik/traefik/v3/pkg/server/router can break com/traefik/traefik/v3/pkg/server/service, while a change to com/traefik/traefik/v3/pkg/server/service can't break com/traefik/traefik/v3/pkg/server/router.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server/service uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/pkg/server, while a change to com/traefik/traefik/v3/pkg/server can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server uses com/traefik/traefik/v3/pkg/types, so a change to com/traefik/traefik/v3/pkg/types can break com/traefik/traefik/v3/pkg/server, while a change to com/traefik/traefik/v3/pkg/server can't break com/traefik/traefik/v3/pkg/types.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/pkg/server, while a change to com/traefik/traefik/v3/pkg/server can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server uses com/traefik/traefik/v3/pkg/config/dynamic, so a change to com/traefik/traefik/v3/pkg/config/dynamic can break com/traefik/traefik/v3/pkg/server, while a change to com/traefik/traefik/v3/pkg/server can't break com/traefik/traefik/v3/pkg/config/dynamic.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server uses com/traefik/traefik/v3/pkg/config/runtime, so a change to com/traefik/traefik/v3/pkg/config/runtime can break com/traefik/traefik/v3/pkg/server, while a change to com/traefik/traefik/v3/pkg/server can't break com/traefik/traefik/v3/pkg/config/runtime.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server uses com/traefik/traefik/v3/pkg/observability/metrics, so a change to com/traefik/traefik/v3/pkg/observability/metrics can break com/traefik/traefik/v3/pkg/server, while a change to com/traefik/traefik/v3/pkg/server can't break com/traefik/traefik/v3/pkg/observability/metrics.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server uses com/traefik/traefik/v3/pkg/provider, so a change to com/traefik/traefik/v3/pkg/provider can break com/traefik/traefik/v3/pkg/server, while a change to com/traefik/traefik/v3/pkg/server can't break com/traefik/traefik/v3/pkg/provider.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server uses com/traefik/traefik/v3/pkg/tcp, so a change to com/traefik/traefik/v3/pkg/tcp can break com/traefik/traefik/v3/pkg/server, while a change to com/traefik/traefik/v3/pkg/server can't break com/traefik/traefik/v3/pkg/tcp.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server uses com/traefik/traefik/v3/pkg/server/router/tcp, so a change to com/traefik/traefik/v3/pkg/server/router/tcp can break com/traefik/traefik/v3/pkg/server, while a change to com/traefik/traefik/v3/pkg/server can't break com/traefik/traefik/v3/pkg/server/router/tcp.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server uses com/traefik/traefik/v3/pkg/config/static, so a change to com/traefik/traefik/v3/pkg/config/static can break com/traefik/traefik/v3/pkg/server, while a change to com/traefik/traefik/v3/pkg/server can't break com/traefik/traefik/v3/pkg/config/static.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server uses com/traefik/traefik/v3/pkg/server/middleware, so a change to com/traefik/traefik/v3/pkg/server/middleware can break com/traefik/traefik/v3/pkg/server, while a change to com/traefik/traefik/v3/pkg/server can't break com/traefik/traefik/v3/pkg/server/middleware.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/pkg/server uses com/traefik/traefik/v3/pkg/server/service, so a change to com/traefik/traefik/v3/pkg/server/service can break com/traefik/traefik/v3/pkg/server, while a change to com/traefik/traefik/v3/pkg/server can't break com/traefik/traefik/v3/pkg/server/service.
Position
Below the diagonal: com/traefik/traefik/v3/pkg/server uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/cmd/traefik uses com/traefik/traefik/v3/pkg/safe, so a change to com/traefik/traefik/v3/pkg/safe can break com/traefik/traefik/v3/cmd/traefik, while a change to com/traefik/traefik/v3/cmd/traefik can't break com/traefik/traefik/v3/pkg/safe.
Position
Below the diagonal: com/traefik/traefik/v3/cmd/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/cmd/traefik uses com/traefik/traefik/v3/pkg/observability/types, so a change to com/traefik/traefik/v3/pkg/observability/types can break com/traefik/traefik/v3/cmd/traefik, while a change to com/traefik/traefik/v3/cmd/traefik can't break com/traefik/traefik/v3/pkg/observability/types.
Position
Below the diagonal: com/traefik/traefik/v3/cmd/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/cmd/traefik uses com/traefik/traefik/v3/pkg/tls, so a change to com/traefik/traefik/v3/pkg/tls can break com/traefik/traefik/v3/cmd/traefik, while a change to com/traefik/traefik/v3/cmd/traefik can't break com/traefik/traefik/v3/pkg/tls.
Position
Below the diagonal: com/traefik/traefik/v3/cmd/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/cmd/traefik uses com/traefik/traefik/v3/pkg/middlewares/accesslog, so a change to com/traefik/traefik/v3/pkg/middlewares/accesslog can break com/traefik/traefik/v3/cmd/traefik, while a change to com/traefik/traefik/v3/cmd/traefik can't break com/traefik/traefik/v3/pkg/middlewares/accesslog.
Position
Below the diagonal: com/traefik/traefik/v3/cmd/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/cmd/traefik uses com/traefik/traefik/v3/pkg/observability/metrics, so a change to com/traefik/traefik/v3/pkg/observability/metrics can break com/traefik/traefik/v3/cmd/traefik, while a change to com/traefik/traefik/v3/cmd/traefik can't break com/traefik/traefik/v3/pkg/observability/metrics.
Position
Below the diagonal: com/traefik/traefik/v3/cmd/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/cmd/traefik uses com/traefik/traefik/v3/pkg/plugins, so a change to com/traefik/traefik/v3/pkg/plugins can break com/traefik/traefik/v3/cmd/traefik, while a change to com/traefik/traefik/v3/cmd/traefik can't break com/traefik/traefik/v3/pkg/plugins.
Position
Below the diagonal: com/traefik/traefik/v3/cmd/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/cmd/traefik uses com/traefik/traefik/v3/pkg/provider/tailscale, so a change to com/traefik/traefik/v3/pkg/provider/tailscale can break com/traefik/traefik/v3/cmd/traefik, while a change to com/traefik/traefik/v3/cmd/traefik can't break com/traefik/traefik/v3/pkg/provider/tailscale.
Position
Below the diagonal: com/traefik/traefik/v3/cmd/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/cmd/traefik uses com/traefik/traefik/v3/pkg/config/static, so a change to com/traefik/traefik/v3/pkg/config/static can break com/traefik/traefik/v3/cmd/traefik, while a change to com/traefik/traefik/v3/cmd/traefik can't break com/traefik/traefik/v3/pkg/config/static.
Position
Below the diagonal: com/traefik/traefik/v3/cmd/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/cmd/traefik uses com/traefik/traefik/v3/pkg/observability/tracing, so a change to com/traefik/traefik/v3/pkg/observability/tracing can break com/traefik/traefik/v3/cmd/traefik, while a change to com/traefik/traefik/v3/cmd/traefik can't break com/traefik/traefik/v3/pkg/observability/tracing.
Position
Below the diagonal: com/traefik/traefik/v3/cmd/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/cmd/traefik uses com/traefik/traefik/v3/pkg/provider/aggregator, so a change to com/traefik/traefik/v3/pkg/provider/aggregator can break com/traefik/traefik/v3/cmd/traefik, while a change to com/traefik/traefik/v3/cmd/traefik can't break com/traefik/traefik/v3/pkg/provider/aggregator.
Position
Below the diagonal: com/traefik/traefik/v3/cmd/traefik uses a module listed above it, which is the healthy direction.
com/traefik/traefik/v3/cmd/traefik uses com/traefik/traefik/v3/pkg/server, so a change to com/traefik/traefik/v3/pkg/server can break com/traefik/traefik/v3/cmd/traefik, while a change to com/traefik/traefik/v3/cmd/traefik can't break com/traefik/traefik/v3/pkg/server.
Position
Below the diagonal: com/traefik/traefik/v3/cmd/traefik uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 80% · Adequate · gated by 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
39
High / Critical
A03:2025 — Software Supply Chain Failures
25
High / Critical
A07:2025 — Authentication Failures
18
High / Critical
A02:2025 — Security Misconfiguration
7
High / Critical
Roadmap
Immediately resolve the seven leaked secrets, prioritizing REDACTED, REDACTED, and REDACTED, while pinning six dependencies to stable versions and removing one deprecated module. Codify disaster recovery by implementing infrastructure-as-code for backups, snapshots, and geo-redundancy to ensure business continuity. Finally, harden all outbound HTTP calls by enforcing explicit timeouts, adding retry logic with back-off, and integrating circuit breakers to prevent cascading failures.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 7 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED, REDACTED.
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 46
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 — 799
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 — 132
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 16
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 84 of 84 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 84 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, 901 of 977 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .ts, .tsx, .go, and our analyzer cannot run the .go test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 79.7% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero. In the meantime, produce a coverage report in a standard format (lcov — `vitest --coverage`, `jest --coverage`, `bun test --coverage --coverage-reporter=lcov`, or `nyc`, or `go test -coverprofile=coverage.out ./...`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures and real coverage will be read. You can widen what we reach: optional: produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then both halves are read on the next scan.
D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 161 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 294 test source file(s) (.go) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Go module (REDACTED/go.sum), but the licence verdict published here was taken over its npm package dependencies. Nothing was read about its Go dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its npm package dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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.
D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressroute.go`, `pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressroutetcp.go`, `pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressrouteudp.go`, `pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_middleware.go`, `pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_middlewaretcp.go`, … (+27 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (docs/content/user-guides/docker-compose/basic-example/docker-compose.yml). compose up failed (exit 18 — an image could not be pulled) — traefik Pulling whoami Pulling traefik Error Get "https://registry-1.docker.io/v2/": Forbidden whoami Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: traefik Pulling whoami Pulling whoami Error Get "https://registry-1.docker.io/v2/": Forbidden traefik Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped.
C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Go is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Go is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security 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 web-security controls.
X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's Go is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality 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 is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
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.
96 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Provider.build at 88. A further 2 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being Headers.HasSecureHeadersDefined at 29 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: pkg/config/dynamic/middlewares.go (Headers.HasSecureHeadersDefined at 29), pkg/middlewares/ingressnginx/snippet/collector.go (snippet.buildCollectableAction at 17). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 91 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with Provider.build (cyclomatic 88), Builder.buildConstructor (cyclomatic 81), Provider.loadConfigurationFromCRD (cyclomatic 75). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cyclomatic Complexity from 5.2 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 165 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 19 bodies over 60 down to 60 or less in Cognitive Complexity — start with Provider.build (cognitive 267), Provider.loadConfigurationFromCRD (cognitive 196), Provider.watchNewDomains (cognitive 142). — 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 19 together lifts Cognitive Complexity from 2.0 to about 4.1/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.5 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 13 MethodTooLong finding(s) in God Classes — start with REDACTED (5), translator.go (2), build.go. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 11 FileTooLong finding(s) in God Classes — start with REDACTED (3), build.go, httproute.go. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 7 FunctionTooLong finding(s) in God Classes — start with prometheus.go, SideNavBar.tsx, traefik.go. — One of this dimension's main actionable groups (7 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
248 duplicated block group(s) detected. A further 20 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 79 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 19 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with tcproute.go (3), handler_http.go (2), collector.go (2). — One of this dimension's main actionable groups (19 warning-level).
Resolve the 18 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with config.go (7), REDACTED (4), handler_overview.go. — One of this dimension's main actionable groups (18 warning-level).
Resolve the 17 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with REDACTED (3), action.go (2), pdocker.go (2). — One of this dimension's main actionable groups (17 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling7.3 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
3 production modules (npm+Go), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence.
Off the main sequence: github.com/traefik/traefik/dynamic/ext
What to do
Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_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.
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
1406 test methods: 1127 unit, 279 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 161 `it`/`test` case(s) across 33 test file(s) declaring at least one; its tier split is read from package names and paths only. The Go suite contributes 1245 test case(s) across 273 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 2 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.9 / 10Stronggated by 2 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 1 zero-assertion, 1 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 161 tests. Measured on the JavaScript/TypeScript suite only — at least 294 test source file(s) (.go) went unread, so its test quality is unmeasured and is not in these counts.
No assertions: should render the toast poolwebui/src/components/ToastPool.spec.tsx:10
Fixed-sleep synchronisation: should return true when verification succeedswebui/src/utils/workers/scriptVerification.spec.ts:50
What to do
Resolve the 1 No assertions finding(s) in Test Quality — start with ToastPool.spec.tsx. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Fixed-sleep synchronisation finding(s) in Test Quality — start with scriptVerification.spec.ts. — One of this dimension's main actionable groups (1 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
52 outdated, 1 author-deprecated direct Go module(s), 6 pinning or checksum defect(s). 119 of 119 direct requirement(s) were graded against proxy.golang.org (0 not served there, 10 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/armon/go-socks5 · ×6
Deprecated module: github.com/golang/protobuf
Outdated: github.com/Masterminds/sprig/v3 · ×52
What to do
Resolve the 6 Dependency pinned to a stale untagged commit finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 1 Deprecated module finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).
Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 7 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (7 issue-level).
Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 45 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 45 production dependency(ies) this repository's committed lockfile resolves, across 1 product REDACTED manifest(s). Its 3 `devDependencies` declaration(s) are excluded: a consumer installs none of them. ★ DEPTH: this is the DIRECT production set the lockfile resolves, NOT the transitive closure — only one of the four lock dialects this pass reads states a full graph, so a banned licence pulled in only by a dependency's OWN dependencies is outside this verdict, exactly as the JVM arm's declaration-site verdict is. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. ★ COVERAGE OF THIS VERDICT: it grades this repository's npm package dependencies and nothing else. The repository also declares a Go module (REDACTED/go.sum) and a Python pyproject.toml/requirements.txt (pip/uv/Poetry), and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 20 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (3), build.go, translator.go. — One of this dimension's main actionable groups (20 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.5 / 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.
13 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is webui/src/components/resources/DetailsCard.tsx. Counted over 273 of the 513 production source files in this repository: 239 are under the ~2,400-byte size floor this dimension measures over, and the remaining 1 have no attributable history left to measure.
Off-boarding risk: anonymized user #1
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.
99 deducted task-comment markers across 79624 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 · ×99webui/src/App.tsx:20
What to do
Resolve the 99 TodoComment finding(s) in Explicit Debt — start with REDACTED (15), REDACTED (4), config_test.go (4). — One of this dimension's main actionable groups (99 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: 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. 178 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: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
2 of 4 build units (Go, Python, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
10 finding(s): 0 critical, 10 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 10 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (10 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
39 finding(s): 0 critical, 14 high, 13 medium, 12 low. semgrep hit a parse error in 35 file(s) — `pkg/provider/file/fixtures/yaml/template_file.yml`, `pkg/provider/file/fixtures/yaml/template_in_directory_file01.yml`, `pkg/provider/file/fixtures/yaml/template_in_directory_file02.yml`, `pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressroute.go` (lines 37–38, line 39, line 40), `pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressroutetcp.go` (lines 37–38, line 39, line 40), … (+30 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 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
+ 9 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
Resolve the 12 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (10), REDACTED, REDACTED. — One of this dimension's main actionable groups (12 issue-level).
Resolve the 7 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4), REDACTED (3). — One of this dimension's main actionable groups (7 warning-level).
Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 3 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 2 Low IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
13 of 274 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is pkg/provider/ecs/ecs.go. Counted over 274 of the 513 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned file · ×13pkg/provider/ecs/ecs.go:1
Orphaned files with no living knowledge
✓ On the Gold path — maintain.
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 7 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Do you agree with this assessment?
AC2 · Forms & labels5.2 / 10Adequate✓ 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.
This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. — webui/src/components/tables/TableFilter.tsx:82
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.
Do you agree with this assessment?
AC3 · Page structure4.8 / 10Weak✓ Tool-verified
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.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it. (×2) — webui/index.dev.html:3, webui/index.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`&:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — webui/src/components/buttons/SortButton.tsx:20
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add vitest-axe to verify at runtime, then gate it in CI. What was searched, so you can tell an absence from a miss: the 109 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Accessibility linting is already configured — assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
Package `dashboard` serves requests (request-handler function literals run on a goroutine per request, and every one sees the same package variables and captured values) but writes that shared state outside any lock (err; e.g. `err` in `Append` at line 113). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process. — pkg/api/dashboard/dashboard.go:113
`Capture` serves requests (net/http handlers run on a goroutine per request, and every one shares the single `Capture` value the router holds) but writes its fields outside any lock (rr, crw; e.g. `rr` in `renew` at line 117). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process. — pkg/middlewares/capture/capture.go:74
What to do
Go: guard the state handlers share with a sync.Mutex held for the whole update (`mu.Lock(); defer mu.Unlock()`), make counters sync/atomic types (atomic.Int64) and caches a sync.Map, or keep per-request data in locals and the request context. `go test -race` over a handler test confirms the race and then its fix.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 5 of 6 project(s) that lack one — worth up to 1.7 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
webui/readme.md names Node.js 22, but the repository declares pinned 24. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — webui/readme.md:23
What to do
Reconcile the README with reality: webui/readme.md names Node.js 22, but the repository declares pinned 24.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning6.0 / 10Adequate✓ Tool-verified
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
What to do
Keep implementation types off the public surface (Go: an unexported name, or move it under `internal/`) — even for a small library, every public type is a stability contract.
Do you agree with this assessment?
P2 · Observability8.5 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `pkg/plugins/fixtures/withoutsocket`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Do you agree with this assessment?
P5 · DR & Backup3.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Codify backups + geo-recovery in IaC (snapshot/replication/geo-redundant) to back the DR plan.
No persistence guard on critical data stores — use Docker named volumes (or your orchestrator's persistent-volume equivalent) so the data store can't be wiped by a container recreate (or, in cloud, set purge-protection / soft-delete / prevent_destroy).
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. — pkg/collector/collector.go:90
What to do
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 80 use(s) across 86,767 production line(s) (~0.9/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
Go: on hot paths, reuse buffers and objects through sync.Pool, preallocate slices and maps with make([]T, 0, n) / make(map[K]V, n), size builders with Grow, append with strconv.Append*, and reslice with buf[:0] instead of allocating anew.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
10 of the duplicated blocks reported below have copies in at least two of the sibling directories certificates, http, tcp, udp under webui/src/pages/. That concentration is one structural fact, not 10 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 10 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — webui/src/pages/http/HttpServices.tsx:18
6 of the duplicated blocks reported below have copies in at least two of the sibling directories icons, middlewares, resources, routers, services under webui/src/components/. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — webui/src/components/icons/providers/index.tsx:52
webui/src/pages/http/HttpServices.tsx:18 · webui/src/pages/tcp/TcpServices.tsx:18 · webui/src/pages/udp/UdpServices.tsx:18 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — webui/src/pages/http/HttpServices.tsx:18
webui/src/pages/http/HttpMiddlewares.tsx:19 · webui/src/pages/tcp/TcpMiddlewares.tsx:19 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — webui/src/pages/http/HttpMiddlewares.tsx:19
webui/src/pages/tcp/TcpRouters.tsx:39 · webui/src/pages/udp/UdpRouters.tsx:25 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — webui/src/pages/tcp/TcpRouters.tsx:39
webui/src/pages/http/HttpRouters.tsx:1 · webui/src/pages/tcp/TcpRouters.tsx:1 — these 2 files are line-for-line copies of one another — 85 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — webui/src/pages/http/HttpRouters.tsx:1
webui/src/pages/certificates/Certificates.tsx:75 · webui/src/pages/http/HttpMiddlewares.tsx:66 · webui/src/pages/http/HttpRouters.tsx:99 · webui/src/pages/http/HttpServices.tsx:65 · +5 more site(s) not listed — the 9 copies are spread across 4 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 9 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — webui/src/pages/certificates/Certificates.tsx:75
webui/src/components/icons/providers/index.tsx:52 · webui/src/components/resources/ProviderIcon.tsx:46 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — webui/src/components/icons/providers/index.tsx:52
webui/src/components/middlewares/MiddlewareDetail.tsx:41 · webui/src/components/routers/RouterDetail.tsx:27 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — webui/src/components/middlewares/MiddlewareDetail.tsx:41
webui/src/components/services/MirrorServices.tsx:15 · webui/src/components/services/WeightedServices.tsx:15 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — webui/src/components/services/MirrorServices.tsx:15
webui/src/components/middlewares/MiddlewareDefinition.tsx:9 · webui/src/components/services/ServiceDefinition.tsx:9 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — webui/src/components/middlewares/MiddlewareDefinition.tsx:9
webui/src/pages/certificates/Certificates.tsx:48 · webui/src/pages/http/HttpMiddlewares.tsx:41 · webui/src/pages/http/HttpRouters.tsx:70 · webui/src/pages/http/HttpServices.tsx:39 · +5 more site(s) not listed — the 9 copies are spread across 9 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — webui/src/pages/certificates/Certificates.tsx:48
webui/src/pages/hub-demo/icons/api.tsx:6 · webui/src/pages/hub-demo/icons/portal.tsx:6 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — webui/src/pages/hub-demo/icons/api.tsx:6
webui/src/components/routers/RouterDetail.tsx:21 · webui/src/components/services/ServiceDetail.tsx:23 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — webui/src/components/routers/RouterDetail.tsx:21
webui/src/pages/dashboard/Dashboard.tsx:96 · webui/src/pages/dashboard/Dashboard.tsx:115 · webui/src/pages/dashboard/Dashboard.tsx:134 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — webui/src/pages/dashboard/Dashboard.tsx:96
webui/src/components/icons/providers/index.tsx:31 · webui/src/components/icons/providers/index.tsx:55 · webui/src/components/resources/ProviderIcon.tsx:28 · webui/src/components/resources/ProviderIcon.tsx:49 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — webui/src/components/icons/providers/index.tsx:31
webui/src/pages/certificates/Certificates.tsx:22 · webui/src/pages/http/HttpMiddlewares.tsx:21 · webui/src/pages/tcp/TcpMiddlewares.tsx:21 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — webui/src/pages/certificates/Certificates.tsx:22
webui/src/components/tables/AriaTableSkeleton.tsx:29 · webui/src/components/tables/AriaTableSkeleton.tsx:37 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — webui/src/components/tables/AriaTableSkeleton.tsx:29
webui/src/pages/tcp/TcpRouters.tsx:21 · webui/src/pages/udp/UdpRouters.tsx:19 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — webui/src/pages/tcp/TcpRouters.tsx:21
webui/src/pages/http/HttpMiddleware.tsx:6 · webui/src/pages/http/HttpRouter.tsx:6 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — webui/src/pages/http/HttpMiddleware.tsx:6
webui/src/pages/http/HttpMiddleware.tsx:1 · webui/src/pages/http/HttpRouter.tsx:1 · webui/src/pages/http/HttpService.tsx:1 · webui/src/pages/tcp/TcpMiddleware.tsx:1 · +4 more site(s) not listed — the 8 copies are spread across 8 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — webui/src/pages/http/HttpMiddleware.tsx:1
webui/src/pages/tcp/TcpMiddleware.tsx:6 · webui/src/pages/tcp/TcpRouter.tsx:6 · webui/src/pages/tcp/TcpService.tsx:6 · webui/src/pages/udp/UdpRouter.tsx:6 · +1 more site(s) not listed — the 5 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 5 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — webui/src/pages/tcp/TcpMiddleware.tsx:6
webui/src/components/resources/ResourceErrors.tsx:22 · webui/src/components/routers/RouterFlowDiagram.tsx:190 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — webui/src/components/resources/ResourceErrors.tsx:22
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
(anonymous) has cyclomatic complexity 16 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — webui/src/components/services/ServiceHealthCheck.tsx:16
(anonymous) has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — webui/src/components/icons/providers/index.tsx:26
CertificateDetails has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — webui/src/components/certificates/CertificateDetails.tsx:15
(anonymous) has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — webui/src/components/resources/ProviderIcon.tsx:23
(anonymous) has cyclomatic complexity 13 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — webui/src/mocks/utils.ts:22
RouterFlowDiagram has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — webui/src/components/routers/RouterFlowDiagram.tsx:81
SideNav has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — webui/src/layout/navigation/SideNavBar.tsx:125
useFetchWithPagination has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — webui/src/hooks/use-fetch-with-pagination.tsx:30
Dashboard has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — webui/src/pages/dashboard/Dashboard.tsx:50
Do you agree with this assessment?
R3 · Large Files10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
Do you agree with this assessment?
R4 · Test Coverage9.7 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×4) — webui/src/components/resources/ProviderIcon.tsx:1, webui/src/index.tsx:1, webui/src/hooks/use-previous.tsx:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code9.2 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 4 application, 9 tooling and 38 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (4 application, 9 tooling, 38 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×3) — webui/src/components/resources/ProviderIcon.tsx, webui/src/hooks/use-previous.tsx, webui/src/utils/wait.ts
Nothing imports this binding — it is safe to review for removal. (×11) — webui/src/components/certificates/CertificateDetails.tsx:106, webui/src/components/resources/ResourceStatus.tsx:6, webui/src/components/tables/TableFilter.tsx:114, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
webui/src/layout/navigation/index.ts → webui/src/layout/navigation/SideNavBar.tsx → webui/src/layout/navigation/index.ts (one verified cycle inside a mutually-dependent group of 8 files) — webui/src/layout/navigation/index.ts:4
What to do
Break each cycle by extracting the shared piece into a module both sides can import.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. 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 rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. 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 rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether functions that make a cancellable request accept or pass on a context.Context or an AbortSignal (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 12/15 functions that make a cancellable request (fetch, axios, ky, ofetch; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`fetchVersion` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — webui/src/contexts/version.tsx:27
`ServeUDP` 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, …)`. — pkg/udp/proxy.go:22
`fetchConfigurationData` 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, …)`. — pkg/provider/http/http.go:153
What to do
Thread a context.Context or an AbortSignal through functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. 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 rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. 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. (×19) — pkg/udp/conn.go:155, pkg/udp/conn.go:159, pkg/server/aggregator.go:274, …
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
~2.3 `!` null assertions per 1k TypeScript source lines — 16 assertion(s) across the 7026 source line(s) of the 121 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: webui/src/pages/http/HttpMiddleware.tsx (2), webui/src/pages/http/HttpRouter.tsx (2), webui/src/pages/tcp/TcpMiddleware.tsx (2). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
What to do
The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 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 — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 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.
Not included — 43 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AX1 Captive dependencies — Not applicable: this repository's Go imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript 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.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) 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
AX6 Interface segregation — no exported interface declares behaviour
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — compose up failed (exit 18 — an image could not be pulled) — traefik Pulling whoami Pulling traefik Error Get "https://registry-1.docker.io/v2/": Forbidden whoami Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: traefik Pulling whoami Pulling whoami Error Get "https://registry-1.docker.io/v2/": Forbidden traefik Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
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# only; Go, JavaScript, TypeScript 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+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .go, .ts, .tsx, 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
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.go), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 32 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
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 measured — polyglot repository, one half has no runner
DM1 Domain Modelling — applicable but not scored (1 of 2 signals for this style — below the bar we score at): 1 value object(s)
ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (2 integration event(s))
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage data present for 128 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R5 Dependency Freshness — uses a yarn lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
S1 Web-Security Posture — Not assessed: these web-security 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 web-security 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.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
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
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
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — 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.
TodoComment webui/src/App.tsx:20— // TODO: Restore the loader. — 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 pkg/udp/proxy.go:12— // TODO: maybe optimize by pre-resolving it at proxy creation time — 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 pkg/tls/certificate.go:179— // TODO: Refactor to avoid useless verifyChain (ex: when insecureskipverify is false) — 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 pkg/tls/certificate_store.go:271— // TODO: assert equality after removing the trailing dots? — 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 pkg/tls/certificate_store_test.go:17— // TODO Add tests for defaultCert — 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 pkg/server/aggregator.go:19— // TODO: see if we can use DeepCopies inside, so that the given argument is left — 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 pkg/server/aggregator.go:241— // TODO: rework this naming whenever we'll introduce a resource reference mechanism not based on a string. — 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 pkg/server/aggregator.go:460— // TODO: check if we can remove this and rely on the SetDefaults instead. — 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 pkg/server/server_entrypoint_tcp.go:527— // TODO: Look into configuring keepAlive period through listenConfig instead of our custom tcpKeepAliveListener, to reactivate MultipathTCP? — 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:140— // TODO: use e.Server.CloseGracefully() when available. — 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:312— // TODO Handle accesslog and metrics with multiple service name — 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:391— // TODO Handle accesslog and metrics with multiple service name — 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:429— // TODO: should we keep this config value as Go is now handling stream response correctly? — 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:452— // TODO: remove this empty check when all providers apply default values. — 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 pkg/server/service/loadbalancer/wrr/wrr_test.go:162— // TODO(mpl): if test gets flaky, add channel or something here to signal that — 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 pkg/server/service/loadbalancer/failover/failover.go:85— // TODO: move reusable request to a common package at some point. — 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 pkg/server/router/router.go:185— // TODO: Improve this part. Relying on models is a shortcut to get the entrypoint observability configuration. Maybe we should pass down the static configuration. — 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 pkg/server/router/router.go:212— // TODO: Improve this part. Relying on models is a shortcut to get the entrypoint observability configuration. Maybe we should pass down the static configuration. — 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:133— // TODO -- Check if ProxyProtocol changes the first bytes of the request — 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 pkg/server/middleware/middlewares.go:388— // TODO missing metrics / accessLog — 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 pkg/proxy/fast/connpool_test.go:125— // TODO: make the test stable if possible. — 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 pkg/proxy/fast/proxy.go:303— // TODO: do not wait to write the full request before reading the response (to handle "100 Continue"). — 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 pkg/proxy/fast/proxy.go:304— // TODO: this is currently impossible with fasthttp to write the request partially (headers only). — 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 pkg/provider/tailscale/provider.go:90— // TODO: what should we do if the fetched certificate is going to expire before the next refresh tick? — 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 pkg/provider/tailscale/provider.go:271— // TODO: we always send back to traefik core the set of certificates — 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.
Hotspot: pkg/provider/kubernetes/ingress-nginx/build.go pkg/provider/kubernetes/ingress-nginx/build.go:57— pkg/provider/kubernetes/ingress-nginx/build.go changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in Provider.build at line 57. 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/ingress-nginx/build.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:248— REDACTED changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 75 in Provider.loadConfigurationFromCRD at line 248. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/provider/kubernetes/gateway/kubernetes.go pkg/provider/kubernetes/gateway/kubernetes.go:604— pkg/provider/kubernetes/gateway/kubernetes.go changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in Provider.loadGatewayListeners at line 604. 2 of those changes were fix/bug commits, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/gateway/kubernetes.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: pkg/provider/kubernetes/ingress-nginx/translator.go pkg/provider/kubernetes/ingress-nginx/translator.go:24— pkg/provider/kubernetes/ingress-nginx/translator.go changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in Provider.translate at line 24. 2 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/ingress-nginx/translator.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: pkg/config/static/static_config.go pkg/config/static/static_config.go:296— pkg/config/static/static_config.go changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in Configuration.SetEffectiveConfiguration at line 296. 1 of those changes was a fix/bug commit, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/config/static/static_config.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/server/server_entrypoint_tcp.go pkg/server/server_entrypoint_tcp.go:643— pkg/server/server_entrypoint_tcp.go changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in server.newHTTPServer at line 643. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/server/server_entrypoint_tcp.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: pkg/provider/kubernetes/gateway/httproute.go pkg/provider/kubernetes/gateway/httproute.go:29— pkg/provider/kubernetes/gateway/httproute.go changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in Provider.loadHTTPRoute at line 29. 1 of those changes was a fix/bug commit, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/gateway/httproute.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: pkg/provider/kubernetes/gateway/tlsroute.go pkg/provider/kubernetes/gateway/tlsroute.go:24— pkg/provider/kubernetes/gateway/tlsroute.go changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in Provider.loadTLSRoutes at line 24. 2 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-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/gateway/tlsroute.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: pkg/provider/kubernetes/ingress/kubernetes.go pkg/provider/kubernetes/ingress/kubernetes.go:220— pkg/provider/kubernetes/ingress/kubernetes.go changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in Provider.loadConfigurationFromIngresses at line 220. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/ingress/kubernetes.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: pkg/provider/kubernetes/crd/kubernetes_http.go pkg/provider/kubernetes/crd/kubernetes_http.go:29— pkg/provider/kubernetes/crd/kubernetes_http.go changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in Provider.loadIngressRouteConfiguration at line 29. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/crd/kubernetes_http.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: pkg/server/middleware/middlewares.go pkg/server/middleware/middlewares.go:102— pkg/server/middleware/middlewares.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in Builder.buildConstructor at line 102. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/server/middleware/middlewares.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: pkg/provider/kubernetes/gateway/client.go pkg/provider/kubernetes/gateway/client.go:131— pkg/provider/kubernetes/gateway/client.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in clientWrapper.WatchAll at line 131. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/gateway/client.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: pkg/provider/kubernetes/gateway/grpcroute.go pkg/provider/kubernetes/gateway/grpcroute.go:23— pkg/provider/kubernetes/gateway/grpcroute.go changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in Provider.loadGRPCRoute at line 23. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/gateway/grpcroute.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: pkg/server/router/router.go pkg/server/router/router.go:91— pkg/server/router/router.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Manager.ParseRouterTree at line 91. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/server/router/router.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: pkg/middlewares/auth/forward.go pkg/middlewares/auth/forward.go:172— pkg/middlewares/auth/forward.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in forwardAuth.ServeHTTP at line 172. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/middlewares/auth/forward.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:912— REDACTED changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in Provider.renewCertificates at line 912. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: pkg/provider/kubernetes/gateway/tcproute.go pkg/provider/kubernetes/gateway/tcproute.go:22— pkg/provider/kubernetes/gateway/tcproute.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in Provider.loadTCPRoutes at line 22. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/gateway/tcproute.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: pkg/provider/kubernetes/crd/kubernetes_tcp.go pkg/provider/kubernetes/crd/kubernetes_tcp.go:20— pkg/provider/kubernetes/crd/kubernetes_tcp.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in Provider.loadIngressRouteTCPConfiguration at line 20. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/crd/kubernetes_tcp.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: pkg/provider/kubernetes/crd/kubernetes_udp.go pkg/provider/kubernetes/crd/kubernetes_udp.go:17— pkg/provider/kubernetes/crd/kubernetes_udp.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in Provider.loadIngressRouteUDPConfiguration at line 17. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/crd/kubernetes_udp.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: pkg/provider/kubernetes/gateway/status.go pkg/provider/kubernetes/gateway/status.go:42— pkg/provider/kubernetes/gateway/status.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in statusReport.Flush at line 42. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 17:18:19 +01:00' --until='2026-10-26 17:18:19 +01:00' --full-history --no-merges -- pkg/provider/kubernetes/gateway/status.go`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Duplicated block (9 lines × 2) pkg/api/handler_http.go:220— pkg/api/handler_http.go:220-228 | pkg/api/handler_tcp.go:215-223 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 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 (9 lines × 2) pkg/api/handler_tcp.go:158— pkg/api/handler_tcp.go:158-166 | pkg/api/handler_udp.go:137-145 — before extracting anything, compare `pkg/api/handler_tcp.go` and `pkg/api/handler_udp.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 58 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 (9 lines × 2) pkg/middlewares/inflightreq/inflight_req.go:27— pkg/middlewares/inflightreq/inflight_req.go:27-35 | pkg/middlewares/ratelimiter/rate_limiter.go:46-54 — 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 `pkg/middlewares/inflightreq/inflight_req.go:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) pkg/middlewares/ingressnginx/snippet/action.go:900— pkg/middlewares/ingressnginx/snippet/action.go:900-908 | pkg/middlewares/ingressnginx/snippet/action.go:925-933 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) pkg/middlewares/ingressnginx/snippet/collector.go:323— pkg/middlewares/ingressnginx/snippet/collector.go:323-331 | pkg/middlewares/ingressnginx/snippet/collector.go:335-343 — 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 `pkg/middlewares/ingressnginx/snippet/collector.go:323` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) pkg/observability/tracing/tracing.go:98— pkg/observability/tracing/tracing.go:98-107 | pkg/observability/tracing/tracing.go:146-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) pkg/provider/acme/challenge_tls.go:144— pkg/provider/acme/challenge_tls.go:144-152 | REDACTED:890-898 — 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 `pkg/provider/acme/challenge_tls.go:144` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) pkg/provider/docker/config.go:56— pkg/provider/docker/config.go:56-64 | pkg/provider/ecs/config.go:46-54 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 156 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/docker/config.go:56` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) pkg/provider/ecs/ecs.go:138— pkg/provider/ecs/ecs.go:138-146 | pkg/provider/http/http.go:102-110 — 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 `pkg/provider/ecs/ecs.go:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:279— pkg/provider/kubernetes/gateway/tcproute.go:279-287 | pkg/provider/kubernetes/gateway/tlsroute.go:295-303 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 196 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 `pkg/provider/kubernetes/gateway/tcproute.go:279` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `p *Provider) loadTCPService(routerName` in one and `routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:292— pkg/provider/kubernetes/gateway/tcproute.go:292-300 | pkg/provider/kubernetes/gateway/tlsroute.go:308-316 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 196 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 `pkg/provider/kubernetes/gateway/tcproute.go:292` 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 first that the copies are not typed on the same thing: the declarations holding them bind `string` to `p *Provider) loadTCPService(routerName` in one and `routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 2) pkg/provider/kubernetes/ingress-nginx/build.go:253— pkg/provider/kubernetes/ingress-nginx/build.go:253-261 | pkg/provider/kubernetes/ingress-nginx/build.go:404-412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) pkg/provider/kubernetes/ingress-nginx/build.go:327— pkg/provider/kubernetes/ingress-nginx/build.go:327-335 | pkg/provider/kubernetes/ingress-nginx/build.go:578-586 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) pkg/config/runtime/runtime_http.go:178— pkg/config/runtime/runtime_http.go:178-186 | pkg/config/runtime/runtime_tcp.go:117-125 — before extracting anything, compare `pkg/config/runtime/runtime_http.go` and `pkg/config/runtime/runtime_tcp.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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. 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 (9 lines × 2) pkg/api/handler_http.go:47— pkg/api/handler_http.go:47-55 | pkg/api/handler_tcp.go:42-50 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 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 (9 lines × 2) pkg/provider/kubernetes/crd/client.go:95— pkg/provider/kubernetes/crd/client.go:95-103 | pkg/provider/kubernetes/gateway/client.go:68-76 — 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 (9 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:331— pkg/provider/kubernetes/gateway/tcproute.go:331-339 | pkg/provider/kubernetes/gateway/tlsroute.go:460-468 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 196 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 `pkg/provider/kubernetes/gateway/tcproute.go:331` 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 (9 lines × 2) pkg/middlewares/ipallowlist/ip_allowlist.go:46— pkg/middlewares/ipallowlist/ip_allowlist.go:46-54 | pkg/middlewares/ipwhitelist/ip_whitelist.go:37-45 — 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 (9 lines × 2) pkg/middlewares/ingressnginx/snippet/collector.go:476— pkg/middlewares/ingressnginx/snippet/collector.go:476-484 | pkg/middlewares/ingressnginx/snippet/collector.go:487-495 — 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 `pkg/middlewares/ingressnginx/snippet/collector.go:476` 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.
Swallowed exception (caught, then discarded) pkg/udp/conn.go:155— `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) pkg/udp/conn.go:159— `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) pkg/server/aggregator.go:274— `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) pkg/provider/tailscale/provider.go:344— `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) pkg/provider/kubernetes/ingress-nginx/build.go:1024— `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) pkg/provider/constraints/constraints_labels.go:57— `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) pkg/provider/constraints/constraints_tags.go:58— `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) pkg/muxer/tcp/mux.go:100— `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) pkg/muxer/http/mux.go:80— `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) pkg/middlewares/requestdecorator/request_decorator.go:58— `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) pkg/middlewares/redirect/redirect_scheme.go:62— `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) pkg/middlewares/ingressnginx/interpolation.go:183— `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) pkg/middlewares/ingressnginx/snippet/action.go:641— `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) pkg/middlewares/forwardedheaders/forwarded_header.go:101— `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) pkg/middlewares/accesslog/logger.go:496— `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) pkg/ip/checker.go:46— `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) pkg/ip/strategy.go:29— `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) pkg/ip/strategy.go:99— `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) pkg/ip/strategy.go:108— `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.
Duplicated block (10 lines × 2) pkg/api/handler_overview.go:263— pkg/api/handler_overview.go:263-272 | pkg/api/handler_overview.go:281-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 `pkg/api/handler_overview.go:263` 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) pkg/api/sort.go:194— pkg/api/sort.go:194-203 | pkg/api/sort.go:312-321 — 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 `pkg/api/sort.go:194` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/api/sort.go:192` calls `sortByFunc`, `serversCount` and `pkg/api/sort.go:310` 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 × 2) pkg/config/runtime/runtime_http.go:26— pkg/config/runtime/runtime_http.go:26-35 | pkg/config/runtime/runtime_tcp.go:21-30 — before extracting anything, compare `pkg/config/runtime/runtime_http.go` and `pkg/config/runtime/runtime_tcp.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 `pkg/config/runtime/runtime_http.go:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) pkg/middlewares/ingressnginx/snippet/snippet.go:181— pkg/middlewares/ingressnginx/snippet/snippet.go:181-190 | pkg/middlewares/ingressnginx/snippet/snippet.go:205-214 — 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) pkg/provider/consulcatalog/config.go:213— pkg/provider/consulcatalog/config.go:213-222 | pkg/provider/nomad/config.go:192-201 — 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 (10 lines × 2) pkg/provider/consulcatalog/config.go:251— pkg/provider/consulcatalog/config.go:251-260 | pkg/provider/nomad/config.go:221-230 — 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 (10 lines × 2) pkg/provider/docker/config.go:167— pkg/provider/docker/config.go:167-176 | pkg/provider/ecs/config.go:138-147 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 156 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (10 lines × 2) pkg/provider/docker/config.go:237— pkg/provider/docker/config.go:237-246 | pkg/provider/ecs/config.go:201-210 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 156 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (10 lines × 2) pkg/provider/docker/config.go:263— pkg/provider/docker/config.go:263-272 | pkg/provider/ecs/config.go:227-236 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 156 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (10 lines × 2) REDACTED:867— REDACTED:867-876 | pkg/provider/kubernetes/ingress/kubernetes.go:929-938 — 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 (10 lines × 2) pkg/provider/kubernetes/gateway/grpcroute.go:154— pkg/provider/kubernetes/gateway/grpcroute.go:154-163 | pkg/provider/kubernetes/gateway/httproute.go:174-183 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 (10 lines × 2) pkg/provider/kubernetes/ingress/kubernetes.go:197— pkg/provider/kubernetes/ingress/kubernetes.go:197-206 | pkg/provider/kubernetes/knative/kubernetes.go:156-165 — 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 `pkg/provider/kubernetes/ingress/kubernetes.go:197` 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) pkg/udp/conn.go:278— pkg/udp/conn.go:278-287 | pkg/udp/conn.go:298-307 — 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 `pkg/udp/conn.go:278` 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 (10 lines × 2) pkg/api/handler_http.go:245— pkg/api/handler_http.go:245-254 | pkg/api/handler_tcp.go:240-249 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 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 (10 lines × 2) REDACTED:203— REDACTED:203-212 | pkg/provider/kubernetes/ingress/kubernetes.go:164-173 — 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 (10 lines × 2) REDACTED:1197— REDACTED:1197-1206 | REDACTED:1360-1369 — 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:1197` 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 (10 lines × 2) pkg/provider/consulcatalog/config.go:127— pkg/provider/consulcatalog/config.go:127-136 | pkg/provider/nomad/config.go:168-177 — 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 `pkg/provider/consulcatalog/config.go:127` 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) pkg/provider/docker/config.go:202— pkg/provider/docker/config.go:202-211 | pkg/provider/ecs/config.go:184-193 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 156 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/docker/config.go:202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/middlewares/accesslog/logger_formatters.go:23— pkg/middlewares/accesslog/logger_formatters.go:23-28 | pkg/middlewares/accesslog/logger_formatters.go:61-66 — 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 `pkg/middlewares/accesslog/logger_formatters.go:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/middlewares/auth/forward.go:338— pkg/middlewares/auth/forward.go:338-343 | pkg/middlewares/ingressnginx/snippet/snippet.go:493-498 — 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 `pkg/middlewares/auth/forward.go:338` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/middlewares/ingressnginx/snippet/action.go:896— pkg/middlewares/ingressnginx/snippet/action.go:896-901 | pkg/middlewares/ingressnginx/snippet/action.go:911-916 — 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 `pkg/middlewares/ingressnginx/snippet/action.go:896` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/middlewares/ingressnginx/snippet/action.go:921— pkg/middlewares/ingressnginx/snippet/action.go:921-926 | pkg/middlewares/ingressnginx/snippet/action.go:936-941 — 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 `pkg/middlewares/ingressnginx/snippet/action.go:921` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/middlewares/replacepath/replace_path.go:56— pkg/middlewares/replacepath/replace_path.go:56-61 | pkg/middlewares/replacepathregex/replace_path_regex.go:69-74 — 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 `pkg/middlewares/replacepath/replace_path.go:56` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/provider/docker/pdocker.go:65— pkg/provider/docker/pdocker.go:65-70 | pkg/provider/docker/pswarm.go:69-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (6 lines × 2) pkg/provider/docker/pdocker.go:139— pkg/provider/docker/pdocker.go:139-144 | pkg/provider/docker/pswarm.go:137-142 — 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 `pkg/provider/docker/pdocker.go:139` 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 (6 lines × 2) pkg/provider/kubernetes/crd/client.go:217— pkg/provider/kubernetes/crd/client.go:217-222 | pkg/provider/kubernetes/knative/client.go:127-132 — 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) pkg/provider/kubernetes/crd/kubernetes_http.go:181— pkg/provider/kubernetes/crd/kubernetes_http.go:181-186 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:133-138 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_http.go` and `pkg/provider/kubernetes/crd/kubernetes_tcp.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 `pkg/provider/kubernetes/crd/kubernetes_http.go:181` 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 (6 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:255— pkg/provider/kubernetes/gateway/tcproute.go:255-260 | pkg/provider/kubernetes/gateway/tlsroute.go:271-276 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 196 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 `pkg/provider/kubernetes/gateway/tcproute.go:255` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `p *Provider) loadTCPService(routerName` in one and `routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) pkg/server/router/router.go:250— pkg/server/router/router.go:250-255 | pkg/server/router/router.go:526-532 — 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 (6 lines × 2) pkg/server/server_entrypoint_tcp.go:149— pkg/server/server_entrypoint_tcp.go:149-154 | pkg/server/server_entrypoint_udp.go:50-55 — 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 `pkg/server/server_entrypoint_tcp.go:149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) pkg/middlewares/denyrouterrecursion/deny_router_recursion.go:59— pkg/middlewares/denyrouterrecursion/deny_router_recursion.go:59-64 | pkg/server/service/loadbalancer/sticky.go:182-188 — 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) pkg/server/server_entrypoint_tcp.go:140— pkg/server/server_entrypoint_tcp.go:140-145 | pkg/server/server_entrypoint_udp.go:41-46 — 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 (6 lines × 2) REDACTED:222— REDACTED:222-227 | REDACTED:175-180 — 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) pkg/middlewares/observability/router.go:49— pkg/middlewares/observability/router.go:49-54 | pkg/middlewares/observability/service.go:36-41 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `pkg/middlewares/observability/router.go:55` calls `SetAttributes`, `String`, `HTTPRoute` and `pkg/middlewares/observability/service.go:42` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) REDACTED:139— REDACTED:139-144 | REDACTED:160-165 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:139` 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 (8 lines × 2) pkg/middlewares/compress/compress.go:213— pkg/middlewares/compress/compress.go:213-220 | pkg/middlewares/compress/compress.go:227-234 — 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 `pkg/middlewares/compress/compress.go:213` 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) pkg/provider/kubernetes/gateway/grpcroute.go:349— pkg/provider/kubernetes/gateway/grpcroute.go:349-356 | pkg/provider/kubernetes/gateway/httproute.go:533-540 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:349` 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 (8 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:87— pkg/provider/kubernetes/gateway/tcproute.go:87-94 | pkg/provider/kubernetes/gateway/tlsroute.go:90-97 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 196 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 `pkg/provider/kubernetes/gateway/tcproute.go:87` 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) pkg/provider/kubernetes/ingress-nginx/client.go:162— pkg/provider/kubernetes/ingress-nginx/client.go:162-169 | pkg/provider/kubernetes/ingress/client.go:162-169 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 159 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (8 lines × 2) pkg/provider/traefik/internal.go:65— pkg/provider/traefik/internal.go:65-72 | pkg/server/aggregator.go:24-31 — 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 `pkg/provider/traefik/internal.go:65` 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 (8 lines × 2) REDACTED:76— REDACTED:76-83 | REDACTED:55-62 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 32 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) REDACTED:143— REDACTED:143-150 | REDACTED:418-425 — 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:143` 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) pkg/proxy/fast/connpool.go:564— pkg/proxy/fast/connpool.go:564-571 | pkg/server/service/kerberos/roundtripper.go:100-107 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) pkg/middlewares/auth/forward.go:415— pkg/middlewares/auth/forward.go:415-422 | pkg/middlewares/auth/forward.go:434-441 — 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 `pkg/middlewares/auth/forward.go:415` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:173— pkg/provider/kubernetes/gateway/tcproute.go:173-180 | pkg/provider/kubernetes/gateway/tlsroute.go:189-196 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 196 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 `pkg/provider/kubernetes/gateway/tcproute.go:173` 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 (8 lines × 2) pkg/provider/kubernetes/gateway/kubernetes.go:224— pkg/provider/kubernetes/gateway/kubernetes.go:224-231 | pkg/provider/kubernetes/knative/kubernetes.go:65-72 — 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 `pkg/provider/kubernetes/gateway/kubernetes.go:224` 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 (8 lines × 2) pkg/provider/kubernetes/gateway/grpcroute.go:166— pkg/provider/kubernetes/gateway/grpcroute.go:166-173 | pkg/provider/kubernetes/gateway/httproute.go:187-194 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:166` 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) pkg/provider/kubernetes/gateway/tcproute.go:319— pkg/provider/kubernetes/gateway/tcproute.go:319-326 | pkg/provider/kubernetes/gateway/tlsroute.go:340-347 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 196 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 `pkg/provider/kubernetes/gateway/tcproute.go:319` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `p *Provider) loadTCPServers(namespace` in one and `namespace` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) pkg/provider/kubernetes/crd/client.go:453— pkg/provider/kubernetes/crd/client.go:453-460 | pkg/provider/kubernetes/ingress/client.go:318-325 — `pkg/provider/kubernetes/crd/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 118 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (8 lines × 2) pkg/provider/kubernetes/crd/client.go:477— pkg/provider/kubernetes/crd/client.go:477-484 | pkg/provider/kubernetes/ingress/client.go:342-349 — `pkg/provider/kubernetes/crd/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 118 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (7 lines × 2) pkg/middlewares/auth/forward.go:315— pkg/middlewares/auth/forward.go:315-321 | pkg/middlewares/ingressnginx/snippet/snippet.go:471-477 — 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 `pkg/middlewares/auth/forward.go:315` 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) pkg/provider/docker/pdocker.go:74— pkg/provider/docker/pdocker.go:74-80 | pkg/provider/docker/pswarm.go:78-84 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) REDACTED:787— REDACTED:787-793 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:162-168 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:787` 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) pkg/provider/kubernetes/crd/kubernetes_http.go:189— pkg/provider/kubernetes/crd/kubernetes_http.go:189-195 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:141-147 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_http.go` and `pkg/provider/kubernetes/crd/kubernetes_tcp.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 `pkg/provider/kubernetes/crd/kubernetes_http.go:189` 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, `pkg/provider/kubernetes/crd/kubernetes_http.go:197` calls `applyRouterTransform` and `pkg/provider/kubernetes/crd/kubernetes_tcp.go:149` 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 (7 lines × 2) pkg/provider/kubernetes/gateway/grpcroute.go:474— pkg/provider/kubernetes/gateway/grpcroute.go:474-480 | pkg/provider/kubernetes/gateway/httproute.go:661-667 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:474` 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 (7 lines × 2) pkg/provider/kubernetes/gateway/httproute.go:344— pkg/provider/kubernetes/gateway/httproute.go:344-350 | pkg/provider/kubernetes/gateway/httproute.go:358-364 — 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 `pkg/provider/kubernetes/gateway/httproute.go:344` 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 (7 lines × 2) pkg/provider/kubernetes/ingress-nginx/translator.go:102— pkg/provider/kubernetes/ingress-nginx/translator.go:102-108 | pkg/provider/kubernetes/ingress-nginx/translator.go:149-155 — 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 `pkg/provider/kubernetes/ingress-nginx/translator.go:102` 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) pkg/provider/merge.go:77— pkg/provider/merge.go:77-83 | pkg/server/aggregator.go:34-40 — 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 `pkg/provider/merge.go:77` 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 (7 lines × 2) pkg/server/router/tcp/postgres.go:63— pkg/server/router/tcp/postgres.go:63-69 | REDACTED:170-176 — 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 `pkg/server/router/tcp/postgres.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 (7 lines × 2) REDACTED:41— REDACTED:41-47 | REDACTED:34-40 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 32 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:41` 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) pkg/server/router/router.go:231— pkg/server/router/router.go:231-237 | pkg/server/router/tcp/manager.go:90-96 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) pkg/server/router/tcp/manager.go:82— pkg/server/router/tcp/manager.go:82-88 | pkg/server/router/udp/router.go:57-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) pkg/cli/deprecation.go:91— pkg/cli/deprecation.go:91-97 | pkg/cli/deprecation.go:115-121 — 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) pkg/middlewares/ingressnginx/snippet/action.go:378— pkg/middlewares/ingressnginx/snippet/action.go:378-384 | pkg/middlewares/ingressnginx/snippet/action.go:833-839 — 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 `pkg/middlewares/ingressnginx/snippet/action.go:378` 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.
MethodTooLong: Provider.build pkg/provider/kubernetes/ingress-nginx/build.go:57— MethodTooLong — build runs 362 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 262 over it, 3.62× 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: Provider.loadConfigurationFromCRD REDACTED:248— MethodTooLong — loadConfigurationFromCRD runs 308 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 208 over it, 3.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.
MethodTooLong: Builder.buildConstructor pkg/server/middleware/middlewares.go:102— MethodTooLong — buildConstructor runs 205 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Provider.loadGatewayListeners pkg/provider/kubernetes/gateway/kubernetes.go:604— MethodTooLong — loadGatewayListeners runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× 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: Provider.translate pkg/provider/kubernetes/ingress-nginx/translator.go:24— MethodTooLong — translate runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× 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: Provider.loadConfigurationFromIngresses pkg/provider/kubernetes/ingress/kubernetes.go:220— MethodTooLong — loadConfigurationFromIngresses runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Provider.listInstances pkg/provider/ecs/ecs.go:207— MethodTooLong — listInstances runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× 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: forwardAuth.ServeHTTP pkg/middlewares/auth/forward.go:172— MethodTooLong — ServeHTTP runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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: Provider.loadConfigurationFromGateways pkg/provider/kubernetes/gateway/kubernetes.go:377— MethodTooLong — loadConfigurationFromGateways runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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: Provider.loadIngressRouteConfiguration pkg/provider/kubernetes/crd/kubernetes_http.go:29— MethodTooLong — loadIngressRouteConfiguration 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: Provider.buildMiddlewareChain pkg/provider/kubernetes/ingress-nginx/translator.go:505— MethodTooLong — buildMiddlewareChain 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.
MethodTooLong: Provider.loadService pkg/provider/kubernetes/ingress/kubernetes.go:583— MethodTooLong — loadService runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: conn.handleResponse pkg/proxy/fast/connpool.go:133— MethodTooLong — handleResponse runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× 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 (5 lines × 2) pkg/api/dashboard/dashboard.go:48— pkg/api/dashboard/dashboard.go:48-52 | pkg/api/dashboard/dashboard.go:113-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. 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 (5 lines × 2) pkg/middlewares/ingressnginx/snippet/action.go:146— pkg/middlewares/ingressnginx/snippet/action.go:146-152 | pkg/middlewares/ingressnginx/snippet/action.go:238-242 — 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 `pkg/middlewares/ingressnginx/snippet/action.go:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) pkg/middlewares/ingressnginx/snippet/action.go:153— pkg/middlewares/ingressnginx/snippet/action.go:153-157 | pkg/middlewares/ingressnginx/snippet/action.go:243-247 — 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 `pkg/middlewares/ingressnginx/snippet/action.go:153` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) pkg/muxer/http/matcher.go:46— pkg/muxer/http/matcher.go:46-50 | pkg/muxer/http/matcher_v2.go:144-148 — 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 `pkg/muxer/http/matcher.go:46` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) pkg/provider/consulcatalog/config.go:22— pkg/provider/consulcatalog/config.go:22-26 | pkg/provider/nomad/config.go:22-26 — 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 `pkg/provider/consulcatalog/config.go:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) pkg/provider/kubernetes/crd/client.go:235— pkg/provider/kubernetes/crd/client.go:235-239 | pkg/provider/kubernetes/gateway/client.go:219-223 — 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 (5 lines × 2) REDACTED:187— REDACTED:187-191 | REDACTED:195-199 — 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 (5 lines × 2) pkg/healthcheck/healthcheck.go:133— pkg/healthcheck/healthcheck.go:133-137 | pkg/healthcheck/healthcheck_tcp.go:96-100 — before extracting anything, compare `pkg/healthcheck/healthcheck.go` and `pkg/healthcheck/healthcheck_tcp.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 (5 lines × 2) pkg/provider/kubernetes/crd/client.go:497— pkg/provider/kubernetes/crd/client.go:497-501 | pkg/provider/kubernetes/ingress/client.go:351-355 — `pkg/provider/kubernetes/crd/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 118 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (5 lines × 2) pkg/provider/docker/config.go:33— pkg/provider/docker/config.go:33-38 | pkg/provider/ecs/config.go:24-28 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 156 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/docker/config.go:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) pkg/middlewares/ingressnginx/snippet/action.go:177— pkg/middlewares/ingressnginx/snippet/action.go:177-181 | pkg/middlewares/ingressnginx/snippet/action.go:267-271 — 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 `pkg/middlewares/ingressnginx/snippet/action.go:177` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) pkg/middlewares/accesslog/logger_formatters.go:37— pkg/middlewares/accesslog/logger_formatters.go:37-41 | pkg/middlewares/accesslog/logger_formatters.go:70-74 — 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 `pkg/middlewares/accesslog/logger_formatters.go:37` 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.
FileTooLong: gateway/kubernetes.go pkg/provider/kubernetes/gateway/kubernetes.go— FileTooLong — 1410 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: Provider (26 blocks, 86-2214). The bar is 500 significant lines; this is 910 over it, 2.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 — 1149 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 649 over it, 2.30× 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: ingress-nginx/build.go pkg/provider/kubernetes/ingress-nginx/build.go— FileTooLong — 778 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: Provider (15 blocks, 57-1184). The bar is 500 significant lines; this is 278 over it, 1.56× 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: gateway/httproute.go pkg/provider/kubernetes/gateway/httproute.go— FileTooLong — 717 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: Provider (9 blocks, 29-791). The bar is 500 significant lines; this is 217 over it, 1.43× 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 — 686 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: Provider (23 blocks, 137-1109). The bar is 500 significant lines; this is 186 over it, 1.37× 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: server/server_entrypoint_tcp.go pkg/server/server_entrypoint_tcp.go— FileTooLong — 619 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 119 over it, 1.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ingress/kubernetes.go pkg/provider/kubernetes/ingress/kubernetes.go— FileTooLong — 604 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: Provider (11 blocks, 42-834). The bar is 500 significant lines; this is 104 over it, 1.21× 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: snippet/action.go pkg/middlewares/ingressnginx/snippet/action.go— FileTooLong — 586 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 86 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: crd/kubernetes_http.go pkg/provider/kubernetes/crd/kubernetes_http.go— FileTooLong — 568 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: configBuilder (11 blocks, 318-937). The bar is 500 significant lines; this is 68 over it, 1.14× 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: gateway/client.go pkg/provider/kubernetes/gateway/client.go— FileTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded), about 68% of them inside a single declaration: clientWrapper (26 blocks, 34-794). The bar is 500 significant lines; this is 40 over it, 1.08× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: ingress-nginx/translator.go pkg/provider/kubernetes/ingress-nginx/translator.go— FileTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: Provider (5 blocks, 24-677). The bar is 500 significant lines; this is 24 over it, 1.05× 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.
Duplicated block (12 lines × 2) pkg/middlewares/auth/forward.go:233— pkg/middlewares/auth/forward.go:233-244 | pkg/middlewares/ingressnginx/snippet/snippet.go:400-411 — 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 `pkg/middlewares/auth/forward.go:233` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (12 lines × 2) pkg/plugins/builder.go:43— pkg/plugins/builder.go:43-54 | pkg/plugins/builder.go:78-89 — 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 `pkg/plugins/builder.go:43` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) REDACTED:694— REDACTED:694-705 | REDACTED:742-753 — 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:694` 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) pkg/provider/consulcatalog/config.go:328— pkg/provider/consulcatalog/config.go:328-339 | pkg/provider/nomad/config.go:289-300 — 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 `pkg/provider/consulcatalog/config.go:328` 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 (12 lines × 2) pkg/provider/kubernetes/crd/kubernetes_http.go:360— pkg/provider/kubernetes/crd/kubernetes_http.go:360-371 | pkg/provider/kubernetes/crd/kubernetes_http.go:822-833 — 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 (12 lines × 2) pkg/provider/kubernetes/crd/kubernetes_http.go:694— pkg/provider/kubernetes/crd/kubernetes_http.go:694-705 | pkg/provider/kubernetes/ingress/kubernetes.go:682-693 — 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 `pkg/provider/kubernetes/crd/kubernetes_http.go:694` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/provider/kubernetes/ingress-nginx/client.go:236— pkg/provider/kubernetes/ingress-nginx/client.go:236-247 | pkg/provider/kubernetes/ingress/client.go:228-239 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 159 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/ingress-nginx/client.go:236` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) pkg/provider/kubernetes/ingress-nginx/translator.go:265— pkg/provider/kubernetes/ingress-nginx/translator.go:265-276 | pkg/provider/kubernetes/ingress-nginx/translator.go:293-304 — 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 `pkg/provider/kubernetes/ingress-nginx/translator.go:265` 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) pkg/provider/kubernetes/ingress/kubernetes.go:356— pkg/provider/kubernetes/ingress/kubernetes.go:356-367 | pkg/provider/kubernetes/ingress/kubernetes.go:790-801 — 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 `pkg/provider/kubernetes/ingress/kubernetes.go:356` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) REDACTED:368— REDACTED:368-380 | pkg/middlewares/retry/retry.go:383-394 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) pkg/middlewares/gatewayapi/headermodifier/request_header_modifier.go:25— pkg/middlewares/gatewayapi/headermodifier/request_header_modifier.go:25-36 | pkg/middlewares/gatewayapi/headermodifier/response_header_modifier.go:24-35 — 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 (17 lines × 2) pkg/config/dynamic/tcp_config.go:118— pkg/config/dynamic/tcp_config.go:118-134 | pkg/config/dynamic/udp_config.go:72-88 — before extracting anything, compare `pkg/config/dynamic/tcp_config.go` and `pkg/config/dynamic/udp_config.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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.
Duplicated block (17 lines × 2) pkg/config/static/static_config.go:397— pkg/config/static/static_config.go:397-413 | pkg/config/static/static_config.go:428-444 — 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 `pkg/config/static/static_config.go:397` 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 (17 lines × 2) pkg/provider/consulcatalog/config.go:280— pkg/provider/consulcatalog/config.go:280-296 | pkg/provider/nomad/config.go:250-266 — 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 (17 lines × 2) pkg/provider/docker/config.go:289— pkg/provider/docker/config.go:289-305 | pkg/provider/ecs/config.go:253-269 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 156 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (17 lines × 2) pkg/provider/kubernetes/crd/kubernetes_tcp.go:215— pkg/provider/kubernetes/crd/kubernetes_tcp.go:215-231 | pkg/provider/kubernetes/crd/kubernetes_udp.go:129-145 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_tcp.go` and `pkg/provider/kubernetes/crd/kubernetes_udp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 127 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. 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) pkg/provider/kubernetes/crd/kubernetes_tcp.go:234— pkg/provider/kubernetes/crd/kubernetes_tcp.go:234-250 | pkg/provider/kubernetes/crd/kubernetes_udp.go:148-164 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_tcp.go` and `pkg/provider/kubernetes/crd/kubernetes_udp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 127 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 `pkg/provider/kubernetes/crd/kubernetes_tcp.go:234` 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 (17 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:156— pkg/provider/kubernetes/gateway/tcproute.go:156-172 | pkg/provider/kubernetes/gateway/tlsroute.go:172-188 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 196 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 `pkg/provider/kubernetes/gateway/tcproute.go: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 (17 lines × 2) pkg/provider/kubernetes/ingress-nginx/client.go:376— pkg/provider/kubernetes/ingress-nginx/client.go:376-392 | pkg/provider/kubernetes/ingress/client.go:298-314 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 159 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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) pkg/tcp/wrr_load_balancer.go:139— pkg/tcp/wrr_load_balancer.go:139-155 | pkg/udp/wrr_load_balancer.go:109-125 — 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 `pkg/tcp/wrr_load_balancer.go:139` 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) pkg/middlewares/ipwhitelist/ip_whitelist.go:30— pkg/middlewares/ipwhitelist/ip_whitelist.go:30-40 | pkg/middlewares/tcp/ipwhitelist/ip_whitelist.go:27-37 — 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) pkg/observability/tracing/tracing.go:132— pkg/observability/tracing/tracing.go:132-142 | pkg/observability/tracing/tracing.go:175-185 — 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 `pkg/observability/tracing/tracing.go:132` 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 (11 lines × 2) pkg/provider/consulcatalog/config.go:69— pkg/provider/consulcatalog/config.go:69-79 | pkg/provider/nomad/config.go:58-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/consulcatalog/config.go:69` 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) pkg/provider/file/file.go:455— pkg/provider/file/file.go:455-465 | pkg/provider/http/http.go:205-215 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/file/file.go:455` 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 (11 lines × 2) REDACTED:413— REDACTED:413-423 | REDACTED:624-634 — 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:413` 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) pkg/provider/kubernetes/crd/kubernetes_tcp.go:270— pkg/provider/kubernetes/crd/kubernetes_tcp.go:270-280 | pkg/provider/kubernetes/crd/kubernetes_udp.go:182-192 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_tcp.go` and `pkg/provider/kubernetes/crd/kubernetes_udp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 127 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 `pkg/provider/kubernetes/crd/kubernetes_tcp.go:270` 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 × 2) pkg/provider/kubernetes/gateway/httproute.go:934— pkg/provider/kubernetes/gateway/httproute.go:934-944 | pkg/provider/kubernetes/gateway/httproute.go:956-966 — 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 `pkg/provider/kubernetes/gateway/httproute.go:934` 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 `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 × 2) pkg/provider/kubernetes/ingress-nginx/convert.go:10— pkg/provider/kubernetes/ingress-nginx/convert.go:10-20 | pkg/provider/kubernetes/ingress/convert.go:10-20 — `pkg/provider/kubernetes/ingress-nginx/convert.go` and `pkg/provider/kubernetes/ingress/convert.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (11 lines × 2) REDACTED:48— REDACTED:48-58 | REDACTED:41-51 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 32 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:48` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×8
Members sharing a duplicated core (4 members, 50+ identical tokens) pkg/middlewares/ingressnginx/rewritetarget/rewrite_target.go:86— pkg/middlewares/ingressnginx/rewritetarget/rewrite_target.go:86-173 | pkg/middlewares/replacepathregex/replace_path_regex.go:48-92 | pkg/middlewares/stripprefix/strip_prefix.go:56-89 | pkg/middlewares/stripprefixregex/strip_prefix_regex.go:49-90 — 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) pkg/middlewares/ingressnginx/snippet/collector.go:419— pkg/middlewares/ingressnginx/snippet/collector.go:419-429 | pkg/middlewares/ingressnginx/snippet/collector.go:431-441 | pkg/middlewares/ingressnginx/snippet/collector.go:443-453 | pkg/middlewares/ingressnginx/snippet/collector.go:455-465 — 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) pkg/provider/consulcatalog/config.go:21— pkg/provider/consulcatalog/config.go:21-111 | pkg/provider/docker/config.go:32-105 | pkg/provider/ecs/config.go:23-93 | pkg/provider/nomad/config.go:21-90 — 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) pkg/provider/consulcatalog/config.go:275— pkg/provider/consulcatalog/config.go:275-320 | pkg/provider/docker/config.go:288-325 | pkg/provider/ecs/config.go:252-289 | pkg/provider/nomad/config.go:245-285 — 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) pkg/provider/kubernetes/crd/client.go:131— pkg/provider/kubernetes/crd/client.go:131-156 | pkg/provider/kubernetes/gateway/client.go:103-128 | pkg/provider/kubernetes/ingress-nginx/client.go:73-97 | pkg/provider/kubernetes/ingress/client.go:87-111 — 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) pkg/provider/kubernetes/crd/client.go:463— pkg/provider/kubernetes/crd/client.go:463-473 | pkg/provider/kubernetes/gateway/client.go:399-409 | pkg/provider/kubernetes/ingress-nginx/client.go:321-331 | pkg/provider/kubernetes/ingress/client.go:328-338 — 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) REDACTED:1828— REDACTED:1828-1856 | pkg/provider/kubernetes/gateway/kubernetes.go:2048-2076 | pkg/provider/kubernetes/ingress-nginx/kubernetes.go:401-433 | pkg/provider/kubernetes/ingress/kubernetes.go:999-1031 — 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) pkg/provider/kubernetes/gateway/grpcroute.go:23— pkg/provider/kubernetes/gateway/grpcroute.go:23-117 | pkg/provider/kubernetes/gateway/httproute.go:29-123 | pkg/provider/kubernetes/gateway/tcproute.go:22-115 | pkg/provider/kubernetes/gateway/tlsroute.go:24-131 — 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.
FunctionTooLong: metrics.initStandardRegistry pkg/observability/metrics/prometheus.go:105— FunctionTooLong — initStandardRegistry runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× 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: SideNavBar.SideNav webui/src/layout/navigation/SideNavBar.tsx:125— FunctionTooLong — SideNav runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× 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: main.setupServer cmd/traefik/traefik.go:181— FunctionTooLong — setupServer 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.
FunctionTooLong: DetailsCard.DetailsCard webui/src/components/resources/DetailsCard.tsx:39— FunctionTooLong — DetailsCard runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× 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: server.newHTTPServer pkg/server/server_entrypoint_tcp.go:643— FunctionTooLong — newHTTPServer runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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: PaginatedTable.PaginatedTable webui/src/components/tables/PaginatedTable.tsx:21— FunctionTooLong — PaginatedTable runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× 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: Dashboard.Dashboard webui/src/pages/dashboard/Dashboard.tsx:50— FunctionTooLong — Dashboard runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× 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 (16 lines × 2) pkg/middlewares/encodedcharacters/encoded_characters.go:39— pkg/middlewares/encodedcharacters/encoded_characters.go:39-54 | pkg/server/router/deny.go:14-29 — 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 `pkg/middlewares/encodedcharacters/encoded_characters.go:39` 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 (16 lines × 2) pkg/provider/docker/config.go:245— pkg/provider/docker/config.go:245-260 | pkg/provider/docker/config.go:271-286 — 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 `pkg/provider/docker/config.go:245` 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 (16 lines × 2) pkg/provider/ecs/config.go:209— pkg/provider/ecs/config.go:209-224 | pkg/provider/ecs/config.go:235-250 — 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 `pkg/provider/ecs/config.go:209` 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 (16 lines × 2) pkg/provider/file/file.go:318— pkg/provider/file/file.go:318-333 | pkg/provider/file/file.go:360-375 — 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 `pkg/provider/file/file.go:318` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) pkg/provider/kubernetes/gateway/grpcroute.go:26— pkg/provider/kubernetes/gateway/grpcroute.go:26-41 | pkg/provider/kubernetes/gateway/httproute.go:32-47 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) pkg/provider/kubernetes/gateway/grpcroute.go:52— pkg/provider/kubernetes/gateway/grpcroute.go:52-67 | pkg/provider/kubernetes/gateway/httproute.go:58-73 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:52` 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 (16 lines × 2) pkg/provider/nomad/nomad.go:325— pkg/provider/nomad/nomad.go:325-340 | pkg/provider/nomad/nomad.go:400-415 — 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 × 3) integration/try/condition.go:23— integration/try/condition.go:23-31 | integration/try/condition.go:43-51 | integration/try/condition.go:63-71 — 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 `integration/try/condition.go:23` 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 × 3) pkg/api/handler_http.go:106— pkg/api/handler_http.go:106-114 | pkg/api/handler_tcp.go:101-109 | pkg/api/handler_udp.go:80-88 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 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 (9 lines × 3) pkg/middlewares/ingressnginx/snippet/collector.go:349— pkg/middlewares/ingressnginx/snippet/collector.go:349-357 | pkg/middlewares/ingressnginx/snippet/collector.go:361-369 | pkg/middlewares/ingressnginx/snippet/collector.go:373-381 — 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 `pkg/middlewares/ingressnginx/snippet/collector.go:349` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) pkg/provider/docker/config.go:312— pkg/provider/docker/config.go:312-320 | pkg/provider/ecs/config.go:276-284 | pkg/provider/nomad/config.go:272-280 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 156 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (9 lines × 3) pkg/provider/docker/pdocker.go:42— pkg/provider/docker/pdocker.go:42-50 | pkg/provider/docker/pswarm.go:46-54 | pkg/provider/ecs/ecs.go:100-108 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/provider/docker/pswarm.go:41` calls `Duration` and `pkg/provider/docker/pdocker.go:37` 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 (9 lines × 3) pkg/middlewares/ipwhitelist/ip_whitelist.go:30— pkg/middlewares/ipwhitelist/ip_whitelist.go:30-38 | pkg/middlewares/tcp/ipallowlist/ip_allowlist.go:27-35 | pkg/middlewares/tcp/ipwhitelist/ip_whitelist.go:27-35 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/middlewares/ipwhitelist/ip_whitelist.go:30` 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 × 3) pkg/provider/kubernetes/gateway/httproute.go:320— pkg/provider/kubernetes/gateway/httproute.go:320-328 | pkg/provider/kubernetes/gateway/tcproute.go:256-264 | pkg/provider/kubernetes/gateway/tlsroute.go:272-280 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/gateway/httproute.go:320` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `routerName` in one and `p *Provider) loadTCPService(routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D12 · Dependency Hygiene· Dependency pinned to a stale untagged commit · ×6
Dependency pinned to a stale untagged commit: github.com/armon/go-socks5 — Direct dependency `github.com/armon/go-socks5` is required at `v0.0.0-20160902184237-e75332964ef5` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2016-09-02, 10.1 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/armon/go-socks5` and has not moved this requirement in 10.1 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/armon/go-socks5` 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/containous/alice — Direct dependency `github.com/containous/alice` is required at `v0.0.0-20181107144136-d83ebdd94cbd` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2018-11-07, 8 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/containous/alice` and has not moved this requirement in 8 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/containous/alice` 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/influxdata/influxdb1-client — Direct dependency `github.com/influxdata/influxdb1-client` is required at `v0.0.0-20200827194710-b269163b24ab` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2020-08-27, 6.2 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/influxdata/influxdb1-client` and has not moved this requirement in 6.2 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/influxdata/influxdb1-client` 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/pmezard/go-difflib — Direct dependency `github.com/pmezard/go-difflib` is required at `v1.0.1-0.20181226105442-5d4384ee4fb2` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2018-12-26, 7.8 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/pmezard/go-difflib` and has not moved this requirement in 7.8 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/pmezard/go-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/stvp/go-udp-testing — Direct dependency `github.com/stvp/go-udp-testing` is required at `v0.0.0-20201019212854-469649b16807` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2020-10-19, 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/stvp/go-udp-testing` and has not moved this requirement in 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/stvp/go-udp-testing` 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/tailscale/tscert — Direct dependency `github.com/tailscale/tscert` is required at `v0.0.0-20230806124524-28a91b69a046` in REDACTED — a pseudo-version, which pins an UNTAGGED commit from 2023-08-06, 3.2 years ago. The pin itself is exact, so this is not a reproducibility defect, and it is not a claim that the module is unmaintained. What it says is that this repository tracks no RELEASE of `github.com/tailscale/tscert` and has not moved this requirement in 3.2 years: every fix the module has published since that commit — including any security fix — is absent from this build, whether the module went quiet or moved on without you. Check whether `github.com/tailscale/tscert` now publishes tagged releases and move the requirement to one; if it publishes none, re-pin to a current commit.
Duplicated block (18 lines × 2) pkg/muxer/http/matcher_v2.go:35— pkg/muxer/http/matcher_v2.go:35-52 | pkg/muxer/http/matcher_v2.go:61-78 — 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 `pkg/muxer/http/matcher_v2.go:35` 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 (18 lines × 2) pkg/provider/consulcatalog/consul_catalog.go:58— pkg/provider/consulcatalog/consul_catalog.go:58-75 | pkg/provider/nomad/nomad.go:67-84 — 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 (18 lines × 2) pkg/provider/docker/config.go:308— pkg/provider/docker/config.go:308-325 | pkg/provider/ecs/config.go:272-289 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 156 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/docker/config.go:308` 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 (18 lines × 2) REDACTED:1375— REDACTED:1375-1392 | REDACTED:1423-1440 — 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) pkg/provider/kubernetes/ingress-nginx/convert.go:52— pkg/provider/kubernetes/ingress-nginx/convert.go:52-69 | pkg/provider/kubernetes/ingress/convert.go:52-69 — `pkg/provider/kubernetes/ingress-nginx/convert.go` and `pkg/provider/kubernetes/ingress/convert.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (18 lines × 2) pkg/server/service/transport.go:67— pkg/server/service/transport.go:67-84 | pkg/server/service/transport.go:88-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/server/service/transport.go:67` 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 (19 lines × 2) pkg/middlewares/redirect/redirect_regex.go:27— pkg/middlewares/redirect/redirect_regex.go:27-45 | pkg/middlewares/redirect/redirect_scheme.go:67-85 — 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 (19 lines × 2) REDACTED:526— REDACTED:526-544 | REDACTED:562-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 `REDACTED:526` 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) pkg/provider/kubernetes/gateway/grpcroute.go:328— pkg/provider/kubernetes/gateway/grpcroute.go:328-346 | pkg/provider/kubernetes/gateway/httproute.go:496-514 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:328` 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 first that the copies are not typed on the same thing: the declarations holding them bind `string` to `routerName` in one and `parentName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (19 lines × 2) pkg/provider/nomad/config.go:196— pkg/provider/nomad/config.go:196-214 | pkg/provider/nomad/config.go:225-243 — 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 `pkg/provider/nomad/config.go:196` 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 (19 lines × 2) pkg/provider/nomad/nomad.go:343— pkg/provider/nomad/nomad.go:343-361 | pkg/provider/nomad/nomad.go:433-451 — 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 `pkg/provider/nomad/nomad.go:343` 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 (14 lines × 2) pkg/provider/configuration.go:39— pkg/provider/configuration.go:39-52 | pkg/provider/configuration.go:110-123 — 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 `pkg/provider/configuration.go:39` 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 (14 lines × 2) pkg/provider/consulcatalog/config.go:217— pkg/provider/consulcatalog/config.go:217-230 | pkg/provider/consulcatalog/config.go:255-268 — 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 (14 lines × 2) pkg/provider/tailscale/provider.go:149— pkg/provider/tailscale/provider.go:149-162 | pkg/provider/tailscale/provider.go:176-189 — 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 (14 lines × 2) pkg/server/service/loadbalancer/hrw/hrw.go:182— pkg/server/service/loadbalancer/hrw/hrw.go:182-195 | REDACTED:198-211 — `pkg/server/service/loadbalancer/hrw/hrw.go` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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) pkg/middlewares/observability/observability.go:124— pkg/middlewares/observability/observability.go:124-137 | pkg/observability/tracing/tracing.go:302-315 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) pkg/api/sort.go:177— pkg/api/sort.go:177-189 | pkg/api/sort.go:298-310 — 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 `pkg/api/sort.go:177` 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, `pkg/api/sort.go:192` calls `sortByFunc`, `serversCount` and `pkg/api/sort.go:313` 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 (13 lines × 2) pkg/provider/consulcatalog/config.go:29— pkg/provider/consulcatalog/config.go:29-41 | pkg/provider/docker/config.go:39-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) pkg/provider/kubernetes/gateway/httproute.go:990— pkg/provider/kubernetes/gateway/httproute.go:990-1002 | pkg/provider/kubernetes/gateway/httproute.go:1024-1036 — 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 `pkg/provider/kubernetes/gateway/httproute.go:990` 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 `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 (13 lines × 2) pkg/middlewares/stripprefix/strip_prefix.go:115— pkg/middlewares/stripprefix/strip_prefix.go:115-127 | pkg/middlewares/stripprefixregex/strip_prefix_regex.go:94-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.
Duplicated block (13 lines × 2) pkg/tls/certificate.go:144— pkg/tls/certificate.go:144-156 | pkg/types/file_or_content.go:20-32 — 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 (8 lines × 3) pkg/config/runtime/runtime_http.go:30— pkg/config/runtime/runtime_http.go:30-37 | pkg/config/runtime/runtime_tcp.go:25-32 | pkg/config/runtime/runtime_udp.go:29-36 — before extracting anything, compare `pkg/config/runtime/runtime_http.go` and `pkg/config/runtime/runtime_tcp.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 `pkg/config/runtime/runtime_http.go:30` 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) pkg/provider/kubernetes/crd/kubernetes_http.go:413— pkg/provider/kubernetes/crd/kubernetes_http.go:413-420 | pkg/provider/kubernetes/crd/kubernetes_http.go:426-433 | pkg/provider/kubernetes/crd/kubernetes_http.go:821-828 — 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.
Duplicated block (8 lines × 3) pkg/provider/kubernetes/gateway/grpcroute.go:277— pkg/provider/kubernetes/gateway/grpcroute.go:277-284 | pkg/provider/kubernetes/gateway/tcproute.go:295-302 | pkg/provider/kubernetes/gateway/tlsroute.go:311-318 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/tcproute.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 58 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 `pkg/provider/kubernetes/gateway/grpcroute.go:277` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `routerName` in one and `p *Provider) loadTCPService(routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 3) pkg/server/service/loadbalancer/hrw/hrw.go:183— pkg/server/service/loadbalancer/hrw/hrw.go:183-190 | pkg/server/service/loadbalancer/leasttime/leasttime.go:289-296 | REDACTED:199-206 — `pkg/server/service/loadbalancer/hrw/hrw.go` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (8 lines × 3) pkg/api/handler_http.go:65— pkg/api/handler_http.go:65-72 | pkg/api/handler_tcp.go:60-67 | pkg/api/handler_udp.go:39-46 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 3) pkg/provider/file/file.go:449— pkg/provider/file/file.go:449-454 | pkg/provider/merge.go:71-76 | pkg/server/aggregator.go:27-32 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/file/file.go:449` 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 (6 lines × 3) pkg/provider/kubernetes/gateway/grpcroute.go:267— pkg/provider/kubernetes/gateway/grpcroute.go:267-272 | pkg/provider/kubernetes/gateway/tcproute.go:269-274 | pkg/provider/kubernetes/gateway/tlsroute.go:285-290 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/tcproute.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 58 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 `pkg/provider/kubernetes/gateway/grpcroute.go:267` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `routerName` in one and `p *Provider) loadTCPService(routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/provider/kubernetes/gateway/tcproute.go:266` calls `Sprintf` and `pkg/provider/kubernetes/gateway/grpcroute.go:264` 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 (6 lines × 3) REDACTED:570— REDACTED:570-575 | REDACTED:183-188 | REDACTED:107-112 — `REDACTED` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 32 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (6 lines × 3) pkg/provider/docker/pdocker.go:139— pkg/provider/docker/pdocker.go:139-144 | pkg/provider/docker/pswarm.go:137-142 | pkg/provider/kv/kv.go:61-66 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/docker/pdocker.go:139` 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 (6 lines × 3) pkg/provider/kubernetes/gateway/grpcroute.go:256— pkg/provider/kubernetes/gateway/grpcroute.go:256-261 | pkg/provider/kubernetes/gateway/tcproute.go:282-287 | pkg/provider/kubernetes/gateway/tlsroute.go:298-303 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/tcproute.go` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 58 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 `pkg/provider/kubernetes/gateway/grpcroute.go:256` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `routerName` in one and `p *Provider) loadTCPService(routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
TooManyFields: IngressConfig pkg/provider/kubernetes/ingress-nginx/annotations.go:13— TooManyFields — 89 stored fields. The bar is 30 stored fields; this is 59 over it, 2.97× 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: location pkg/provider/kubernetes/ingress-nginx/model.go:93— TooManyFields — 46 stored fields beside 1 method. The bar is 30 stored fields; this is 16 over it, 1.53× 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: Middleware pkg/config/dynamic/middlewares.go:27— TooManyFields — 37 stored fields beside 3 methods. The bar is 30 stored fields; this is 7 over it, 1.23× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Headers pkg/config/dynamic/middlewares.go:365— TooManyFields — 33 stored fields beside 3 methods. The bar is 30 stored fields; this is 3 over it, 1.10× 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.
ClassTooLong: Provider pkg/provider/kubernetes/gateway/kubernetes.go:86— ClassTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods, 26 blocks, lines 86-2214. The bar is 400 significant lines; this is 454 over it, 2.14× 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: Provider REDACTED:63— ClassTooLong — 572 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods, 14 blocks, lines 63-1875. The bar is 400 significant lines; this is 172 over it, 1.43× 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: Provider REDACTED:137— ClassTooLong — 493 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods, 23 blocks, lines 137-1109. The bar is 400 significant lines; this is 93 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Provider pkg/provider/kubernetes/ingress/kubernetes.go:42— ClassTooLong — 464 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods, 11 blocks, lines 42-834. The bar is 400 significant lines; this is 64 over it, 1.16× 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 (12 lines × 3) pkg/provider/consulcatalog/config.go:32— pkg/provider/consulcatalog/config.go:32-43 | pkg/provider/docker/config.go:42-53 | pkg/provider/ecs/config.go:32-43 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/consulcatalog/config.go:32` 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) pkg/provider/consulcatalog/config.go:68— pkg/provider/consulcatalog/config.go:68-79 | pkg/provider/docker/config.go:68-79 | pkg/provider/ecs/config.go:58-69 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/consulcatalog/config.go:68` 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 × 3) pkg/provider/kubernetes/crd/client.go:107— pkg/provider/kubernetes/crd/client.go:107-118 | pkg/provider/kubernetes/ingress-nginx/client.go:49-60 | pkg/provider/kubernetes/ingress/client.go:63-74 — `pkg/provider/kubernetes/crd/client.go` and `pkg/provider/kubernetes/ingress-nginx/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 82 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (12 lines × 3) pkg/api/sort.go:47— pkg/api/sort.go:47-58 | pkg/api/sort.go:177-188 | pkg/api/sort.go:298-309 — 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 `pkg/api/sort.go:47` 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 × 3) pkg/provider/kubernetes/crd/kubernetes_http.go:40— pkg/provider/kubernetes/crd/kubernetes_http.go:40-46 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:31-37 | pkg/provider/kubernetes/crd/kubernetes_udp.go:26-32 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_http.go` and `pkg/provider/kubernetes/crd/kubernetes_tcp.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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. 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) pkg/provider/kubernetes/gateway/httproute.go:205— pkg/provider/kubernetes/gateway/httproute.go:205-211 | pkg/provider/kubernetes/gateway/tcproute.go:166-172 | pkg/provider/kubernetes/gateway/tlsroute.go:182-188 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/gateway/httproute.go:205` 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 × 3) pkg/config/dynamic/http_config.go:77— pkg/config/dynamic/http_config.go:77-83 | pkg/config/dynamic/tcp_config.go:40-46 | pkg/config/dynamic/udp_config.go:25-31 — before extracting anything, compare `pkg/config/dynamic/tcp_config.go` and `pkg/config/dynamic/udp_config.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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 (7 lines × 3) pkg/middlewares/ingressnginx/snippet/snippet.go:85— pkg/middlewares/ingressnginx/snippet/snippet.go:85-91 | pkg/middlewares/ingressnginx/snippet/snippet.go:101-107 | pkg/middlewares/ingressnginx/snippet/snippet.go:117-123 — 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 `pkg/middlewares/ingressnginx/snippet/snippet.go:85` 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.
R4 · Test Coverage· No test reaches this file · ×4
No test reaches this file webui/src/components/resources/ProviderIcon.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file webui/src/index.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file webui/src/hooks/use-previous.tsx:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file webui/src/utils/wait.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
Balancer.ServeHTTP (cognitive 23) pkg/server/service/loadbalancer/leasttime/leasttime.go:184— Balancer.ServeHTTP has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (23 pts) (nesting depth added 12). 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.
Balancer.ServeHTTP (cognitive 23) REDACTED:137— Balancer.ServeHTTP has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (23 pts) (nesting depth added 12). 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.
Balancer.ServeHTTP (cognitive 23) pkg/server/service/loadbalancer/wrr/wrr.go:151— Balancer.ServeHTTP has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (23 pts) (nesting depth added 12). 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.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (5 members, 50+ identical tokens) pkg/provider/kubernetes/crd/client.go:159— pkg/provider/kubernetes/crd/client.go:159-293 | pkg/provider/kubernetes/gateway/client.go:131-276 | pkg/provider/kubernetes/ingress-nginx/client.go:127-250 | pkg/provider/kubernetes/ingress/client.go:140-243 | pkg/provider/kubernetes/knative/client.go:112-164 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:98— REDACTED:98-179 | pkg/provider/kubernetes/gateway/kubernetes.go:234-304 | pkg/provider/kubernetes/ingress-nginx/kubernetes.go:187-247 | pkg/provider/kubernetes/ingress/kubernetes.go:89-162 | pkg/provider/kubernetes/knative/kubernetes.go:75-140 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) pkg/server/service/loadbalancer/hrw/hrw.go:79— pkg/server/service/loadbalancer/hrw/hrw.go:79-116 | pkg/server/service/loadbalancer/leasttime/leasttime.go:134-171 | REDACTED:87-124 | pkg/server/service/loadbalancer/wrr/wrr.go:101-138 | pkg/tcp/wrr_load_balancer.go:77-114 — These 5 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 5 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 5 times.
Duplicated block (24 lines × 2) pkg/middlewares/gatewayapi/redirect/request_redirect.go:99— pkg/middlewares/gatewayapi/redirect/request_redirect.go:99-122 | pkg/middlewares/gatewayapi/urlrewrite/url_rewrite.go:51-74 — 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 `pkg/middlewares/gatewayapi/redirect/request_redirect.go:99` 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 (24 lines × 2) pkg/provider/docker/config.go:67— pkg/provider/docker/config.go:67-90 | pkg/provider/ecs/config.go:57-80 — `pkg/provider/docker/config.go` and `pkg/provider/ecs/config.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 13 separate duplicated blocks between them, totalling at least 156 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/docker/config.go:67` 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 (24 lines × 2) pkg/provider/kubernetes/ingress-nginx/convert.go:25— pkg/provider/kubernetes/ingress-nginx/convert.go:25-48 | pkg/provider/kubernetes/ingress/convert.go:25-48 — `pkg/provider/kubernetes/ingress-nginx/convert.go` and `pkg/provider/kubernetes/ingress/convert.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 53 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (21 lines × 2) pkg/healthcheck/healthcheck.go:152— pkg/healthcheck/healthcheck.go:152-172 | pkg/healthcheck/healthcheck_tcp.go:115-135 — before extracting anything, compare `pkg/healthcheck/healthcheck.go` and `pkg/healthcheck/healthcheck_tcp.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 `pkg/healthcheck/healthcheck.go:152` 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 (21 lines × 2) pkg/muxer/http/mux.go:261— pkg/muxer/http/mux.go:261-281 | pkg/muxer/tcp/mux.go:266-286 — 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 (21 lines × 2) pkg/provider/consulcatalog/consul_catalog.go:424— pkg/provider/consulcatalog/consul_catalog.go:424-444 | pkg/provider/consulcatalog/consul_catalog.go:477-497 — 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 × 4) pkg/provider/file/file.go:444— pkg/provider/file/file.go:444-453 | pkg/provider/http/http.go:195-204 | pkg/provider/kubernetes/ingress-nginx/translator.go:25-34 | pkg/provider/merge.go:66-75 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/file/file.go:444` 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) pkg/provider/kubernetes/crd/client.go:464— pkg/provider/kubernetes/crd/client.go:464-473 | pkg/provider/kubernetes/gateway/client.go:400-409 | pkg/provider/kubernetes/ingress-nginx/client.go:322-331 | pkg/provider/kubernetes/ingress/client.go:329-338 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. 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 (10 lines × 4) pkg/provider/kubernetes/gateway/grpcroute.go:241— pkg/provider/kubernetes/gateway/grpcroute.go:241-250 | pkg/provider/kubernetes/gateway/httproute.go:307-316 | pkg/provider/kubernetes/gateway/tcproute.go:243-252 | pkg/provider/kubernetes/gateway/tlsroute.go:259-268 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:241` 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 first that the copies are not typed on the same thing: the declarations holding them bind `string` to `routerName` in one and `p *Provider) loadTCPService(routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 4) REDACTED:164— REDACTED:164-171 | pkg/provider/kubernetes/gateway/kubernetes.go:289-296 | pkg/provider/kubernetes/ingress-nginx/kubernetes.go:231-238 | pkg/provider/kubernetes/ingress/kubernetes.go:146-153 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:164` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/provider/kubernetes/gateway/kubernetes.go:283` calls `Flush` and `REDACTED:158` 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 × 4) pkg/provider/kubernetes/crd/kubernetes_http.go:713— pkg/provider/kubernetes/crd/kubernetes_http.go:713-720 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:286-293 | pkg/provider/kubernetes/crd/kubernetes_udp.go:198-205 | pkg/provider/kubernetes/ingress/kubernetes.go:729-736 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_http.go` and `pkg/provider/kubernetes/crd/kubernetes_tcp.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 `pkg/provider/kubernetes/crd/kubernetes_http.go:713` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) pkg/provider/kubernetes/gateway/grpcroute.go:280— pkg/provider/kubernetes/gateway/grpcroute.go:280-287 | pkg/provider/kubernetes/gateway/httproute.go:380-387 | pkg/provider/kubernetes/gateway/tcproute.go:298-305 | pkg/provider/kubernetes/gateway/tlsroute.go:314-321 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:280` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `routerName` in one and `p *Provider) loadTCPService(routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
AC3 · Page structure· Page without a main landmark · ×2
Page without a main landmark webui/index.dev.html:3— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
Page without a main landmark webui/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (8 members, 50+ identical tokens) pkg/api/handler_http.go:105— pkg/api/handler_http.go:105-129 | pkg/api/handler_http.go:162-186 | pkg/api/handler_http.go:219-243 | pkg/api/handler_tcp.go:100-124 | pkg/api/handler_tcp.go:157-181 | pkg/api/handler_tcp.go:214-238 | pkg/api/handler_udp.go:79-103 | pkg/api/handler_udp.go:136-160 — These 8 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 8 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 8 times.
Members sharing a duplicated core (8 members, 50+ identical tokens) pkg/provider/file/file.go:443— pkg/provider/file/file.go:443-473 | pkg/provider/http/http.go:194-223 | pkg/provider/kubernetes/gateway/grpcroute.go:125-200 | pkg/provider/kubernetes/gateway/httproute.go:131-234 | pkg/provider/kubernetes/ingress-nginx/translator.go:24-319 | pkg/provider/merge.go:65-110 | pkg/provider/traefik/internal.go:61-96 | pkg/server/aggregator.go:18-174 — These 8 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 8 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 8 times.
Duplicated block (32 lines × 2) REDACTED:426— REDACTED:426-457 | REDACTED:637-668 — 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:426` 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 (32 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:209— pkg/provider/kubernetes/gateway/tcproute.go:209-240 | pkg/provider/kubernetes/gateway/tlsroute.go:225-256 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 196 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 `pkg/provider/kubernetes/gateway/tcproute.go:209` 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 (30 lines × 2) pkg/config/dynamic/http_config.go:134— pkg/config/dynamic/http_config.go:134-163 | pkg/middlewares/encodedcharacters/encoded_characters.go:71-100 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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 (30 lines × 2) pkg/provider/kubernetes/gateway/httproute.go:1113— pkg/provider/kubernetes/gateway/httproute.go:1113-1142 | pkg/provider/kubernetes/gateway/tcproute.go:363-392 — 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 (25 lines × 2) pkg/provider/kubernetes/gateway/grpcroute.go:85— pkg/provider/kubernetes/gateway/grpcroute.go:85-109 | pkg/provider/kubernetes/gateway/httproute.go:91-115 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:85` 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 (25 lines × 2) pkg/provider/kubernetes/ingress-nginx/client.go:285— pkg/provider/kubernetes/ingress-nginx/client.go:285-309 | pkg/provider/kubernetes/ingress/client.go:270-294 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 159 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/ingress-nginx/client.go:285` 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (16 lines × 3) REDACTED:156— REDACTED:156-171 | pkg/provider/kubernetes/ingress-nginx/kubernetes.go:223-238 | pkg/provider/kubernetes/ingress/kubernetes.go:138-153 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:156` 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 (16 lines × 3) pkg/provider/kubernetes/crd/kubernetes_http.go:713— pkg/provider/kubernetes/crd/kubernetes_http.go:713-728 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:286-301 | pkg/provider/kubernetes/crd/kubernetes_udp.go:198-213 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_http.go` and `pkg/provider/kubernetes/crd/kubernetes_tcp.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 `pkg/provider/kubernetes/crd/kubernetes_http.go:713` 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 (15 lines × 3) pkg/provider/kubernetes/crd/client.go:160— pkg/provider/kubernetes/crd/client.go:160-174 | pkg/provider/kubernetes/gateway/client.go:132-146 | pkg/provider/kubernetes/ingress/client.go:141-155 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/crd/client.go:160` 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 (15 lines × 3) pkg/config/dynamic/http_config.go:494— pkg/config/dynamic/http_config.go:494-508 | pkg/config/dynamic/tcp_config.go:137-151 | pkg/config/dynamic/udp_config.go:91-105 — before extracting anything, compare `pkg/config/dynamic/tcp_config.go` and `pkg/config/dynamic/udp_config.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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. 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 lines × 2) pkg/provider/kubernetes/gateway/httproute.go:702— pkg/provider/kubernetes/gateway/httproute.go:702-716 | pkg/provider/kubernetes/gateway/tlsroute.go:504-518 — before extracting anything, compare `pkg/provider/kubernetes/gateway/httproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 247 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 `pkg/provider/kubernetes/gateway/httproute.go:702` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `p *Provider) loadServersTransport(namespace` in one and `p *Provider) loadTCPServersTransport(namespace` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (15 lines × 2) pkg/provider/kubernetes/ingress-nginx/client.go:262— pkg/provider/kubernetes/ingress-nginx/client.go:262-276 | pkg/provider/kubernetes/ingress/client.go:247-261 — `pkg/provider/kubernetes/ingress-nginx/client.go` and `pkg/provider/kubernetes/ingress/client.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 12 separate duplicated blocks between them, totalling at least 159 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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 (11 lines × 4) pkg/middlewares/ingressnginx/rewritetarget/rewrite_target.go:158— pkg/middlewares/ingressnginx/rewritetarget/rewrite_target.go:158-168 | pkg/middlewares/replacepathregex/replace_path_regex.go:78-88 | pkg/middlewares/stripprefix/strip_prefix.go:69-79 | pkg/middlewares/stripprefixregex/strip_prefix_regex.go:72-82 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. 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, `pkg/middlewares/replacepathregex/replace_path_regex.go:74` calls `RequestURI` and `pkg/middlewares/ingressnginx/rewritetarget/rewrite_target.go:154` 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 (11 lines × 4) pkg/provider/kubernetes/crd/client.go:263— pkg/provider/kubernetes/crd/client.go:263-273 | pkg/provider/kubernetes/gateway/client.go:262-272 | pkg/provider/kubernetes/ingress-nginx/client.go:213-223 | pkg/provider/kubernetes/ingress/client.go:205-215 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times.
Duplicated block (9 lines × 4) pkg/middlewares/ingressnginx/snippet/collector.go:421— pkg/middlewares/ingressnginx/snippet/collector.go:421-429 | pkg/middlewares/ingressnginx/snippet/collector.go:433-441 | pkg/middlewares/ingressnginx/snippet/collector.go:445-453 | pkg/middlewares/ingressnginx/snippet/collector.go:457-465 — 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 `pkg/middlewares/ingressnginx/snippet/collector.go:421` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 4) pkg/provider/consulcatalog/config.go:288— pkg/provider/consulcatalog/config.go:288-296 | pkg/provider/docker/config.go:297-305 | pkg/provider/ecs/config.go:261-269 | pkg/provider/nomad/config.go:258-266 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times.
Duplicated block (26 lines × 2 locations) webui/src/components/middlewares/MiddlewareDetail.tsx:41— webui/src/components/middlewares/MiddlewareDetail.tsx:41 · webui/src/components/routers/RouterDetail.tsx:27 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (26 lines × 2 locations) webui/src/components/services/MirrorServices.tsx:15— webui/src/components/services/MirrorServices.tsx:15 · webui/src/components/services/WeightedServices.tsx:15 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (7 lines × 2 locations) webui/src/components/tables/AriaTableSkeleton.tsx:29— webui/src/components/tables/AriaTableSkeleton.tsx:29 · webui/src/components/tables/AriaTableSkeleton.tsx:37 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (7 lines × 2 locations) webui/src/pages/tcp/TcpRouters.tsx:21— webui/src/pages/tcp/TcpRouters.tsx:21 · webui/src/pages/udp/UdpRouters.tsx:19 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
X2 · Cancellation propagation· Function without context.Context · ×2
Function without context.Context: ServeUDP pkg/udp/proxy.go:22— `ServeUDP` 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: fetchConfigurationData pkg/provider/http/http.go:153— `fetchConfigurationData` 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, …)`.
AC2 · Forms & labels· <TextField> field component without a label · ×1
<TextField> field component without a label webui/src/components/tables/TableFilter.tsx:82— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×1
Focus outline removed in CSS without a :focus replacement webui/src/components/buttons/SortButton.tsx:20— `&:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Stateful package: dashboard pkg/api/dashboard/dashboard.go:113— Package `dashboard` serves requests (request-handler function literals run on a goroutine per request, and every one sees the same package variables and captured values) but writes that shared state outside any lock (err; e.g. `err` in `Append` at line 113). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process.
Stateful handler: Capture pkg/middlewares/capture/capture.go:74— `Capture` serves requests (net/http handlers run on a goroutine per request, and every one shares the single `Capture` value the router holds) but writes its fields outside any lock (rr, crw; e.g. `rr` in `renew` at line 117). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process.
Provider.build (cyclomatic 88) pkg/provider/kubernetes/ingress-nginx/build.go:57— Provider.build has cyclomatic complexity 88 (threshold 15). Of this number, 86 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.
Builder.buildConstructor (cyclomatic 81) pkg/server/middleware/middlewares.go:102— Builder.buildConstructor has cyclomatic complexity 81 (threshold 15). Of this number, 80 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.
Provider.loadConfigurationFromCRD (cyclomatic 75) REDACTED:248— Provider.loadConfigurationFromCRD has cyclomatic complexity 75 (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.
Configuration.SetEffectiveConfiguration (cyclomatic 55) pkg/config/static/static_config.go:296— Configuration.SetEffectiveConfiguration 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.
Configuration.ValidateConfiguration (cyclomatic 53) pkg/config/static/static_config.go:451— Configuration.ValidateConfiguration has cyclomatic complexity 53 (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.
Provider.loadConfigurationFromIngresses (cyclomatic 49) pkg/provider/kubernetes/ingress/kubernetes.go:220— Provider.loadConfigurationFromIngresses 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.
Provider.loadGatewayListeners (cyclomatic 45) pkg/provider/kubernetes/gateway/kubernetes.go:604— Provider.loadGatewayListeners 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.
Provider.loadService (cyclomatic 43) pkg/provider/kubernetes/ingress/kubernetes.go:583— Provider.loadService has cyclomatic complexity 43 (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.
Provider.translate (cyclomatic 42) pkg/provider/kubernetes/ingress-nginx/translator.go:24— Provider.translate 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.
main.setupServer (cyclomatic 39) cmd/traefik/traefik.go:181— main.setupServer has cyclomatic complexity 39 (threshold 15). Of this number, 34 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.
Provider.watchNewDomains (cyclomatic 37) REDACTED:516— Provider.watchNewDomains has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to one function literal inside it that branches (line 520). 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.
configBuilder.loadServers (cyclomatic 37) pkg/provider/kubernetes/crd/kubernetes_http.go:623— configBuilder.loadServers 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.
forwardAuth.ServeHTTP (cyclomatic 36) pkg/middlewares/auth/forward.go:172— forwardAuth.ServeHTTP has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Provider.buildMiddlewareChain (cyclomatic 35) pkg/provider/kubernetes/ingress-nginx/translator.go:505— Provider.buildMiddlewareChain 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.
server.mergeConfiguration (cyclomatic 35) pkg/server/aggregator.go:18— server.mergeConfiguration has cyclomatic complexity 35 (threshold 15). 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.
conn.handleResponse (cyclomatic 34) pkg/proxy/fast/connpool.go:133— conn.handleResponse has cyclomatic complexity 34 (threshold 15). Of this number, 32 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.
Router.ServeTCP (cyclomatic 34) REDACTED:101— Router.ServeTCP 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.
Provider.listInstances (cyclomatic 33) pkg/provider/ecs/ecs.go:207— Provider.listInstances 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.
Provider.loadTCPServers (cyclomatic 33) pkg/provider/kubernetes/crd/kubernetes_tcp.go:214— Provider.loadTCPServers 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.
Provider.loadUDPServers (cyclomatic 33) pkg/provider/kubernetes/crd/kubernetes_udp.go:128— Provider.loadUDPServers 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.
clientWrapper.WatchAll (cyclomatic 32) pkg/provider/kubernetes/gateway/client.go:131— clientWrapper.WatchAll has cyclomatic complexity 32 (threshold 15). Of this number, 30 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.
ingressnginx.variableValue (cyclomatic 31) pkg/middlewares/ingressnginx/interpolation.go:67— ingressnginx.variableValue 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.
server.newHTTPServer (cyclomatic 31) pkg/server/server_entrypoint_tcp.go:643— server.newHTTPServer has cyclomatic complexity 31 (threshold 15). Of this number, 25 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Provider.loadFileConfig (cyclomatic 30) pkg/provider/file/file.go:252— Provider.loadFileConfig 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.
clientWrapper.WatchAll (cyclomatic 30) pkg/provider/kubernetes/crd/client.go:159— clientWrapper.WatchAll 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.
Provider.loadIngressRouteConfiguration (cyclomatic 30) pkg/provider/kubernetes/crd/kubernetes_http.go:29— Provider.loadIngressRouteConfiguration 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.
server.applyModel (cyclomatic 29) pkg/server/aggregator.go:323— server.applyModel 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.
metrics.NewMultiRegistry (cyclomatic 28) pkg/observability/metrics/metrics.go:68— metrics.NewMultiRegistry 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.
configBuilder.buildServersLB (cyclomatic 28) pkg/provider/kubernetes/crd/kubernetes_http.go:454— configBuilder.buildServersLB 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.
clientWrapper.WatchAll (cyclomatic 28) pkg/provider/kubernetes/ingress-nginx/client.go:127— clientWrapper.WatchAll 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.
Snippet.executeForwardAuth (cyclomatic 27) pkg/middlewares/ingressnginx/snippet/snippet.go:348— Snippet.executeForwardAuth has cyclomatic complexity 27 (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.
Manager.BuildHTTP (cyclomatic 27) REDACTED:91— Manager.BuildHTTP has cyclomatic complexity 27 (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.
Configuration.PopulateUsedBy (cyclomatic 26) pkg/config/runtime/runtime.go:118— Configuration.PopulateUsedBy 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.
Manager.addTCPHandlers (cyclomatic 26) pkg/server/router/tcp/manager.go:216— Manager.addTCPHandlers 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.
hydratation.fill (cyclomatic 25) pkg/collector/hydratation/hydration.go:26— hydratation.fill has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Provider.loadIngressRouteTCPConfiguration (cyclomatic 25) pkg/provider/kubernetes/crd/kubernetes_tcp.go:20— Provider.loadIngressRouteTCPConfiguration 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.
Provider.getClient (cyclomatic 24) REDACTED:281— Provider.getClient 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.
Provider.getBackendAddresses (cyclomatic 24) pkg/provider/kubernetes/gateway/kubernetes.go:1548— Provider.getBackendAddresses 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.
runtime.NewConfig (cyclomatic 23) pkg/config/runtime/runtime.go:39— runtime.NewConfig has cyclomatic complexity 23 (threshold 15). 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.
clientWrapper.WatchAll (cyclomatic 23) pkg/provider/kubernetes/ingress/client.go:140— clientWrapper.WatchAll 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.
Provider.updateIngressStatus (cyclomatic 23) pkg/provider/kubernetes/ingress/kubernetes.go:465— Provider.updateIngressStatus 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.
ReverseProxy.ServeHTTP (cyclomatic 23) pkg/proxy/fast/proxy.go:136— ReverseProxy.ServeHTTP 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.
redactor.doOnStruct (cyclomatic 23) pkg/redactor/redactor.go:72— redactor.doOnStruct 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.
TransportManager.createTLSConfig (cyclomatic 23) pkg/server/service/transport.go:158— TransportManager.createTLSConfig 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.
DialerManager.Build (cyclomatic 23) REDACTED:133— DialerManager.Build 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.
tls.buildTLSConfig (cyclomatic 23) REDACTED:442— tls.buildTLSConfig 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.
dynamic.swapStringAt (cyclomatic 22) pkg/config/dynamic/urnrefs.go:102— dynamic.swapStringAt 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.ServeHTTP (cyclomatic 22) pkg/middlewares/accesslog/logger.go:190— Handler.ServeHTTP 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, 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.
Snippet.ServeHTTP (cyclomatic 22) pkg/middlewares/ingressnginx/snippet/snippet.go:162— Snippet.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.
retry.ServeHTTP (cyclomatic 22) pkg/middlewares/retry/retry.go:134— retry.ServeHTTP has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 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.
crd.createRateLimitMiddleware (cyclomatic 22) REDACTED:1097— crd.createRateLimitMiddleware 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.
Manager.ParseRouterTree (cyclomatic 22) pkg/server/router/router.go:91— Manager.ParseRouterTree 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.
Manager.UpdateConfigs (cyclomatic 22) REDACTED:93— Manager.UpdateConfigs 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.
aggregator.NewProviderAggregator (cyclomatic 21) REDACTED:71— aggregator.NewProviderAggregator 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.
Provider.buildConfiguration (cyclomatic 21) pkg/provider/consulcatalog/config.go:21— Provider.buildConfiguration 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.
Provider.loadGRPCRoute (cyclomatic 21) pkg/provider/kubernetes/gateway/grpcroute.go:23— Provider.loadGRPCRoute 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.
Provider.loadHTTPRoute (cyclomatic 21) pkg/provider/kubernetes/gateway/httproute.go:29— Provider.loadHTTPRoute 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.
Provider.loadTLSRoutes (cyclomatic 21) pkg/provider/kubernetes/gateway/tlsroute.go:24— Provider.loadTLSRoutes 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.
Manager.BuildTCP (cyclomatic 21) REDACTED:40— Manager.BuildTCP 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.
accesslog.NewHandler (cyclomatic 20) pkg/middlewares/accesslog/logger.go:78— accesslog.NewHandler has cyclomatic complexity 20 (threshold 15). Of this number, 19 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.
Provider.loadConfigurationFromGateways (cyclomatic 20) pkg/provider/kubernetes/gateway/kubernetes.go:377— Provider.loadConfigurationFromGateways has cyclomatic complexity 20 (threshold 15). 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.
Provider.updateIngressStatus (cyclomatic 20) pkg/provider/kubernetes/ingress-nginx/kubernetes.go:322— Provider.updateIngressStatus 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.
fast.newDialer (cyclomatic 20) REDACTED:42— fast.newDialer has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 94, 60). 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.
Provider.Provide (cyclomatic 19) pkg/provider/consulcatalog/consul_catalog.go:155— Provider.Provide 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 162). 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.
Header.processCorsHeaders (cyclomatic 18) pkg/middlewares/headers/header.go:143— Header.processCorsHeaders 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.
snippet.createRewriteAction (cyclomatic 18) pkg/middlewares/ingressnginx/snippet/action.go:718— snippet.createRewriteAction has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 756). 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.
snippet.buildCondition (cyclomatic 18) pkg/middlewares/ingressnginx/snippet/action.go:852— snippet.buildCondition has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 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.
snippet.New (cyclomatic 18) pkg/middlewares/ingressnginx/snippet/snippet.go:56— snippet.New 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Provider.Provide (cyclomatic 18) pkg/provider/docker/pdocker.go:53— Provider.Provide has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 54). 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.
Provider.loadTCPRoutes (cyclomatic 18) pkg/provider/kubernetes/gateway/tcproute.go:22— Provider.loadTCPRoutes 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.
Provider.loadTLSServers (cyclomatic 18) pkg/provider/kubernetes/gateway/tlsroute.go:336— Provider.loadTLSServers 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Provider.buildRetry (cyclomatic 18) pkg/provider/kubernetes/ingress-nginx/middleware.go:482— Provider.buildRetry has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Manager.getLoadBalancerServiceHandler (cyclomatic 18) REDACTED:423— Manager.getLoadBalancerServiceHandler 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.
main.runCmd (cyclomatic 17) cmd/traefik/traefik.go:92— main.runCmd has cyclomatic complexity 17 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
main.processFile (cyclomatic 17) internal/anchors.go:180— main.processFile 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.
responseWriter.Write (cyclomatic 17) REDACTED:209— responseWriter.Write 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.
customErrors.ServeHTTP (cyclomatic 17) pkg/middlewares/customerrors/custom_errors.go:92— customErrors.ServeHTTP has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
http.hostV2 (cyclomatic 17) pkg/muxer/http/matcher_v2.go:80— http.hostV2 has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 89). 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.
Provider.loadService (cyclomatic 17) pkg/provider/kubernetes/gateway/httproute.go:306— Provider.loadService has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
statusReport.Flush (cyclomatic 17) pkg/provider/kubernetes/gateway/status.go:42— statusReport.Flush 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.
Provider.buildBuffering (cyclomatic 17) pkg/provider/kubernetes/ingress-nginx/middleware.go:178— Provider.buildBuffering 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.
Provider.loadRouter (cyclomatic 17) pkg/provider/kubernetes/ingress/kubernetes.go:773— Provider.loadRouter 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.
ServiceHealthCheck.ServiceHealthCheck (cyclomatic 17) webui/src/components/services/ServiceHealthCheck.tsx:13— ServiceHealthCheck.ServiceHealthCheck 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 16). 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.
SideNavBar.SideNav (cyclomatic 17) webui/src/layout/navigation/SideNavBar.tsx:125— SideNavBar.SideNav has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Dashboard.Dashboard (cyclomatic 17) webui/src/pages/dashboard/Dashboard.tsx:50— Dashboard.Dashboard has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
cli.logDeprecations (cyclomatic 16) pkg/cli/deprecation.go:36— cli.logDeprecations 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.
compress.New (cyclomatic 16) pkg/middlewares/compress/compress.go:44— compress.New 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.
middlewares.GetSourceExtractor (cyclomatic 16) pkg/middlewares/extractor.go:17— middlewares.GetSourceExtractor 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.
Provider.Provide (cyclomatic 16) pkg/provider/file/file.go:55— Provider.Provide has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Provider.loadServersTransport (cyclomatic 16) pkg/provider/kubernetes/gateway/httproute.go:681— Provider.loadServersTransport 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.
Provider.loadTCPServersTransport (cyclomatic 16) pkg/provider/kubernetes/gateway/tlsroute.go:481— Provider.loadTCPServersTransport 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.
Provider.resolveBasicAuth (cyclomatic 16) pkg/provider/kubernetes/ingress-nginx/build.go:1037— Provider.resolveBasicAuth 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.
redactor.reset (cyclomatic 16) pkg/redactor/redactor.go:151— redactor.reset 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.
Manager.buildEntryPointHandler (cyclomatic 16) pkg/server/router/tcp/manager.go:98— Manager.buildEntryPointHandler 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.
CertificateDetails.CertificateDetails (cyclomatic 16) webui/src/components/certificates/CertificateDetails.tsx:15— CertificateDetails.CertificateDetails has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
index.ProviderIcon (cyclomatic 16) webui/src/components/icons/providers/index.tsx:25— index.ProviderIcon has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 26). 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.
No assertions: should render the toast pool webui/src/components/ToastPool.spec.tsx:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D10 · Test Quality· Fixed-sleep synchronisation · ×1
Fixed-sleep synchronisation: should return true when verification succeeds webui/src/utils/workers/scriptVerification.spec.ts:50— This test starts work it did not wait for (`promise`, still running when the sleep starts) and then orders itself against it with `new Promise((resolve) => setTimeout(resolve, 0))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
Deprecated module: github.com/golang/protobuf — `github.com/golang/protobuf` is required at v1.5.4 in REDACTED, and its author has DEPRECATED the module: "Use the "google.golang.org/protobuf" module instead." A deprecation is declared by the author in the module's own REDACTED and applies to the whole module, not to one release, so moving to a newer version of it does not clear this. Follow the replacement the notice names.
Provider.build (cognitive 267) pkg/provider/kubernetes/ingress-nginx/build.go:57— Provider.build has cognitive complexity 267 (threshold 15). Drivers by points: if/else 64 (224 pts), loops 13 (32 pts), boolean chains 11 (nesting depth added 179). Of this number, 265 points are the body's own statements and 2 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.
Provider.loadConfigurationFromCRD (cognitive 196) REDACTED:248— Provider.loadConfigurationFromCRD has cognitive complexity 196 (threshold 15). Drivers by points: if/else 61 (168 pts), loops 13 (25 pts), boolean chains 3 (nesting depth added 119). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.watchNewDomains (cognitive 142) REDACTED:516— Provider.watchNewDomains has cognitive complexity 142 (threshold 15). Drivers by points: if/else 25 (111 pts), loops 6 (24 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 105). None of this is in the body itself: all 142 points belong to one function literal inside it that branches (line 520). 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.
Provider.loadConfigurationFromIngresses (cognitive 120) pkg/provider/kubernetes/ingress/kubernetes.go:220— Provider.loadConfigurationFromIngresses has cognitive complexity 120 (threshold 15). Drivers by points: if/else 34 (95 pts), loops 7 (18 pts), boolean chains 7 (nesting depth added 72). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Builder.buildConstructor (cognitive 119) pkg/server/middleware/middlewares.go:102— Builder.buildConstructor has cognitive complexity 119 (threshold 15). Drivers by points: if/else 77 (115 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 39). Of this number, 117 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.
Provider.loadGatewayListeners (cognitive 109) pkg/provider/kubernetes/gateway/kubernetes.go:604— Provider.loadGatewayListeners has cognitive complexity 109 (threshold 15). Drivers by points: if/else 26 (84 pts), loops 6 (15 pts), boolean chains 10 (nesting depth added 67). 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.
Provider.translate (cognitive 109) pkg/provider/kubernetes/ingress-nginx/translator.go:24— Provider.translate has cognitive complexity 109 (threshold 15). Drivers by points: if/else 30 (95 pts), boolean chains 7, loops 5 (7 pts) (nesting depth added 67). 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.
Provider.listInstances (cognitive 104) pkg/provider/ecs/ecs.go:207— Provider.listInstances has cognitive complexity 104 (threshold 15). Drivers by points: if/else 23 (72 pts), loops 9 (29 pts), boolean chains 3 (nesting depth added 69). To reduce it, split the body into named stages: move each independent 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.mergeConfiguration (cognitive 95) pkg/server/aggregator.go:18— server.mergeConfiguration has cognitive complexity 95 (threshold 15). Drivers by points: loops 17 (50 pts), if/else 16 (42 pts), boolean chains 3 (nesting depth added 59). 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.
server.applyModel (cognitive 92) pkg/server/aggregator.go:323— server.applyModel has cognitive complexity 92 (threshold 15). Drivers by points: if/else 19 (71 pts), loops 7 (18 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.
Provider.loadIngressRouteConfiguration (cognitive 83) pkg/provider/kubernetes/crd/kubernetes_http.go:29— Provider.loadIngressRouteConfiguration has cognitive complexity 83 (threshold 15). Drivers by points: if/else 23 (74 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.loadFileConfig (cognitive 82) pkg/provider/file/file.go:252— Provider.loadFileConfig has cognitive complexity 82 (threshold 15). Drivers by points: if/else 19 (54 pts), loops 9 (26 pts), boolean chains 2 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.loadService (cognitive 82) pkg/provider/kubernetes/ingress/kubernetes.go:583— Provider.loadService has cognitive complexity 82 (threshold 15). Drivers by points: if/else 27 (58 pts), loops 7 (16 pts), boolean chains 8 (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.
Provider.loadIngressRouteTCPConfiguration (cognitive 70) pkg/provider/kubernetes/crd/kubernetes_tcp.go:20— Provider.loadIngressRouteTCPConfiguration has cognitive complexity 70 (threshold 15). Drivers by points: if/else 19 (61 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Configuration.SetEffectiveConfiguration (cognitive 68) pkg/config/static/static_config.go:296— Configuration.SetEffectiveConfiguration has cognitive complexity 68 (threshold 15). Drivers by points: if/else 25 (45 pts), boolean chains 10, loops 6 (9 pts), match/switch 2 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.loadTCPServers (cognitive 68) pkg/provider/kubernetes/crd/kubernetes_tcp.go:214— Provider.loadTCPServers has cognitive complexity 68 (threshold 15). Drivers by points: if/else 21 (45 pts), loops 6 (17 pts), boolean chains 6 (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.
Provider.loadUDPServers (cognitive 68) pkg/provider/kubernetes/crd/kubernetes_udp.go:128— Provider.loadUDPServers has cognitive complexity 68 (threshold 15). Drivers by points: if/else 21 (45 pts), loops 6 (17 pts), boolean chains 6 (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.
Configuration.ValidateConfiguration (cognitive 65) pkg/config/static/static_config.go:451— Configuration.ValidateConfiguration has cognitive complexity 65 (threshold 15). Drivers by points: if/else 24 (40 pts), boolean chains 17, loops 4 (6 pts), match/switch 1 (2 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.
configBuilder.loadServers (cognitive 64) pkg/provider/kubernetes/crd/kubernetes_http.go:623— configBuilder.loadServers has cognitive complexity 64 (threshold 15). Drivers by points: if/else 25 (46 pts), loops 6 (13 pts), boolean chains 5 (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.
conn.handleResponse (cognitive 60) pkg/proxy/fast/connpool.go:133— conn.handleResponse has cognitive complexity 60 (threshold 15). Drivers by points: if/else 25 (46 pts), loops 5 (11 pts), boolean chains 3 (nesting depth added 27). Of this number, 53 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.
Provider.loadTLSRoutes (cognitive 59) pkg/provider/kubernetes/gateway/tlsroute.go:24— Provider.loadTLSRoutes has cognitive complexity 59 (threshold 15). Drivers by points: if/else 12 (44 pts), loops 4 (11 pts), boolean chains 4 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clientWrapper.WatchAll (cognitive 57) pkg/provider/kubernetes/crd/client.go:159— clientWrapper.WatchAll has cognitive complexity 57 (threshold 15). Drivers by points: if/else 22 (46 pts), loops 7 (11 pts) (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.
forwardAuth.ServeHTTP (cognitive 55) pkg/middlewares/auth/forward.go:172— forwardAuth.ServeHTTP has cognitive complexity 55 (threshold 15). Drivers by points: if/else 29 (46 pts), loops 3 (5 pts), boolean chains 4 (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.
clientWrapper.WatchAll (cognitive 54) pkg/provider/kubernetes/gateway/client.go:131— clientWrapper.WatchAll has cognitive complexity 54 (threshold 15). Drivers by points: if/else 21 (42 pts), loops 8 (11 pts), match/switch 1 (nesting depth added 24). Of this number, 53 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.
Provider.loadTCPRoutes (cognitive 54) pkg/provider/kubernetes/gateway/tcproute.go:22— Provider.loadTCPRoutes has cognitive complexity 54 (threshold 15). Drivers by points: if/else 10 (39 pts), loops 4 (12 pts), boolean chains 3 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clientWrapper.WatchAll (cognitive 53) pkg/provider/kubernetes/ingress-nginx/client.go:127— clientWrapper.WatchAll has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (39 pts), loops 9 (14 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.loadGRPCRoute (cognitive 50) pkg/provider/kubernetes/gateway/grpcroute.go:23— Provider.loadGRPCRoute has cognitive complexity 50 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 3 (7 pts), boolean chains 5 (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.
Provider.loadHTTPRoute (cognitive 50) pkg/provider/kubernetes/gateway/httproute.go:29— Provider.loadHTTPRoute has cognitive complexity 50 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 3 (7 pts), boolean chains 5 (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.
Manager.addTCPHandlers (cognitive 49) pkg/server/router/tcp/manager.go:216— Manager.addTCPHandlers has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (43 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
redactor.doOnStruct (cognitive 48) pkg/redactor/redactor.go:72— redactor.doOnStruct has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (39 pts), loops 3 (6 pts), boolean chains 2, 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.
metrics.NewMultiRegistry (cognitive 46) pkg/observability/metrics/metrics.go:68— metrics.NewMultiRegistry has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (42 pts), boolean chains 3, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
crd.createRateLimitMiddleware (cognitive 46) REDACTED:1097— crd.createRateLimitMiddleware has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (46 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
configBuilder.buildServersLB (cognitive 46) pkg/provider/kubernetes/crd/kubernetes_http.go:454— configBuilder.buildServersLB has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (42 pts), boolean chains 2, match/switch 1 (2 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.
runtime.NewConfig (cognitive 45) pkg/config/runtime/runtime.go:39— runtime.NewConfig has cognitive complexity 45 (threshold 15). Drivers by points: loops 8 (24 pts), if/else 12 (20 pts), boolean chains 1 (nesting depth added 24). 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.
main.setupServer (cognitive 44) cmd/traefik/traefik.go:181— main.setupServer has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 9, loops 6 (7 pts) (nesting depth added 8). Of this number, 37 points are the body's own statements and 7 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.
Snippet.executeForwardAuth (cognitive 44) pkg/middlewares/ingressnginx/snippet/snippet.go:348— Snippet.executeForwardAuth has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (36 pts), loops 3 (5 pts), boolean chains 3 (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.
Provider.buildMiddlewareChain (cognitive 43) pkg/provider/kubernetes/ingress-nginx/translator.go:505— Provider.buildMiddlewareChain has cognitive complexity 43 (threshold 15). Drivers by points: if/else 29 (40 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
clientWrapper.WatchAll (cognitive 43) pkg/provider/kubernetes/ingress/client.go:140— clientWrapper.WatchAll has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 7 (11 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Configuration.PopulateUsedBy (cognitive 42) pkg/config/runtime/runtime.go:118— Configuration.PopulateUsedBy has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 9 (10 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.
Provider.loadIngressRouteUDPConfiguration (cognitive 42) pkg/provider/kubernetes/crd/kubernetes_udp.go:17— Provider.loadIngressRouteUDPConfiguration has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.buildConfiguration (cognitive 41) pkg/provider/consulcatalog/config.go:21— Provider.buildConfiguration has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (37 pts), boolean chains 3, 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.
Router.ServeTCP (cognitive 41) REDACTED:101— Router.ServeTCP has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (29 pts), boolean chains 10, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Manager.BuildTCP (cognitive 41) REDACTED:40— Manager.BuildTCP has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 2 (4 pts), boolean chains 2, match/switch 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.
Provider.getNomadServiceDataWithEmptyServices (cognitive 40) pkg/provider/nomad/nomad.go:366— Provider.getNomadServiceDataWithEmptyServices has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 5 (14 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.lookupEc2Instances (cognitive 39) pkg/provider/ecs/ecs.go:454— Provider.lookupEc2Instances has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 7 (18 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Manager.UpdateConfigs (cognitive 38) REDACTED:93— Manager.UpdateConfigs has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.getBackendAddresses (cognitive 37) pkg/provider/kubernetes/gateway/kubernetes.go:1548— Provider.getBackendAddresses has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 5 (9 pts), boolean chains 3 (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.
Manager.ParseRouterTree (cognitive 37) pkg/server/router/router.go:91— Manager.ParseRouterTree has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 5, loops 4 (5 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.
LocalStore.get (cognitive 36) pkg/provider/acme/local_store.go:91— LocalStore.get has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 2 (7 pts), boolean chains 1 (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.
tls.buildTLSConfig (cognitive 36) REDACTED:442— tls.buildTLSConfig has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 3 (6 pts), boolean chains 2, match/switch 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.
Provider.buildBuffering (cognitive 35) pkg/provider/kubernetes/ingress-nginx/middleware.go:178— Provider.buildBuffering has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (33 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.loadConfigurationFromGateways (cognitive 34) pkg/provider/kubernetes/gateway/kubernetes.go:377— Provider.loadConfigurationFromGateways has cognitive complexity 34 (threshold 15). Drivers by points: loops 10 (17 pts), if/else 8 (16 pts), boolean chains 1 (nesting depth added 15). 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.
Provider.findDomains (cognitive 34) pkg/provider/tailscale/provider.go:142— Provider.findDomains has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (12 pts), boolean chains 2 (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.
fast.newDialer (cognitive 34) REDACTED:42— fast.newDialer has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (30 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 17). Most of this is not in the body itself: 7 of the 34 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 94, 60). 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.
Provider.updateIngressStatus (cognitive 33) pkg/provider/kubernetes/ingress/kubernetes.go:465— Provider.updateIngressStatus has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 5 (11 pts), boolean chains 1, match/switch 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.
Manager.BuildHTTP (cognitive 33) REDACTED:91— Manager.BuildHTTP has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (29 pts), loops 2, boolean chains 1, match/switch 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.
Snippet.ServeHTTP (cognitive 32) pkg/middlewares/ingressnginx/snippet/snippet.go:162— Snippet.ServeHTTP has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 4, 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.
Provider.updateIngressStatus (cognitive 32) pkg/provider/kubernetes/ingress-nginx/kubernetes.go:322— Provider.updateIngressStatus has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 4 (10 pts), boolean chains 2, 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.
ServiceHealthChecker.healthcheck (cognitive 31) pkg/healthcheck/healthcheck.go:139— ServiceHealthChecker.healthcheck has cognitive complexity 31 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 3 (10 pts), loops 3 (7 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.
ServiceTCPHealthChecker.healthcheck (cognitive 31) pkg/healthcheck/healthcheck_tcp.go:102— ServiceTCPHealthChecker.healthcheck has cognitive complexity 31 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 3 (10 pts), loops 3 (7 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.
Provider.Provide (cognitive 31) pkg/provider/file/file.go:55— Provider.Provide has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (4 pts), match/switch 2 (4 pts) (nesting depth added 18). Of this number, 25 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.
passTLSClientCert.getCertInfo (cognitive 30) pkg/middlewares/passtlsclientcert/pass_tls_client_cert.go:176— passTLSClientCert.getCertInfo has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (28 pts), boolean chains 1, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.lookupMiInstances (cognitive 30) pkg/provider/ecs/ecs.go:390— Provider.lookupMiInstances has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 6 (13 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReverseProxy.ServeHTTP (cognitive 30) pkg/proxy/fast/proxy.go:136— ReverseProxy.ServeHTTP has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (25 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server.newHTTPServer (cognitive 30) pkg/server/server_entrypoint_tcp.go:643— server.newHTTPServer has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 8, match/switch 2 (3 pts) (nesting depth added 4). Of this number, 21 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TransportManager.createTLSConfig (cognitive 30) pkg/server/service/transport.go:158— TransportManager.createTLSConfig has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 1 (2 pts), boolean chains 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.
DialerManager.Build (cognitive 30) REDACTED:133— DialerManager.Build has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 4 (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.
accesslog.NewHandler (cognitive 29) pkg/middlewares/accesslog/logger.go:78— accesslog.NewHandler has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 4 (9 pts), boolean chains 1, match/switch 1 (nesting depth added 11). 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.
Provider.getConsulServicesData (cognitive 29) pkg/provider/consulcatalog/consul_catalog.go:270— Provider.getConsulServicesData has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 2 (3 pts), boolean chains 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.
responseWriter.Write (cognitive 28) REDACTED:209— responseWriter.Write has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 2 (5 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.
http.hostV2 (cognitive 28) pkg/muxer/http/matcher_v2.go:80— http.hostV2 has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 12). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 89). 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.
acme.deleteUnnecessaryDomains (cognitive 28) REDACTED:833— acme.deleteUnnecessaryDomains has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (6 pts), boolean chains 2 (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.
Provider.getClient (cognitive 28) REDACTED:281— Provider.getClient has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 5 (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.
Provider.buildListenerRouters (cognitive 28) pkg/provider/kubernetes/gateway/kubernetes.go:917— Provider.buildListenerRouters has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 5 (9 pts), boolean chains 2 (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.
CertificateStore.GetBestCertificate (cognitive 28) pkg/tls/certificate_store.go:77— CertificateStore.GetBestCertificate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Provider.loadGRPCServers (cognitive 27) pkg/provider/kubernetes/gateway/grpcroute.go:348— Provider.loadGRPCServers has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 12). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.loadHTTPServers (cognitive 27) pkg/provider/kubernetes/gateway/httproute.go:532— Provider.loadHTTPServers has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 12). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.loadTLSServers (cognitive 27) pkg/provider/kubernetes/gateway/tlsroute.go:336— Provider.loadTLSServers has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 11). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Manager.buildEntryPointHandler (cognitive 27) pkg/server/router/tcp/manager.go:98— Manager.buildEntryPointHandler has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (3 pts), boolean chains 2 (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.
TCPEntryPoint.Start (cognitive 27) pkg/server/server_entrypoint_tcp.go:255— TCPEntryPoint.Start has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 3, loops 1 (nesting depth added 13). Of this number, 17 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.
main.runCmd (cognitive 26) cmd/traefik/traefik.go:92— main.runCmd has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 8). Most of this is not in the body itself: 12 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 157). 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.
main.processFile (cognitive 26) internal/anchors.go:180— main.processFile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent 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 26) pkg/middlewares/accesslog/logger.go:190— Handler.ServeHTTP has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 6). Of this number, 20 points are the body's own statements and 6 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.
Header.processCorsHeaders (cognitive 26) pkg/middlewares/headers/header.go:143— Header.processCorsHeaders has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4 (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.
docker.parseTasks (cognitive 26) pkg/provider/docker/pswarm.go:292— docker.parseTasks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (7 pts) (nesting depth added 16). 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.
Provider.Provide (cognitive 26) pkg/provider/docker/pdocker.go:53— Provider.Provide has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 2 (6 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). None of this is in the body itself: all 26 points belong to one function literal inside it that branches (line 54). 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.
Provider.loadHTTPRouteConfiguration (cognitive 26) pkg/provider/kubernetes/gateway/httproute.go:131— Provider.loadHTTPRouteConfiguration has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 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.
ConfigurationWatcher.receiveConfigurations (cognitive 26) pkg/server/configurationwatcher.go:98— ConfigurationWatcher.receiveConfigurations has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (16 pts), loops 2 (5 pts), match/switch 2 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ingressnginx.variableValue (cognitive 25) pkg/middlewares/ingressnginx/interpolation.go:67— ingressnginx.variableValue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (24 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.
RenderUnknownProp.RenderUnknownProp (cognitive 25) webui/src/components/middlewares/RenderUnknownProp.tsx:14— RenderUnknownProp.RenderUnknownProp has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (3 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 12). Of this number, 15 points are the body's own statements and 10 belong to 3 function items 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.
customErrors.ServeHTTP (cognitive 24) pkg/middlewares/customerrors/custom_errors.go:92— customErrors.ServeHTTP has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (19 pts), loops 2 (3 pts), match/switch 1 (2 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, 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.
retry.ServeHTTP (cognitive 24) pkg/middlewares/retry/retry.go:134— retry.ServeHTTP has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 5 (nesting depth added 4). Of this number, 13 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body: 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.
DynConfBuilder.getIPAddress (cognitive 24) pkg/provider/docker/config.go:359— DynConfBuilder.getIPAddress has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (23 pts), 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.
Provider.addWatcher (cognitive 24) pkg/provider/file/file.go:169— Provider.addWatcher has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 14). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 184). 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.
statusReport.Flush (cognitive 24) pkg/provider/kubernetes/gateway/status.go:42— statusReport.Flush has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 8 (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.
CertificateStore.GetCertificate (cognitive 24) pkg/tls/certificate_store.go:136— CertificateStore.GetCertificate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (9 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.
aggregator.NewProviderAggregator (cognitive 23) REDACTED:71— aggregator.NewProviderAggregator has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 3 (6 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Provider.buildTLSOptions (cognitive 23) REDACTED:1517— Provider.buildTLSOptions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.loadServersTransport (cognitive 23) pkg/provider/kubernetes/gateway/httproute.go:681— Provider.loadServersTransport has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (5 pts), boolean chains 3, 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.
Provider.loadTCPServersTransport (cognitive 23) pkg/provider/kubernetes/gateway/tlsroute.go:481— Provider.loadTCPServersTransport has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (5 pts), boolean chains 3, 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.
Provider.loadRouter (cognitive 23) pkg/provider/kubernetes/ingress/kubernetes.go:773— Provider.loadRouter has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5, match/switch 1 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
redactor.reset (cognitive 23) pkg/redactor/redactor.go:151— redactor.reset has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (4 pts), match/switch 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.
server.findConflictingRouters (cognitive 23) pkg/server/aggregator.go:260— server.findConflictingRouters has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cli.logDeprecations (cognitive 22) pkg/cli/deprecation.go:36— cli.logDeprecations has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (21 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.
dynamic.swapStringAt (cognitive 22) pkg/config/dynamic/urnrefs.go:102— dynamic.swapStringAt has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1 (2 pts), match/switch 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.
snippet.parseDirectiveFlags (cognitive 22) pkg/middlewares/ingressnginx/snippet/action.go:73— snippet.parseDirectiveFlags has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 2 (5 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.
snippet.New (cognitive 22) pkg/middlewares/ingressnginx/snippet/snippet.go:56— snippet.New has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3 (nesting depth added 6). Of this number, 21 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.
plugins.NewBuilder (cognitive 22) pkg/plugins/builder.go:31— plugins.NewBuilder has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 2 (4 pts), loops 2 (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.
DynConfBuilder.build (cognitive 22) pkg/provider/docker/config.go:32— DynConfBuilder.build has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, 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.
Provider.buildConfiguration (cognitive 22) pkg/provider/ecs/config.go:23— Provider.buildConfiguration has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, 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.
Provider.getEndpointsFromEndpointSlices (cognitive 22) pkg/provider/kubernetes/ingress-nginx/build.go:792— Provider.getEndpointsFromEndpointSlices has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (8 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.
Provider.validateIngress (cognitive 22) pkg/provider/kubernetes/ingress-nginx/build.go:1159— Provider.validateIngress has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (5 pts), boolean chains 3 (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.
Provider.buildRetry (cognitive 22) pkg/provider/kubernetes/ingress-nginx/middleware.go:482— Provider.buildRetry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 1, 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.
Provider.buildConfig (cognitive 22) pkg/provider/nomad/config.go:21— Provider.buildConfig has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, 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.
server.resolveHTTPTLSOptions (cognitive 22) pkg/server/aggregator.go:192— server.resolveHTTPTLSOptions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 9). Of this number, 16 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.
XForwarded.rewrite (cognitive 21) pkg/middlewares/forwardedheaders/forwarded_header.go:146— XForwarded.rewrite has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (20 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.
wasmMiddlewareBuilder.buildMiddleware (cognitive 21) pkg/plugins/middlewarewasm.go:66— wasmMiddlewareBuilder.buildMiddleware has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 7). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.renewCertificates (cognitive 21) REDACTED:912— Provider.renewCertificates has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
provider.BuildRouterConfiguration (cognitive 21) pkg/provider/configuration.go:78— provider.BuildRouterConfiguration has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.buildTLSStores (cognitive 21) REDACTED:1601— Provider.buildTLSStores has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 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.
Provider.resolveParentRouterNames (cognitive 21) pkg/provider/kubernetes/crd/kubernetes_http.go:268— Provider.resolveParentRouterNames has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
server.applyDefaultObservabilityModel (cognitive 21) pkg/server/aggregator.go:461— server.applyDefaultObservabilityModel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 1 (2 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.
Manager.BuildUDP (cognitive 21) REDACTED:33— Manager.BuildUDP has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 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.
kv.filterPairs (cognitive 20) pkg/config/kv/kv_node.go:77— kv.filterPairs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (5 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.
SwarmProvider.Provide (cognitive 20) pkg/provider/docker/pswarm.go:57— SwarmProvider.Provide has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 10). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 58). 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.
Provider.loadService (cognitive 20) pkg/provider/kubernetes/gateway/httproute.go:306— Provider.loadService has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3 (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.
clientWrapper.WatchAll (cognitive 20) pkg/provider/kubernetes/knative/client.go:112— clientWrapper.WatchAll has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 5 (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.
server.logConfiguration (cognitive 20) pkg/server/configurationwatcher.go:201— server.logConfiguration has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 4 (9 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
snippet.buildCondition (cognitive 19) pkg/middlewares/ingressnginx/snippet/action.go:852— snippet.buildCondition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 7). Of this number, 12 points are the body's own statements and 7 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.
SwarmProvider.listServices (cognitive 19) pkg/provider/docker/pswarm.go:156— SwarmProvider.listServices has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.buildRouters (cognitive 19) pkg/provider/kubernetes/knative/kubernetes.go:263— Provider.buildRouters has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (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.
Provider.getNomadServiceData (cognitive 19) pkg/provider/nomad/nomad.go:309— Provider.getNomadServiceData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConfigurationWatcher.applyConfigurations (cognitive 19) pkg/server/configurationwatcher.go:166— ConfigurationWatcher.applyConfigurations has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Manager.getLoadBalancerServiceHandler (cognitive 19) REDACTED:423— Manager.getLoadBalancerServiceHandler has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1, loops 1, match/switch 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.
compress.New (cognitive 18) pkg/middlewares/compress/compress.go:44— compress.New has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 3, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
middlewares.GetSourceExtractor (cognitive 18) pkg/middlewares/extractor.go:17— middlewares.GetSourceExtractor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rewriteTarget.ServeHTTP (cognitive 18) pkg/middlewares/ingressnginx/rewritetarget/rewrite_target.go:86— rewriteTarget.ServeHTTP has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
snippet.createAccessAction (cognitive 18) pkg/middlewares/ingressnginx/snippet/action.go:435— snippet.createAccessAction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (18 pts) (nesting depth added 5). Of this number, 10 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ratelimiter.New (cognitive 18) pkg/middlewares/ratelimiter/rate_limiter.go:45— ratelimiter.New has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
RegistryDownloader.Download (cognitive 18) pkg/plugins/downloader.go:56— RegistryDownloader.Download has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1, match/switch 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.
docker.parseContainer (cognitive 18) pkg/provider/docker/shared.go:62— docker.parseContainer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReverseProxy.roundTrip (cognitive 18) pkg/proxy/fast/proxy.go:264— ReverseProxy.roundTrip has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ocspStapler.updateStaple (cognitive 18) pkg/tls/ocsp.go:151— ocspStapler.updateStaple has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Manager.GetServerCertificates (cognitive 18) REDACTED:300— Manager.GetServerCertificates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServiceHealthCheck.ServiceHealthCheck (cognitive 18) webui/src/components/services/ServiceHealthCheck.tsx:13— ServiceHealthCheck.ServiceHealthCheck has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 13, if/else 4 (5 pts) (nesting depth added 1). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 16). 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.
Configuration.GetRoutersByEntryPoints (cognitive 17) pkg/config/runtime/runtime_http.go:18— Configuration.GetRoutersByEntryPoints has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compress.parseAcceptableEncodings (cognitive 17) pkg/middlewares/compress/acceptencoding.go:62— compress.parseAcceptableEncodings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XForwarded.removeConnectionHeaders (cognitive 17) pkg/middlewares/forwardedheaders/forwarded_header.go:200— XForwarded.removeConnectionHeaders has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 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.
snippet.parseNginxDuration (cognitive 17) pkg/middlewares/ingressnginx/snippet/action.go:567— snippet.parseNginxDuration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.Provide (cognitive 17) pkg/provider/consulcatalog/consul_catalog.go:155— Provider.Provide has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 4). 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 162). 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.
ingressnginx.parseIngressConfig (cognitive 17) pkg/provider/kubernetes/ingress-nginx/annotations.go:137— ingressnginx.parseIngressConfig has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Provider.buildServersTransport (cognitive 17) pkg/provider/kubernetes/ingress-nginx/build.go:680— Provider.buildServersTransport has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, match/switch 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.
Provider.renewCertificates (cognitive 17) pkg/provider/tailscale/provider.go:99— Provider.renewCertificates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 2 (4 pts), match/switch 1 (2 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.
httputil.rewriteRequestBuilder (cognitive 17) pkg/proxy/httputil/proxy.go:67— httputil.rewriteRequestBuilder has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1, loops 1 (nesting depth added 6). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 68). 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.
Manager.buildEntryPointHandler (cognitive 17) pkg/server/router/router.go:239— Manager.buildEntryPointHandler has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DetailsCard.DetailsCard (cognitive 17) webui/src/components/resources/DetailsCard.tsx:39— DetailsCard.DetailsCard has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 5, if/else 2 (nesting depth added 3). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 73, 51, 75). 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.
Centrifuge.run (cognitive 16) cmd/internal/gen/centrifuge.go:97— Centrifuge.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Handler.logTheRoundTrip (cognitive 16) pkg/middlewares/accesslog/logger.go:355— Handler.logTheRoundTrip has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, 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.
auth.NewForward (cognitive 16) pkg/middlewares/auth/forward.go:70— auth.NewForward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 1, 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, 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.
Header.PostRequestModifyResponseHeaders (cognitive 16) pkg/middlewares/headers/header.go:71— Header.PostRequestModifyResponseHeaders has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, 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, 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.
snippet.createRewriteAction (cognitive 16) pkg/middlewares/ingressnginx/snippet/action.go:718— snippet.createRewriteAction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 2, boolean chains 1 (nesting depth added 1). 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 756). 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.
stripPrefixRegex.ServeHTTP (cognitive 16) pkg/middlewares/stripprefixregex/strip_prefix_regex.go:49— stripPrefixRegex.ServeHTTP 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.
prometheusState.Collect (cognitive 16) pkg/observability/metrics/prometheus.go:388— prometheusState.Collect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 6 (7 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.
plugins.checkLocalPluginManifest (cognitive 16) pkg/plugins/plugins.go:112— plugins.checkLocalPluginManifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, match/switch 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.
crd.getServicePort (cognitive 16) REDACTED:834— crd.getServicePort has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, loops 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
configBuilder.fullServiceName (cognitive 16) pkg/provider/kubernetes/crd/kubernetes_http.go:895— configBuilder.fullServiceName 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.
gateway.matchingGatewayListenersForParentRef (cognitive 16) pkg/provider/kubernetes/gateway/kubernetes.go:1882— gateway.matchingGatewayListenersForParentRef has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, 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.
TransportManager.Update (cognitive 16) pkg/server/service/transport.go:53— TransportManager.Update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tls.parseCertificate (cognitive 16) pkg/tls/certificate_store.go:228— tls.parseCertificate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyMethods: Provider pkg/provider/kubernetes/gateway/kubernetes.go:86— TooManyMethods — 52 methods, declared across 5 files: gateway/kubernetes.go (25), gateway/httproute.go (9), gateway/grpcroute.go (6), gateway/tcproute.go (6), +1 more file(s). The bar is 30 methods; this is 22 over it, 1.73× 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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×1
D4 · Code Duplication· Near-duplicate member family (4 members, 25 shared lines) · ×1
Near-duplicate member family (4 members, 25 shared lines) pkg/provider/kubernetes/gateway/grpcroute.go:240— pkg/provider/kubernetes/gateway/grpcroute.go:240-300 | pkg/provider/kubernetes/gateway/httproute.go:306-412 | pkg/provider/kubernetes/gateway/tcproute.go:242-313 | pkg/provider/kubernetes/gateway/tlsroute.go:258-334 — These 4 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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· Near-duplicate member family (3 members, 103 shared lines) · ×1
Near-duplicate member family (3 members, 103 shared lines) pkg/provider/kubernetes/gateway/grpcroute.go:348— pkg/provider/kubernetes/gateway/grpcroute.go:348-496 | pkg/provider/kubernetes/gateway/httproute.go:532-679 | pkg/provider/kubernetes/gateway/tlsroute.go:336-479 — These 3 members are variants of one another: a block of 103 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
Near-duplicate member pair (73 shared lines) pkg/provider/kubernetes/crd/kubernetes_tcp.go:214— pkg/provider/kubernetes/crd/kubernetes_tcp.go:214-328 | pkg/provider/kubernetes/crd/kubernetes_udp.go:128-239 — These two members are variants of one another: 73 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) pkg/provider/consulcatalog/consul_catalog.go:395— pkg/provider/consulcatalog/consul_catalog.go:395-453 | pkg/provider/consulcatalog/consul_catalog.go:457-533 — 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· Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (10 members, 50+ identical tokens) pkg/api/handler_certificate.go:27— pkg/api/handler_certificate.go:27-57 | pkg/api/handler_entrypoint.go:22-51 | pkg/api/handler_http.go:74-103 | pkg/api/handler_http.go:131-160 | pkg/api/handler_http.go:188-217 | pkg/api/handler_tcp.go:69-98 | pkg/api/handler_tcp.go:126-155 | pkg/api/handler_tcp.go:183-212 | pkg/api/handler_udp.go:48-77 | pkg/api/handler_udp.go:105-134 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication· Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (9 members, 50+ identical tokens) pkg/provider/consulcatalog/consul_catalog.go:155— pkg/provider/consulcatalog/consul_catalog.go:155-249 | pkg/provider/docker/pdocker.go:53-152 | pkg/provider/docker/pswarm.go:57-150 | pkg/provider/ecs/ecs.go:111-154 | pkg/provider/http/http.go:82-118 | REDACTED:98-179 | pkg/provider/kubernetes/gateway/kubernetes.go:234-304 | pkg/provider/kubernetes/ingress-nginx/kubernetes.go:187-247 | pkg/provider/kubernetes/ingress/kubernetes.go:89-162 — These 9 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 9 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 9 times.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) pkg/provider/kubernetes/gateway/client.go:492— pkg/provider/kubernetes/gateway/client.go:492-525 | pkg/provider/kubernetes/gateway/client.go:527-565 | pkg/provider/kubernetes/gateway/client.go:567-605 | pkg/provider/kubernetes/gateway/client.go:607-645 | pkg/provider/kubernetes/gateway/client.go:647-685 | pkg/provider/kubernetes/gateway/client.go:687-738 | pkg/provider/kubernetes/gateway/client.go:740-771 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Duplicated block (62 lines × 2) pkg/provider/kubernetes/gateway/httproute.go:718— pkg/provider/kubernetes/gateway/httproute.go:718-779 | pkg/provider/kubernetes/gateway/tlsroute.go:520-581 — before extracting anything, compare `pkg/provider/kubernetes/gateway/httproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 247 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 `pkg/provider/kubernetes/gateway/httproute.go:718` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `p *Provider) loadServersTransport(namespace` in one and `p *Provider) loadTCPServersTransport(namespace` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (48 lines × 3) pkg/provider/kubernetes/gateway/grpcroute.go:383— pkg/provider/kubernetes/gateway/grpcroute.go:383-430 | pkg/provider/kubernetes/gateway/httproute.go:567-614 | pkg/provider/kubernetes/gateway/tlsroute.go:371-418 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:383` 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 (36 lines × 3) pkg/server/service/loadbalancer/leasttime/leasttime.go:186— pkg/server/service/loadbalancer/leasttime/leasttime.go:186-221 | REDACTED:138-173 | pkg/server/service/loadbalancer/wrr/wrr.go:152-187 — `pkg/server/service/loadbalancer/leasttime/leasttime.go` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 78 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (35 lines × 3) pkg/provider/kubernetes/gateway/grpcroute.go:433— pkg/provider/kubernetes/gateway/grpcroute.go:433-467 | pkg/provider/kubernetes/gateway/httproute.go:617-651 | pkg/provider/kubernetes/gateway/tlsroute.go:421-455 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:433` 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, `pkg/provider/kubernetes/gateway/httproute.go:654` calls `SetDefaults` and `pkg/provider/kubernetes/gateway/grpcroute.go:471` 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 (34 lines × 5) pkg/server/service/loadbalancer/hrw/hrw.go:83— pkg/server/service/loadbalancer/hrw/hrw.go:83-116 | pkg/server/service/loadbalancer/leasttime/leasttime.go:138-171 | REDACTED:91-124 | pkg/server/service/loadbalancer/wrr/wrr.go:105-138 | pkg/tcp/wrr_load_balancer.go:81-114 — `pkg/server/service/loadbalancer/hrw/hrw.go` and `REDACTED` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 3 separate duplicated blocks between them, totalling at least 56 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/server/service/loadbalancer/hrw/hrw.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.
Duplicated block (34 lines × 3) REDACTED:1765— REDACTED:1765-1798 | pkg/provider/kubernetes/gateway/kubernetes.go:2013-2046 | pkg/provider/kubernetes/ingress/kubernetes.go:878-911 — 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. 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 (28–32 lines × 4) REDACTED:1829— REDACTED:1829-1856 | pkg/provider/kubernetes/gateway/kubernetes.go:2049-2076 | pkg/provider/kubernetes/ingress-nginx/kubernetes.go:402-433 | pkg/provider/kubernetes/ingress/kubernetes.go:1000-1031 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. 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) pkg/middlewares/passtlsclientcert/pass_tls_client_cert.go:224— pkg/middlewares/passtlsclientcert/pass_tls_client_cert.go:224-252 | pkg/middlewares/passtlsclientcert/pass_tls_client_cert.go:266-294 — 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 (28 lines × 2) pkg/provider/kubernetes/crd/kubernetes_tcp.go:80— pkg/provider/kubernetes/crd/kubernetes_tcp.go:80-107 | pkg/provider/kubernetes/crd/kubernetes_udp.go:53-80 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_tcp.go` and `pkg/provider/kubernetes/crd/kubernetes_udp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 127 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 (27 lines × 2) REDACTED:320— REDACTED:320-346 | REDACTED:395-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. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:320` 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 (25–26 lines × 2) pkg/healthcheck/healthcheck.go:72— pkg/healthcheck/healthcheck.go:72-97 | pkg/healthcheck/healthcheck_tcp.go:41-65 — before extracting anything, compare `pkg/healthcheck/healthcheck.go` and `pkg/healthcheck/healthcheck_tcp.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 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 (26 lines × 2) pkg/server/service/transport.go:379— pkg/server/service/transport.go:379-404 | REDACTED:245-270 — 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 (24–25 lines × 2) pkg/provider/ecs/ecs.go:394— pkg/provider/ecs/ecs.go:394-418 | pkg/provider/ecs/ecs.go:458-481 — 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 `pkg/provider/ecs/ecs.go:394` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (23 lines × 3) pkg/provider/kubernetes/crd/kubernetes_tcp.go:291— pkg/provider/kubernetes/crd/kubernetes_tcp.go:291-313 | pkg/provider/kubernetes/crd/kubernetes_udp.go:203-225 | pkg/provider/kubernetes/gateway/kubernetes.go:1603-1625 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_tcp.go` and `pkg/provider/kubernetes/crd/kubernetes_udp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 127 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 `pkg/provider/kubernetes/crd/kubernetes_tcp.go:291` 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 (22 lines × 4) pkg/provider/kubernetes/crd/client.go:132— pkg/provider/kubernetes/crd/client.go:132-153 | pkg/provider/kubernetes/gateway/client.go:104-125 | pkg/provider/kubernetes/ingress-nginx/client.go:74-95 | pkg/provider/kubernetes/ingress/client.go:88-109 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times.
Duplicated block (21–22 lines × 2) pkg/server/middleware/middlewares.go:79— pkg/server/middleware/middlewares.go:79-99 | pkg/server/middleware/tcp/middlewares.go:49-70 — 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 `pkg/server/middleware/middlewares.go:79` 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 (20–21 lines × 2) pkg/provider/kubernetes/crd/kubernetes_http.go:949— pkg/provider/kubernetes/crd/kubernetes_http.go:949-969 | pkg/provider/kubernetes/crd/kubernetes_tcp.go:355-374 — before extracting anything, compare `pkg/provider/kubernetes/crd/kubernetes_http.go` and `pkg/provider/kubernetes/crd/kubernetes_tcp.go` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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.
Duplicated block (20 lines × 5) REDACTED:131— REDACTED:131-150 | pkg/provider/kubernetes/gateway/kubernetes.go:247-266 | pkg/provider/kubernetes/ingress-nginx/kubernetes.go:196-215 | pkg/provider/kubernetes/ingress/kubernetes.go:111-130 | pkg/provider/kubernetes/knative/kubernetes.go:84-103 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:131` 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 (20 lines × 3) pkg/provider/kubernetes/gateway/grpcroute.go:361— pkg/provider/kubernetes/gateway/grpcroute.go:361-380 | pkg/provider/kubernetes/gateway/httproute.go:545-564 | pkg/provider/kubernetes/gateway/tlsroute.go:349-368 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 (20 lines × 2) pkg/middlewares/auth/connectionheader.go:19— pkg/middlewares/auth/connectionheader.go:19-38 | pkg/middlewares/ingressnginx/snippet/connectionheader.go:27-46 — before extracting anything, compare `pkg/middlewares/auth/connectionheader.go` and `pkg/middlewares/ingressnginx/snippet/connectionheader.go` as WHOLE FILES: 95% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/middlewares/ingressnginx/snippet/connectionheader.go:22` calls `CanonicalHeaderKey` and `pkg/middlewares/auth/connectionheader.go:14` 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 × 9) pkg/api/handler_entrypoint.go:36— pkg/api/handler_entrypoint.go:36-51 | pkg/api/handler_http.go:88-103 | pkg/api/handler_http.go:145-160 | pkg/api/handler_http.go:202-217 | pkg/api/handler_tcp.go:83-98 | pkg/api/handler_tcp.go:140-155 | pkg/api/handler_tcp.go:197-212 | pkg/api/handler_udp.go:62-77 | pkg/api/handler_udp.go:119-134 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 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 `pkg/api/handler_entrypoint.go:36` 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 (13–16 lines × 2) pkg/middlewares/customerrors/custom_errors.go:130— pkg/middlewares/customerrors/custom_errors.go:130-142 | pkg/middlewares/redirect/redirect_scheme.go:83-98 — 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 `pkg/middlewares/customerrors/custom_errors.go:130` 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 (15–16 lines × 2) pkg/provider/kubernetes/gateway/tcproute.go:40— pkg/provider/kubernetes/gateway/tcproute.go:40-55 | pkg/provider/kubernetes/gateway/tlsroute.go:41-55 — before extracting anything, compare `pkg/provider/kubernetes/gateway/tcproute.go` and `pkg/provider/kubernetes/gateway/tlsroute.go` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 196 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 `pkg/provider/kubernetes/gateway/tcproute.go:40` 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 (14 lines × 4) pkg/provider/kubernetes/gateway/client.go:534— pkg/provider/kubernetes/gateway/client.go:534-547 | pkg/provider/kubernetes/gateway/client.go:574-587 | pkg/provider/kubernetes/gateway/client.go:614-627 | pkg/provider/kubernetes/gateway/client.go:654-667 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10–14 lines × 3) pkg/provider/kubernetes/crd/kubernetes_http.go:735— pkg/provider/kubernetes/crd/kubernetes_http.go:735-748 | pkg/provider/kubernetes/ingress-nginx/build.go:813-822 | pkg/provider/kubernetes/ingress/kubernetes.go:748-761 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/crd/kubernetes_http.go:735` 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, `pkg/provider/kubernetes/ingress/kubernetes.go:746` calls `getProtocol` and `pkg/provider/kubernetes/ingress-nginx/build.go:811` 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 (13–14 lines × 2) pkg/provider/consulcatalog/connect_tls.go:65— pkg/provider/consulcatalog/connect_tls.go:65-78 | pkg/provider/consulcatalog/connect_tls.go:92-104 — 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. 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 (13 lines × 4) pkg/provider/kubernetes/gateway/grpcroute.go:34— pkg/provider/kubernetes/gateway/grpcroute.go:34-46 | pkg/provider/kubernetes/gateway/httproute.go:40-52 | pkg/provider/kubernetes/gateway/tcproute.go:48-60 | pkg/provider/kubernetes/gateway/tlsroute.go:48-60 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:34` 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 × 3) pkg/provider/kubernetes/gateway/grpcroute.go:49— pkg/provider/kubernetes/gateway/grpcroute.go:49-61 | pkg/provider/kubernetes/gateway/httproute.go:55-67 | pkg/provider/kubernetes/gateway/tlsroute.go:63-75 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:49` 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 × 4) pkg/provider/kubernetes/crd/client.go:222— pkg/provider/kubernetes/crd/client.go:222-233 | pkg/provider/kubernetes/gateway/client.go:169-180 | pkg/provider/kubernetes/ingress-nginx/client.go:170-181 | pkg/provider/kubernetes/ingress/client.go:170-181 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. 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–12 lines × 2) pkg/server/router/router.go:283— pkg/server/router/router.go:283-293 | pkg/server/router/router.go:536-547 — 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 × 10) pkg/api/handler_certificate.go:44— pkg/api/handler_certificate.go:44-53 | pkg/api/handler_entrypoint.go:38-47 | pkg/api/handler_http.go:90-99 | pkg/api/handler_http.go:147-156 | pkg/api/handler_http.go:204-213 | pkg/api/handler_tcp.go:85-94 | pkg/api/handler_tcp.go:142-151 | pkg/api/handler_tcp.go:199-208 | pkg/api/handler_udp.go:64-73 | pkg/api/handler_udp.go:121-130 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 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 `pkg/api/handler_certificate.go:44` 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–10 lines × 5) pkg/provider/kubernetes/crd/client.go:258— pkg/provider/kubernetes/crd/client.go:258-267 | pkg/provider/kubernetes/gateway/client.go:257-266 | pkg/provider/kubernetes/ingress-nginx/client.go:208-217 | pkg/provider/kubernetes/ingress/client.go:200-209 | pkg/provider/kubernetes/knative/client.go:152-160 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/kubernetes/crd/client.go:258` 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) pkg/provider/docker/config.go:119— pkg/provider/docker/config.go:119-128 | pkg/provider/docker/config.go:148-157 | pkg/provider/docker/config.go:179-188 — 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 `pkg/provider/docker/config.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.
Duplicated block (7–10 lines × 2) pkg/provider/consulcatalog/consul_catalog.go:162— pkg/provider/consulcatalog/consul_catalog.go:162-171 | pkg/provider/nomad/nomad.go:184-190 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/consulcatalog/consul_catalog.go:162` 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 × 9) pkg/provider/consulcatalog/consul_catalog.go:242— pkg/provider/consulcatalog/consul_catalog.go:242-249 | pkg/provider/docker/pdocker.go:145-152 | pkg/provider/docker/pswarm.go:143-150 | pkg/provider/ecs/ecs.go:147-154 | pkg/provider/http/http.go:111-118 | REDACTED:172-179 | pkg/provider/kubernetes/gateway/kubernetes.go:297-304 | pkg/provider/kubernetes/ingress-nginx/kubernetes.go:240-247 | pkg/provider/kubernetes/ingress/kubernetes.go:155-162 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 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 9 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/provider/consulcatalog/consul_catalog.go:242` 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 (7–8 lines × 2) pkg/provider/kubernetes/gateway/grpcroute.go:489— pkg/provider/kubernetes/gateway/grpcroute.go:489-496 | pkg/provider/kubernetes/gateway/httproute.go:673-679 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go: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 `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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `pkg/provider/kubernetes/gateway/grpcroute.go:487` calls `SetDefaults` and `pkg/provider/kubernetes/gateway/httproute.go:671` 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 (7 lines × 6) pkg/provider/file/file.go:444— pkg/provider/file/file.go:444-450 | pkg/provider/http/http.go:195-201 | pkg/provider/kubernetes/gateway/grpcroute.go:154-160 | pkg/provider/kubernetes/gateway/httproute.go:174-180 | pkg/provider/kubernetes/ingress-nginx/translator.go:25-31 | pkg/provider/merge.go:66-72 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/file/file.go:444` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 8) pkg/api/handler_http.go:124— pkg/api/handler_http.go:124-129 | pkg/api/handler_http.go:181-186 | pkg/api/handler_http.go:238-243 | pkg/api/handler_tcp.go:119-124 | pkg/api/handler_tcp.go:176-181 | pkg/api/handler_tcp.go:233-238 | pkg/api/handler_udp.go:98-103 | pkg/api/handler_udp.go:155-160 — before extracting anything, compare `pkg/api/handler_http.go` and `pkg/api/handler_tcp.go` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 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 `pkg/api/handler_http.go:124` 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 (4–5 lines × 4) pkg/provider/kubernetes/crd/client.go:240— pkg/provider/kubernetes/crd/client.go:240-243 | pkg/provider/kubernetes/gateway/client.go:224-227 | pkg/provider/kubernetes/ingress-nginx/client.go:185-189 | pkg/provider/kubernetes/ingress/client.go:185-189 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. 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 × 8) pkg/config/runtime/runtime_http.go:95— pkg/config/runtime/runtime_http.go:95-110 | pkg/config/runtime/runtime_http.go:124-139 | pkg/config/runtime/runtime_http.go:159-174 | pkg/config/runtime/runtime_tcp.go:65-80 | pkg/config/runtime/runtime_tcp.go:99-114 | pkg/config/runtime/runtime_tcp.go:153-168 | pkg/config/runtime/runtime_udp.go:69-84 | pkg/config/runtime/runtime_udp.go:100-115 — before extracting anything, compare `pkg/config/runtime/runtime_http.go` and `pkg/config/runtime/runtime_tcp.go` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `error` to `r *RouterInfo) AddError(err` in one and `m *MiddlewareInfo) AddError(err` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 3) REDACTED:1749— REDACTED:1749-1762 | pkg/provider/kubernetes/gateway/kubernetes.go:1997-2010 | pkg/provider/kubernetes/ingress/kubernetes.go:913-926 — 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 × 4) pkg/provider/kubernetes/gateway/grpcroute.go:269— pkg/provider/kubernetes/gateway/grpcroute.go:269-275 | pkg/provider/kubernetes/gateway/httproute.go:335-341 | pkg/provider/kubernetes/gateway/tcproute.go:271-277 | pkg/provider/kubernetes/gateway/tlsroute.go:287-293 — before extracting anything, compare `pkg/provider/kubernetes/gateway/grpcroute.go` and `pkg/provider/kubernetes/gateway/httproute.go` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 278 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 `pkg/provider/kubernetes/gateway/grpcroute.go:269` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `string` to `routerName` in one and `p *Provider) loadTCPService(routerName` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 7) pkg/provider/kubernetes/gateway/client.go:493— pkg/provider/kubernetes/gateway/client.go:493-497 | pkg/provider/kubernetes/gateway/client.go:528-532 | pkg/provider/kubernetes/gateway/client.go:568-572 | pkg/provider/kubernetes/gateway/client.go:608-612 | pkg/provider/kubernetes/gateway/client.go:648-652 | pkg/provider/kubernetes/gateway/client.go:688-692 | pkg/provider/kubernetes/gateway/client.go:741-745 — all 7 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 `pkg/provider/kubernetes/gateway/client.go:493` 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.
Off the main sequence: github.com/traefik/traefik/dynamic/ext — github.com/traefik/traefik/dynamic/ext: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
P12 · CI test-gate honesty· Pull-request path filter skips the test gate for source changes · ×1
Pull-request path filter skips the test gate for source changes REDACTED:12— `paths-ignore: docs/**` matches compiled source (`docs/content/assets/js/banner.js`, `docs/content/assets/js/extra.js`, `docs/content/assets/js/hljs/highlight.pack.js`) — a pull request that changes only those files merges without running the tests. Ignore only documentation and other files no build reads.
Outbound HTTP without resilience pkg/collector/collector.go:90— `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.
Duplication concentrated across 4 sibling directories (10 clone groups) webui/src/pages/http/HttpServices.tsx:18— 10 of the duplicated blocks reported below have copies in at least two of the sibling directories certificates, http, tcp, udp under webui/src/pages/. That concentration is one structural fact, not 10 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 10 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 5 sibling directories (6 clone groups) webui/src/components/icons/providers/index.tsx:52— 6 of the duplicated blocks reported below have copies in at least two of the sibling directories icons, middlewares, resources, routers, services under webui/src/components/. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplicated block (92 lines × 3 locations) webui/src/pages/http/HttpServices.tsx:18— webui/src/pages/http/HttpServices.tsx:18 · webui/src/pages/tcp/TcpServices.tsx:18 · webui/src/pages/udp/UdpServices.tsx:18 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (91 lines × 2 locations) webui/src/pages/http/HttpMiddlewares.tsx:19— webui/src/pages/http/HttpMiddlewares.tsx:19 · webui/src/pages/tcp/TcpMiddlewares.tsx:19 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (88 lines × 2 locations) webui/src/pages/tcp/TcpRouters.tsx:39— webui/src/pages/tcp/TcpRouters.tsx:39 · webui/src/pages/udp/UdpRouters.tsx:25 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Wholesale file copy (85 identical lines × 2 files) webui/src/pages/http/HttpRouters.tsx:1— webui/src/pages/http/HttpRouters.tsx:1 · webui/src/pages/tcp/TcpRouters.tsx:1 — these 2 files are line-for-line copies of one another — 85 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
Duplicated block (46 lines × 9 locations) webui/src/pages/certificates/Certificates.tsx:75— webui/src/pages/certificates/Certificates.tsx:75 · webui/src/pages/http/HttpMiddlewares.tsx:66 · webui/src/pages/http/HttpRouters.tsx:99 · webui/src/pages/http/HttpServices.tsx:65 · +5 more site(s) not listed — the 9 copies are spread across 4 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 9 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (28 lines × 2 locations) webui/src/components/icons/providers/index.tsx:52— webui/src/components/icons/providers/index.tsx:52 · webui/src/components/resources/ProviderIcon.tsx:46 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (22 lines × 2 locations) webui/src/components/middlewares/MiddlewareDefinition.tsx:9— webui/src/components/middlewares/MiddlewareDefinition.tsx:9 · webui/src/components/services/ServiceDefinition.tsx:9 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (21 lines × 9 locations) webui/src/pages/certificates/Certificates.tsx:48— webui/src/pages/certificates/Certificates.tsx:48 · webui/src/pages/http/HttpMiddlewares.tsx:41 · webui/src/pages/http/HttpRouters.tsx:70 · webui/src/pages/http/HttpServices.tsx:39 · +5 more site(s) not listed — the 9 copies are spread across 9 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (19 lines × 2 locations) webui/src/pages/hub-demo/icons/api.tsx:6— webui/src/pages/hub-demo/icons/api.tsx:6 · webui/src/pages/hub-demo/icons/portal.tsx:6 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (18 lines × 2 locations) webui/src/components/routers/RouterDetail.tsx:21— webui/src/components/routers/RouterDetail.tsx:21 · webui/src/components/services/ServiceDetail.tsx:23 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (18 lines × 3 locations) webui/src/pages/dashboard/Dashboard.tsx:96— webui/src/pages/dashboard/Dashboard.tsx:96 · webui/src/pages/dashboard/Dashboard.tsx:115 · webui/src/pages/dashboard/Dashboard.tsx:134 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (10 lines × 4 locations) webui/src/components/icons/providers/index.tsx:31— webui/src/components/icons/providers/index.tsx:31 · webui/src/components/icons/providers/index.tsx:55 · webui/src/components/resources/ProviderIcon.tsx:28 · webui/src/components/resources/ProviderIcon.tsx:49 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (8 lines × 3 locations) webui/src/pages/certificates/Certificates.tsx:22— webui/src/pages/certificates/Certificates.tsx:22 · webui/src/pages/http/HttpMiddlewares.tsx:21 · webui/src/pages/tcp/TcpMiddlewares.tsx:21 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (6 lines × 2 locations) webui/src/pages/http/HttpMiddleware.tsx:6— webui/src/pages/http/HttpMiddleware.tsx:6 · webui/src/pages/http/HttpRouter.tsx:6 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (6 lines × 8 locations) webui/src/pages/http/HttpMiddleware.tsx:1— webui/src/pages/http/HttpMiddleware.tsx:1 · webui/src/pages/http/HttpRouter.tsx:1 · webui/src/pages/http/HttpService.tsx:1 · webui/src/pages/tcp/TcpMiddleware.tsx:1 · +4 more site(s) not listed — the 8 copies are spread across 8 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (6 lines × 5 locations) webui/src/pages/tcp/TcpMiddleware.tsx:6— webui/src/pages/tcp/TcpMiddleware.tsx:6 · webui/src/pages/tcp/TcpRouter.tsx:6 · webui/src/pages/tcp/TcpService.tsx:6 · webui/src/pages/udp/UdpRouter.tsx:6 · +1 more site(s) not listed — the 5 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 5 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (5 lines × 2 locations) webui/src/components/resources/ResourceErrors.tsx:22— webui/src/components/resources/ResourceErrors.tsx:22 · webui/src/components/routers/RouterFlowDiagram.tsx:190 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Complex function (anonymous) (cyclomatic 16, cognitive 17) webui/src/components/services/ServiceHealthCheck.tsx:16— (anonymous) has cyclomatic complexity 16 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 16, cognitive 15) webui/src/components/icons/providers/index.tsx:26— (anonymous) has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function CertificateDetails (cyclomatic 15, cognitive 14) webui/src/components/certificates/CertificateDetails.tsx:15— CertificateDetails has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 15, cognitive 14) webui/src/components/resources/ProviderIcon.tsx:23— (anonymous) has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 13, cognitive 18) webui/src/mocks/utils.ts:22— (anonymous) has cyclomatic complexity 13 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function RouterFlowDiagram (cyclomatic 12, cognitive 10) webui/src/components/routers/RouterFlowDiagram.tsx:81— RouterFlowDiagram has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function SideNav (cyclomatic 12, cognitive 10) webui/src/layout/navigation/SideNavBar.tsx:125— SideNav has cyclomatic complexity 12 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function useFetchWithPagination (cyclomatic 11, cognitive 10) webui/src/hooks/use-fetch-with-pagination.tsx:30— useFetchWithPagination has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function Dashboard (cyclomatic 11, cognitive 10) webui/src/pages/dashboard/Dashboard.tsx:50— Dashboard has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Dead file (~74 LoC) webui/src/components/resources/ProviderIcon.tsx— no import path from any entry point (4 application, 9 tooling, 38 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~13 LoC) webui/src/hooks/use-previous.tsx— no import path from any entry point (4 application, 9 tooling, 38 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Dead file (~1 LoC) webui/src/utils/wait.ts— no import path from any entry point (4 application, 9 tooling, 38 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
X2 · Cancellation propagation· Async function without AbortSignal · ×1
Async function without AbortSignal: fetchVersion webui/src/contexts/version.tsx:27— `fetchVersion` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Duplicated predicate pkg/provider/kubernetes/gateway/httproute.go:729— `(caCertRef.Group != "" && caCertRef.Group != groupCore) || (caCertRef.Kind != kindConfigMap && caCertRef.Kind != kindSecret)` appears character-identically in 2 files — pkg/provider/kubernetes/gateway/httproute.go, pkg/provider/kubernetes/gateway/tlsroute.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:51— `conf.LoadBalancer != nil && conf.Weighted != 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 pkg/middlewares/inflightreq/inflight_req.go:32— `config.SourceCriterion == nil || config.SourceCriterion.IPStrategy == nil && config.SourceCriterion.RequestHeaderName == "" && !config.Sourc…` appears character-identically in 2 files — pkg/middlewares/inflightreq/inflight_req.go, pkg/middlewares/ratelimiter/rate_limiter.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 pkg/api/handler_http.go:250— `criterion.withStatus(item.Status) && criterion.searchIn(item.Rule, name) && criterion.filterService(item.Service) && criterion.filterMiddlew…` appears character-identically in 2 files — pkg/api/handler_http.go, pkg/api/handler_tcp.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 pkg/api/handler_http.go:261— `criterion.withStatus(item.Status) && criterion.searchIn(name)` appears character-identically in 3 files — pkg/api/handler_http.go, pkg/api/handler_tcp.go, pkg/api/handler_udp.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 pkg/provider/kubernetes/crd/kubernetes_tcp.go:304— `endpoint.Conditions.Ready == nil || !*endpoint.Conditions.Ready` appears character-identically in 3 files — pkg/provider/kubernetes/crd/kubernetes_tcp.go, pkg/provider/kubernetes/crd/kubernetes_udp.go, pkg/provider/kubernetes/gateway/kubernetes.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 pkg/middlewares/auth/forward.go:417— `err != nil && !errors.Is(err, io.ErrUnexpectedEOF)` appears character-identically in 2 files — pkg/middlewares/auth/forward.go, pkg/server/service/loadbalancer/mirror/mirror.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 pkg/middlewares/retry/retry.go:157— `err != nil && !errors.Is(err, mirror.ErrBodyTooLarge)` appears character-identically in 2 files — pkg/middlewares/retry/retry.go, pkg/server/service/loadbalancer/failover/failover.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 pkg/api/handler.go:192— `field.Kind() == reflect.Pointer && field.Elem().Kind() == reflect.Struct` appears character-identically in 2 files — pkg/api/handler.go, pkg/api/handler_overview.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 pkg/middlewares/auth/forward.go:300— `forwardResponse.StatusCode < http.StatusOK || forwardResponse.StatusCode >= http.StatusMultipleChoices` appears character-identically in 2 files — pkg/middlewares/auth/forward.go, pkg/middlewares/ingressnginx/snippet/snippet.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 pkg/provider/kubernetes/gateway/grpcroute.go:255— `group != groupCore || kind != kindService` appears character-identically in 4 files — pkg/provider/kubernetes/gateway/grpcroute.go, pkg/provider/kubernetes/gateway/httproute.go, pkg/provider/kubernetes/gateway/tcproute.go, pkg/provider/kubernetes/gateway/tlsroute.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 pkg/middlewares/stripprefix/strip_prefix.go:118— `i < len(rawPath) && decoded < len(decodedPrefix)` appears character-identically in 2 files — pkg/middlewares/stripprefix/strip_prefix.go, pkg/middlewares/stripprefixregex/strip_prefix_regex.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 pkg/tls/certificate_store.go:276— `len(certDomain) > 0 && certDomain[len(certDomain)-1] == '.'` appears character-identically in 2 files — pkg/tls/certificate_store.go, pkg/types/domains.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 pkg/provider/consulcatalog/config.go:42— `len(confFromLabel.TCP.Routers) > 0 || len(confFromLabel.TCP.Services) > 0` appears character-identically in 3 files — pkg/provider/consulcatalog/config.go, pkg/provider/docker/config.go, pkg/provider/ecs/config.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 pkg/provider/consulcatalog/config.go:64— `len(confFromLabel.UDP.Routers) > 0 || len(confFromLabel.UDP.Services) > 0` appears character-identically in 3 files — pkg/provider/consulcatalog/config.go, pkg/provider/docker/config.go, pkg/provider/ecs/config.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 pkg/plugins/middlewareyaegi.go:72— `len(results) > 1 && results[1].Interface() != nil` appears character-identically in 2 files — pkg/plugins/middlewareyaegi.go, pkg/plugins/providers.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 pkg/provider/kubernetes/crd/kubernetes_tcp.go:323— `len(servers) == 0 && !p.AllowEmptyServices` appears character-identically in 2 files — pkg/provider/kubernetes/crd/kubernetes_tcp.go, pkg/provider/kubernetes/crd/kubernetes_udp.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 pkg/middlewares/auth/auth.go:66— `line != "" && !strings.HasPrefix(line, "#")` appears character-identically in 2 files — pkg/middlewares/auth/auth.go, pkg/provider/kubernetes/ingress-nginx/build.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 pkg/provider/consulcatalog/config.go:289— `loadBalancer.Servers[0].Scheme != "" || loadBalancer.Servers[0].Port != ""` appears character-identically in 3 files — pkg/provider/consulcatalog/config.go, pkg/provider/docker/config.go, pkg/provider/ecs/config.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:228— `os.Getenv("KUBERNETES_SERVICE_HOST") != "" && os.Getenv("KUBERNETES_SERVICE_PORT") != ""` appears character-identically in 5 files — REDACTED, pkg/provider/kubernetes/gateway/kubernetes.go, pkg/provider/kubernetes/ingress-nginx/kubernetes.go, pkg/provider/kubernetes/ingress/kubernetes.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 pkg/provider/kubernetes/crd/kubernetes_http.go:721— `p.Name != nil && svcPort.Name == *p.Name` appears character-identically in 4 files — pkg/provider/kubernetes/crd/kubernetes_http.go, pkg/provider/kubernetes/crd/kubernetes_tcp.go, pkg/provider/kubernetes/crd/kubernetes_udp.go, pkg/provider/kubernetes/gateway/kubernetes.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 pkg/provider/kubernetes/crd/kubernetes_tcp.go:74— `p.nameBuilder.safe && len(route.Services) > 1` appears character-identically in 2 files — pkg/provider/kubernetes/crd/kubernetes_tcp.go, pkg/provider/kubernetes/crd/kubernetes_udp.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 pkg/muxer/http/mux.go:229— `r[i].priority > r[j].priority || (r[i].priority == r[j].priority && r[i].providerPriority > r[j].providerPriority)` appears character-identically in 2 files — pkg/muxer/http/mux.go, pkg/muxer/tcp/mux.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 pkg/provider/kubernetes/gateway/grpcroute.go:85— `resolvedRefCondition == nil || resolvedRefCondition.Status == metav1.ConditionTrue` appears character-identically in 4 files — pkg/provider/kubernetes/gateway/grpcroute.go, pkg/provider/kubernetes/gateway/httproute.go, pkg/provider/kubernetes/gateway/tcproute.go, pkg/provider/kubernetes/gateway/tlsroute.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 pkg/server/router/router.go:257— `routerConfig.Priority > maxUserPriority && !strings.HasSuffix(routerName, "@internal")` appears character-identically in 2 files — pkg/server/router/router.go, pkg/server/router/tcp/manager.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.
Orphaned file pkg/provider/ecs/ecs.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 pkg/api/sort.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 pkg/healthcheck/healthcheck_tcp.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 pkg/tls/cipher.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 pkg/api/certificate.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 pkg/api/handler_udp.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 pkg/server/service/loadbalancer/failover/failover.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 pkg/plugins/middlewareyaegi.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 webui/src/pages/certificates/Certificates.tsx: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 webui/src/components/certificates/CertificateDetails.tsx: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 pkg/config/runtime/runtime_udp.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 pkg/middlewares/ipallowlist/ip_allowlist.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 pkg/api/handler_certificate.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.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add vitest-axe to verify at runtime, then gate it in CI. What was searched, so you can tell an absence from a miss: the 109 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 8 significant file(s) lose their only recent owner: webui/src/components/resources/DetailsCard.tsx, webui/src/pages/hub-demo/HubDashboard.tsx, webui/src/pages/http/HttpMiddlewares.tsx, webui/src/pages/http/HttpServices.tsx, webui/src/pages/tcp/TcpMiddlewares.tsx, webui/src/pages/udp/UdpServices.tsx, webui/src/pages/tcp/TcpServices.tsx, webui/src/components/services/Servers.tsx. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 4 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 (13 single-owned of 273 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; 273 of the 513 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: REDACTED, pkg/rules/parser.go, pkg/middlewares/ratelimiter/ttlmap/ttlmap.go, pkg/provider/kubernetes/k8s/endpointslice_indexer.go, pkg/ip/strategy.go.
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 2 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (72614 LoC, 654 module-visible types across 138 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
REDACTED
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 13 of 274 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; 274 of the 513 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: pkg/provider/ecs/ecs.go, pkg/healthcheck/healthcheck_tcp.go, pkg/tls/cipher.go, pkg/api/sort.go, pkg/server/service/loadbalancer/failover/failover.go, pkg/plugins/middlewareyaegi.go, webui/src/pages/certificates/Certificates.tsx, webui/src/components/certificates/CertificateDetails.tsx (and 5 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
README/code drift webui/readme.md:23— webui/readme.md names Node.js 22, but the repository declares pinned 24. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Logging is not universal — Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `pkg/plugins/fixtures/withoutsocket`.
No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
R7 · Dead Code· Unused export 'StatusWrapper' · ×1
Unused export 'StatusWrapper' webui/src/components/resources/ResourceStatus.tsx:6— Nothing imports this binding — it is safe to review for removal.
X2 · Cancellation propagation· Not all functions that make a request accept a context.Context or an AbortSignal · ×1
Not all functions that make a request accept a context.Context or an AbortSignal — Only 12/15 functions that make a cancellable request (fetch, axios, ky, ofetch; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Null assertions (`!`) reduce the strict null checking score — ~2.3 `!` null assertions per 1k TypeScript source lines — 16 assertion(s) across the 7026 source line(s) of the 121 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: webui/src/pages/http/HttpMiddleware.tsx (2), webui/src/pages/http/HttpRouter.tsx (2), webui/src/pages/tcp/TcpMiddleware.tsx (2). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
Outdated: github.com/Masterminds/sprig/v3 — `github.com/Masterminds/sprig/v3` is required at v3.2.3 in REDACTED, but v3.3.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/Masterminds/sprig/v3@v3.3.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/andybalholm/brotli — `github.com/andybalholm/brotli` is required at v1.2.2 in REDACTED, but v1.2.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/andybalholm/brotli@v1.2.7 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2 — `github.com/aws/aws-sdk-go-v2` is required at v1.47.0 in REDACTED, but v1.47.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/aws/aws-sdk-go-v2@v1.47.4 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/config — `github.com/aws/aws-sdk-go-v2/config` is required at v1.33.4 in REDACTED, but v1.33.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/aws/aws-sdk-go-v2/config@v1.33.10 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/credentials — `github.com/aws/aws-sdk-go-v2/credentials` is required at v1.20.4 in REDACTED, but v1.20.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/aws/aws-sdk-go-v2/credentials@v1.20.10 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/ec2 — `github.com/aws/aws-sdk-go-v2/service/ec2` is required at v1.203.1 in REDACTED, but v1.341.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/service/ec2@v1.341.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/ecs — `github.com/aws/aws-sdk-go-v2/service/ecs` is required at v1.53.15 in REDACTED, but v1.102.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/aws/aws-sdk-go-v2/service/ecs@v1.102.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/ssm — `github.com/aws/aws-sdk-go-v2/service/ssm` is required at v1.56.13 in REDACTED, but v1.81.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/service/ssm@v1.81.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/smithy-go — `github.com/aws/smithy-go` is required at v1.28.1 in REDACTED, but v1.28.6 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/smithy-go@v1.28.6 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/docker/cli — `github.com/docker/cli` is required at v29.8.1+incompatible in REDACTED, but v29.9.2+incompatible is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/docker/cli@v29.9.2+incompatible && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/docker/go-connections — `github.com/docker/go-connections` is required at v0.8.1 in REDACTED, but v0.8.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/docker/go-connections@v0.8.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/hashicorp/consul/api — `github.com/hashicorp/consul/api` is required at v1.26.1 in REDACTED, but v1.35.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/hashicorp/consul/api@v1.35.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/huandu/xstrings — `github.com/huandu/xstrings` is required at v1.5.0 in REDACTED, but v1.6.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/huandu/xstrings@v1.6.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/influxdata/influxdb-client-go/v2 — `github.com/influxdata/influxdb-client-go/v2` is required at v2.7.0 in REDACTED, but v2.14.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/influxdata/influxdb-client-go/v2@v2.14.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/kvtools/redis — `github.com/kvtools/redis` is required at v1.2.1 in REDACTED, but v1.3.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/kvtools/redis@v1.3.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/mitchellh/hashstructure — `github.com/mitchellh/hashstructure` is required at v1.0.0 in REDACTED, but v1.1.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/mitchellh/hashstructure@v1.1.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/moby/moby/api — `github.com/moby/moby/api` is required at v1.56.0 in REDACTED, but v1.56.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/moby/moby/api@v1.56.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/moby/moby/client — `github.com/moby/moby/client` is required at v0.6.0 in REDACTED, but v0.6.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/moby/moby/client@v0.6.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.12.0 in REDACTED, but v0.16.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/pires/go-proxyproto@v0.16.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/prometheus/client_golang — `github.com/prometheus/client_golang` is required at v1.24.0 in REDACTED, but v1.25.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/prometheus/client_golang@v1.25.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/prometheus/client_model — `github.com/prometheus/client_model` is required at v0.6.2 in REDACTED, but v0.6.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/prometheus/client_model@v0.6.3 && 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.62.0 in REDACTED, but v0.64.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/quic-go/quic-go@v0.64.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/redis/go-redis/v9 — `github.com/redis/go-redis/v9` is required at v9.21.0 in REDACTED, but v9.23.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/redis/go-redis/v9@v9.23.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/rs/zerolog — `github.com/rs/zerolog` is required at v1.34.0 in REDACTED, but v1.35.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/rs/zerolog@v1.35.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/spiffe/go-spiffe/v2 — `github.com/spiffe/go-spiffe/v2` is required at v2.8.1 in REDACTED, but v2.9.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/spiffe/go-spiffe/v2@v2.9.0 && go mod tidy` and commit the updated REDACTED and go.sum.
+ 27 more in this group — see findings.md.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 32 file(s) — `pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressroute.go`, `pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressroutetcp.go`, `pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_ingressrouteudp.go`, `pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_middleware.go`, `pkg/provider/kubernetes/crd/generated/clientset/versioned/typed/traefikio/v1alpha1/fake/fake_middlewaretcp.go`, … (+27 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a17983-147f-7e9d-8cb3-be00eea33c67 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 46 · Warnings: 799 · Recommendations: 80 · Info: 52 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 26-10-2026 @ 18:39 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.