Public report of elixir-lsp/elixir-ls, published 13 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.3). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 13 November 2026, 06:22 UTC · Survey ID cd_8eca755b37494d53aaeb28150d6b3321
elixir-lsp/elixir-ls
Measured 13 November 2026, 06:22 UTC, at code version 328a1c0
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Down 2 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: 33,298 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 0.6 person-years · Weakest lens: Maturity, 49
Findings by how serious they are
35 critical239 serious27 minor
31 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 06:22 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
36of 36 dimensions measured by tools.
289of 301 findings point to an exact file and line, so you can open each one in the code. The other 12 concern the repository as a whole, such as missing documentation.
36dimensions across 6 lenses, read from 33,298 lines of product code in 4 projects.
elixir-lsp/elixir-ls falls short of our standard for a preview release because its Dependencies dimensions are rated Critical, and we found no recorded design decisions and no architecture document or diagram. It scores 60 out of 100, which alone would earn Adequate, but it is rated Weak: a rating can't sit more than one step above its weakest group.
Maturity, at 49, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 11 points. Fixing the part of the code only one person knows comes next, worth about 8 points. Raising Maturity to 62 would lift the score to about 67.
Thirty-one pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two secrets can leak from the build pipeline, and one automatic update takes new releases before a bad one can be spotted. Pinning each tool to an exact version, limiting each secret to its own step and setting a waiting period for automatic updates would close these risks. The unsafe setting in infrastructure or container files needs changing to safe values.
The product code is 33,298 lines, about €85,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Maturity rose from 49 to 62, the lowest score rated Strong, the score would rise from 60 to about 67.
Code composition: what the lines of code are
Product code 43%Tests 57%
New since the last survey: 37 findings
These 37 critical or serious findings weren't in the previous survey, on 23 October 2026.
Code Duplication · Edited copy of a member (100 corresponding lines) apps/language_server/lib/language_server/providers/definition/locator.ex
Code Duplication · Edited copy of a member (69 corresponding lines) apps/debug_adapter/lib/debug_adapter/server.ex
Code Duplication · Edited copy of a member (41 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/manipulate_pipes.ex
Code Duplication · Edited copy of a member (59 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex
Code Duplication · Edited copy of a member (24 corresponding lines) apps/language_server/lib/language_server/providers/call_hierarchy.ex
Code Duplication · Edited copy of a member (22 corresponding lines) apps/language_server/lib/language_server/providers/inlay_hints.ex
Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) apps/language_server/lib/language_server/location.ex
Code Duplication · Edited copy of a member (33 corresponding lines) apps/language_server/lib/language_server/location.ex
Code Duplication · Edited copies of one member (3 members, 39+ corresponding lines) apps/language_server/lib/language_server/server.ex
Code Duplication · Edited copy of a member (31 corresponding lines) apps/language_server/lib/language_server/diagnostics.ex
Code Duplication · Edited copy of a member (16 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/llm_implementation_finder.ex
Code Duplication · Edited copy of a member (17 corresponding lines) apps/language_server/lib/language_server/range_utils.ex
Code Duplication · Edited copy of a member (17 corresponding lines) apps/language_server/lib/language_server/providers/call_hierarchy.ex
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) apps/language_server/lib/language_server/providers/declaration/locator.ex
Code Duplication · Edited copy of a member (27 corresponding lines) apps/language_server/lib/language_server/mcp/request_handler.ex
Code Duplication · Edited copy of a member (22 corresponding lines) apps/language_server/lib/language_server/server.ex
Code Duplication · Edited copy of a member (18 corresponding lines) apps/elixir_ls_utils/lib/completion_engine.ex
Code Duplication · Edited copy of a member (22 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex
Code Duplication · Edited copy of a member (19 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex
Code Duplication · Edited copy of a member (12 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex
Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) apps/debug_adapter/lib/debug_adapter/thread_registry.ex
Code Duplication · Edited copy of a member (15 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex
Code Duplication · Edited copies of one member (7 members, 9+ corresponding lines) apps/language_server/lib/language_server/server.ex
Code Duplication · Edited copy of a member (13 corresponding lines) apps/language_server/lib/language_server/source_file.ex
Code Duplication · Edited copy of a member (14 corresponding lines) apps/language_server/lib/language_server/markdown_utils.ex
Code Duplication · Edited copy of a member (5 corresponding lines) apps/debug_adapter/lib/debug_adapter/server.ex
Code Duplication · Edited copy of a member (12 corresponding lines) apps/language_server/lib/language_server/server.ex
Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) apps/language_server/lib/language_server/mcp/request_handler.ex
Code Duplication · Edited copy of a member (12 corresponding lines) apps/debug_adapter/lib/debug_adapter/server.ex
Code Duplication · Edited copy of a member (10 corresponding lines) apps/debug_adapter/lib/debug_adapter/utils.ex
Code Duplication · Edited copy of a member (7 corresponding lines) apps/language_server/lib/language_server/providers/signature_help/signature.ex
Code Duplication · Edited copy of a member (4 corresponding lines) apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex
Code Duplication · Edited copy of a member (2 corresponding lines) apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex
Code Duplication · Edited copy of a member (2 corresponding lines) apps/language_server/lib/language_server/providers/selection_ranges.ex
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 8 findings
These 8 critical or serious findings were in the previous survey, on 23 October 2026, and are gone from this one.
€28,000 to €140,000, for 469 to 1,489 hours of work, about 0.6 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 60. 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: 33,298 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED.
Raises the score by about 11 points · Low effort · ADR Quality
2
Resolve the 1 Off-boarding risk finding(s) in Bus Factor.
Raises the score by about 8 points · Low effort · Bus Factor
3
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.
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 €85,000 to build again, about 0.6 person-years of work. Its weakest lens is Maturity, at 49 (Weak). Maturity is about how well the project explains and looks after itself, which decides whether a new developer, or a new supplier, can take over. Because the weakest lens counts most in the score, work on Maturity also moves the score most.
Based on: the rebuild estimate · the Maturity grade · how much each lens counts
What to do: Start with the Maturity actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 11 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
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.
51 modules, with 3 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 11 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.
ElixirLS.LanguageServer.Plugins uses ElixirLS.LanguageServer, so a change to ElixirLS.LanguageServer can break ElixirLS.LanguageServer.Plugins, while a change to ElixirLS.LanguageServer.Plugins can't break ElixirLS.LanguageServer.
Position
Below the diagonal: ElixirLS.LanguageServer.Plugins uses a module listed above it, which is the healthy direction.
ElixirLS.LanguageServer.Plugins uses ElixirLS.LanguageServer.Providers.Completion, so a change to ElixirLS.LanguageServer.Providers.Completion can break ElixirLS.LanguageServer.Plugins, while a change to ElixirLS.LanguageServer.Plugins can't break ElixirLS.LanguageServer.Providers.Completion.
Position
Below the diagonal: ElixirLS.LanguageServer.Plugins uses a module listed above it, which is the healthy direction.
ElixirLS.LanguageServer.Providers.ExecuteCommand uses ElixirLS.LanguageServer.Providers, so a change to ElixirLS.LanguageServer.Providers can break ElixirLS.LanguageServer.Providers.ExecuteCommand, while a change to ElixirLS.LanguageServer.Providers.ExecuteCommand can't break ElixirLS.LanguageServer.Providers.
Position
Below the diagonal: ElixirLS.LanguageServer.Providers.ExecuteCommand uses a module listed above it, which is the healthy direction.
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
34
High / Critical
A03:2025 — Software Supply Chain Failures
8
Medium
A02:2025 — Security Misconfiguration
4
High / Critical
Roadmap
Top priorities: Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED; 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; Resolve the 1 Off-boarding risk finding(s) in Bus Factor.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED.
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.
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `apps/language_server/lib/language_server/json_rpc.ex:179` (:crypto.hash(:sha, …)), `apps/language_server/lib/language_server/server.ex:2636` (:crypto.hash(:md5, …)). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Give Benchee a `memory_time:` (e.g. `memory_time: 2`) so each job's memory usage is measured beside its run time and allocation regressions are visible.
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 — 35
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 — 239
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 — 27
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 31
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 36 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 36 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, 289 of 301 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.exs, .ex) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.exs, .ex) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D14 License Compliance — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (an Elixir mix.exs/mix.lock (Hex)), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. A language sidecar this run needed FAILED, so the code model the non-MSBuild public-API collector reads was never built — this is a DEGRADED run, not a settled gap, and the surface may well be collectable on a re-run: The Erlang sidecar exited 0 and produced a model, but its own source census reports it opened ZERO Erlang files — while the engine's presence probe found Erlang source in this tree. The model is therefore empty for a reason on OUR side, not the repository's, and Erlang is recorded as unread rather than as clean.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). the image ran but published no HTTP port — nothing to crawl (EXPOSE the web port to unlock runtime evidence).
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Elixir is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Elixir 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.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
P8 Schema migrations — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads EF Core usage in C# and the schema tooling its file scan recognises only, and no .NET project was loaded, and this repository's language is not one the scan models, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X14 Bypassable address classification — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, Rust, Swift, Ruby, Dart, PHP, Python and Go source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, Rust, Swift, Ruby, Dart, PHP, Python or Go was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X15 Unvalidated length from an untrusted reader — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust and Dart source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust or Dart was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X23 Unguarded diagnostic materialisation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's Elixir is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and PHP, Java, Kotlin, Python, Ruby, Scala, Dart, Swift, Erlang, Go and JavaScript/TypeScript source only, and no C# was loaded and no PHP, Java, Kotlin, Python, Ruby, Scala, Dart, Swift, Erlang, Go, JavaScript or TypeScript was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X30 Support guard that admits what it rejects — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala, JavaScript/TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart and Ruby source only, and no C# was loaded and no Scala, JavaScript, TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart or Ruby was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X7 Silent fallback defaults — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C#, Python, TypeScript/JavaScript, Rust, Go, Java, Kotlin, Scala, PHP, Ruby, Swift and Dart syntax only, and no C#, Python, TypeScript/JavaScript, Rust, Go, Java, Kotlin, Scala, PHP, Ruby, Swift or Dart was loaded for this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret 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").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, 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.
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.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
15 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was CompletionEngine.do_expand at 38. A further 1 function(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 Completion.completion_kind_gen_lsp at 26 — they are counted neither in the figure above nor in this dimension's score.
+ 10 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 30 down to 30 or less in Cyclomatic Complexity — start with CompletionEngine.do_expand (cyclomatic 38). — Refactoring it lifts Cyclomatic Complexity from 7.8 to about 8.1/10.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 30 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 7 bodies over 30 down to 30 or less in Cognitive Complexity — start with CompletionEngine.get_module_funs (cognitive 58), Locator.find (cognitive 52), RequestHandler.format_environment_result (cognitive 49). — 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 7 together lifts Cognitive Complexity from 6.6 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.4 / 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.
Resolve the 11 FileTooLong finding(s) in God Classes — start with server.ex (2), completion_engine.ex, completion.ex. — One of this dimension's main actionable groups (11 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
52 duplicated block group(s) detected. A further 37 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 65 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with build.ex, location.ex, locator.ex. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 Edited copy of a member (22 corresponding lines) finding(s) in Code Duplication — start with inlay_hints.ex, server.ex, llm_module_dependencies.ex. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 3 Edited copy of a member (12 corresponding lines) finding(s) in Code Duplication — start with server.ex (2), llm_module_dependencies.ex. — One of this dimension's main actionable groups (3 warning-level).
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 (OTP), 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: elixir_ls_utils
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).
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.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
0 outdated, 0 retired direct Hex dependencies, 0 pinning defect(s). 1 of 8 direct dependencies were graded against hex.pm (0 not published there, 7 not resolved by a committed lockfile). Whether any of these packages is UNMAINTAINED is not graded — hex.pm publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: a Hex app name does not determine the modules it provides (`ecto_sql` provides Ecto.Adapters.SQL), and a large idiomatic class of BEAM dependencies — runtime adapters, codec plugins, protocol implementations and OTP applications the release starts — is correctly declared and never referenced in source, so absence of a reference is not evidence of an unused dependency. Known CVEs in this dependency graph are D30's question, read from mix.lock there.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: 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.
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.
53 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is apps/debug_adapter/lib/debug_adapter/server.ex. Counted over 93 of the 151 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
What to do
Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
75 deducted task-comment markers across 33298 LoC (0.2/KLoC) → score 9.6. 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.
Resolve the 71 TodoComment finding(s) in Explicit Debt — start with server.ex (7), location.ex (6), workspace_symbols.ex (6). — One of this dimension's main actionable groups (71 warning-level).
Resolve the 4 FixmeComment finding(s) in Explicit Debt — start with contract_translator.ex (4). — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 14 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
1 of 4 build units (Mix) 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: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
14 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret 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.
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).
34 finding(s): 0 critical, 34 high, 0 medium, 0 low. 30 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 30 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (30 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
6 of 93 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is apps/language_server/lib/language_server/providers/execute_command/manipulate_pipes.ex. Counted over 93 of the 151 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 4 Change coupling finding(s) in Change Coupling — start with output.ex, application.ex, test.ex. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with locator.ex. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
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 — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether 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.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
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.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
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.
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Most of the production code is in directories of its own, but 2 application file(s) sit at the repository root beside the build and tooling files (`dep_versions.exs`, `mix.exs`).
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · 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.
A Elixir Benchee/Benchfella suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured. — apps/language_server/benchmarks/document_backing_store_bench.exs
What to do
Give Benchee a `memory_time:` (e.g. `memory_time: 2`) so each job's memory usage is measured beside its run time and allocation regressions are visible.
Other · Security — Read from this repository's Elixir source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository serves no HTTP of its own — no Phoenix, Plug, Cowboy, Bandit or Thousand Island among its `mix.exs` dependencies outside a test- or dev-only scope, and no endpoint or server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`:crypto.hash(:sha256, data)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×2) — apps/language_server/lib/language_server/json_rpc.ex:179, apps/language_server/lib/language_server/server.ex:2636
What to do
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `apps/language_server/lib/language_server/json_rpc.ex:179` (:crypto.hash(:sha, …)), `apps/language_server/lib/language_server/server.ex:2636` (:crypto.hash(:md5, …)). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Do you agree with this assessment?
Reference — by lens
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 — 1 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.
X10 Duplicated predicate — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 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.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 78 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.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: the BEAM has no dependency-injection container — state lives in processes, and no process is handed an instance whose lifetime another one scopes.
AX2 Stateful singletons — Not applicable: Elixir processes share no mutable memory — state lives in a process's own mailbox — so there is no shared object to race on.
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 — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the image ran but published no HTTP port — nothing to crawl (EXPOSE the web port to unlock runtime evidence) 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 — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in an Ecto schema, an Ecto migration or an Ash resource — and no database or data-store client (an Ecto repo, Postgrex, MyXQL, Exqlite, Mongo, Mnesia, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no Phoenix.Endpoint, Plug.Cowboy or Bandit child). Access control is therefore N/A here — a library or OTP application is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in an Ecto schema, an Ecto migration or an Ash resource — and no database or data-store client (Ecto, Postgrex, MyXQL, Mongo, EventStore, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in an Ecto schema, an Ecto migration or an Ash resource — and no database or data-store client (an Ecto repo, Postgrex, MyXQL, Exqlite, Mongo, Mnesia, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in an Ecto schema, an Ecto migration or an Ash resource — and no database or data-store client (an Ecto repo, Postgrex, MyXQL, Exqlite, Mongo, Mnesia, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~44922 lines of test source are present (.exs, .ex) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — no .exs test runner
D14 License Compliance — Package manifest not parsed for licence data — analyzer language-coverage gap
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Elixir not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .ex, .exs, 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
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (4 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows only 1 of the 3 signals this lens looks for (4 Elixir aggregate(s) emitting domain events (%Event{} from execute/2))
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
M4 Documentation accuracy — Not applicable: the 14 current-state document(s) make no claim of a kind M4 checks. 8 claim(s) of kinds M4 does not check were not checked (path 1, command argument 1, environment variable 6); M4 checks only links and versions and artefact counts.
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P2 Observability — This repository's Elixir source (5 module(s), 148 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Elixir source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — 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
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: Elixir has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X12 Unreachable branch — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X13 Undrained process stream — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X14 Bypassable address classification — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X15 Unvalidated length from an untrusted reader — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X19 Unrestored process-global state — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — Not applicable: this check looks for a pattern guard or `case` label that increments, decrements or assigns while the switch is deciding whether it matches, and in this repository's languages none can. An Elixir guard admits only guard-safe expressions — the compiler rejects anything else — and a bound value is never mutated in place. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — Not applicable: this check looks for a method whose returned value contradicts the flag its `finally` reads to decide whether to give back a lock it took, and in this repository's languages the body cannot set a flag that its cleanup reads. Elixir does not carry it across: a variable rebound inside `try do` is a new binding its `after` never sees, so the body cannot record a handoff where the cleanup can read it. Not a gap in the analyzer and not a finding about your code.
X23 Unguarded diagnostic materialisation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X25 Inert configuration knob — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Elixir processes share no heap: a value sent to another process arrives as a copy, so no collection is reachable from two processes at once. 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
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X30 Support guard that admits what it rejects — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — Not applicable: this check asks whether the null-typed discipline a language offers is switched on, and how much of that the assertion operator takes back, and in this repository's languages there is no such switch and no such operator. Elixir's `nil` is an atom in a dynamically typed language: `@spec`s are checked by an external analysis that has no nullability operator, so there is no null-typed discipline in the language to adopt. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
TodoComment apps/language_server/test/location_test.exs:14— # TODO make this work and expose via config — 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 apps/language_server/test/support/example_behaviour.ex:76— # TODO: Remove this on Elixir v2.0 — 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 apps/language_server/test/providers/hover_test.exs:209— # TODO hexdocs and standard lib docs — 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 apps/language_server/test/providers/signature_help/signature_test.exs:702— # TODO https://github.com/elixir-lsp/elixir_sense/issues/255
TodoComment apps/language_server/test/providers/signature_help/signature_test.exs:715— # TODO https://github.com/elixir-lsp/elixir_sense/issues/255
TodoComment apps/language_server/test/providers/references/locator_test.exs:271— # TODO attributes not supported yet — 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 apps/language_server/test/providers/plugins/ecto_test.exs:141— # TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment apps/language_server/test/providers/plugins/ecto_test.exs:356— # TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment apps/language_server/test/providers/definition/locator_test.exs:1382— # TODO: is this still a bug? — 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 apps/language_server/test/providers/completion/suggestions_test.exs:4841— # TODO change that to only output max arity — 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 apps/language_server/test/providers/code_action/replace_remote_function_test.exs:74— # TODO: Fix this — 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 apps/language_server/test/providers/code_action/replace_remote_function_test.exs:165— # TODO: Fix this — 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 apps/language_server/test/providers/code_action/replace_remote_function_test.exs:329— # TODO: Fix this — 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 apps/language_server/test/providers/code_action/replace_with_underscore_test.exs:146— # TODO: Fix this — 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 apps/language_server/test/providers/code_action/replace_with_underscore_test.exs:174— # TODO: fix — 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 apps/language_server/lib/language_server/diagnostics.ex:516— # TODO colum >= 0 PR — 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 apps/language_server/lib/language_server/erlang_source_file.ex:27— # TODO use arity? — 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 apps/language_server/lib/language_server/location.ex:131— # TODO check if this is still the case on OTP 27+ — 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 apps/language_server/lib/language_server/location.ex:170— # TODO remove — 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 apps/language_server/lib/language_server/location.ex:208— # TODO remove — 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 apps/language_server/lib/language_server/location.ex:437— # TODO remove — 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 apps/language_server/lib/language_server/location.ex:310— # TODO move to Metadata — 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 apps/language_server/lib/language_server/location.ex:347— # TODO move to Metadata — 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 apps/language_server/lib/language_server/markdown_utils.ex:275— # TODO not sure how the docs will handle versions app/vsn does not work as of June 2024 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment apps/language_server/lib/language_server/markdown_utils.ex:296— # TODO not sure how the docs will handle versions app/vsn does not work as of June 2024 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FileTooLong: debug_adapter/server.ex apps/debug_adapter/lib/debug_adapter/server.ex— FileTooLong — 2533 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 80 functions. The bar is 500 significant lines; this is 2033 over it, 5.07× 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: language_server/server.ex apps/language_server/lib/language_server/server.ex— FileTooLong — 2209 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 50 functions. The bar is 500 significant lines; this is 1709 over it, 4.42× 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: lib/completion_engine.ex apps/elixir_ls_utils/lib/completion_engine.ex— FileTooLong — 1678 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 76 functions. The bar is 500 significant lines; this is 1178 over it, 3.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: providers/completion.ex apps/language_server/lib/language_server/providers/completion.ex— FileTooLong — 1413 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 38 functions. The bar is 500 significant lines; this is 913 over it, 2.83× 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: mcp/request_handler.ex apps/language_server/lib/language_server/mcp/request_handler.ex— FileTooLong — 894 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 394 over it, 1.79× 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: mix_tasks/format.ex apps/language_server/lib/language_server/mix_tasks/format.ex— FileTooLong — 677 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 177 over it, 1.35× 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: hover/docs.ex apps/language_server/lib/language_server/providers/hover/docs.ex— FileTooLong — 633 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 133 over it, 1.27× 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: language_server/build.ex apps/language_server/lib/language_server/build.ex— FileTooLong — 598 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 31 functions. The bar is 500 significant lines; this is 98 over it, 1.20× 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: providers/inlay_hints.ex apps/language_server/lib/language_server/providers/inlay_hints.ex— FileTooLong — 533 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 47 functions. The bar is 500 significant lines; this is 33 over it, 1.07× 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: execute_command/llm_docs_aggregator.ex apps/language_server/lib/language_server/providers/execute_command/llm_docs_aggregator.ex— FileTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 24 over it, 1.05× 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: providers/workspace_symbols.ex apps/language_server/lib/language_server/providers/workspace_symbols.ex— FileTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3 over it, 1.01× 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.
FixmeComment apps/language_server/lib/language_server/providers/code_lens/type_spec/contract_translator.ex:9— # FIXME: Private module — 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.
FixmeComment apps/language_server/lib/language_server/providers/code_lens/type_spec/contract_translator.ex:12— # FIXME: Private module — 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.
FixmeComment apps/language_server/lib/language_server/providers/code_lens/type_spec/contract_translator.ex:16— # FIXME: Private module — 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.
FixmeComment apps/language_server/lib/language_server/providers/code_lens/type_spec/contract_translator.ex:19— # FIXME: Private module — 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.
Change coupling: output.ex ↔ server.ex apps/debug_adapter/lib/debug_adapter/output.ex:1— `apps/debug_adapter/lib/debug_adapter/output.ex` and `apps/debug_adapter/lib/debug_adapter/server.ex` change together 62% of the time (10 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `adfc80ac` Introduce error dictionary and codes; `0066c907` move legacy macros to test; `b81b12ac` improvements to telemetry (at that commit the files were still `apps/elixir_ls_debugger/lib/debugger/output.ex` and `apps/elixir_ls_debugger/lib/debugger/server.ex`) — run `git show` on any of them.
Change coupling: application.ex ↔ server.ex apps/debug_adapter/lib/debug_adapter/application.ex:1— `apps/debug_adapter/lib/debug_adapter/application.ex` and `apps/debug_adapter/lib/debug_adapter/server.ex` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `874a226c` move processes to app supervisor (at that commit the files were still `apps/elixir_ls_debugger/lib/debugger.ex` and `apps/elixir_ls_debugger/lib/debugger/server.ex`); `28de664f` Dbg backend for debugger (#974) (at that commit the files were still `apps/elixir_ls_debugger/lib/debugger.ex` and `apps/elixir_ls_debugger/lib/debugger/server.ex`); `28c4f28f` improvements to shutdown code (at that commit the files were still `apps/elixir_ls_debugger/lib/debugger.ex` and `apps/elixir_ls_debugger/lib/debugger/server.ex`) — run `git show` on any of them.
Change coupling: test.ex ↔ server.ex apps/language_server/lib/language_server/providers/code_lens/test.ex:1— `apps/language_server/lib/language_server/providers/code_lens/test.ex` and `apps/language_server/lib/language_server/server.ex` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `a1147df0` use parser contest in test code lens; `8c359473` Elixir 1.16 support (#1032); `d77087af` Moved SourceFile path operations to SourceFile.Path module (#739) — run `git show` on any of them.
Change coupling: helpers.ex ↔ server.ex apps/language_server/lib/language_server/providers/code_action/helpers.ex:1— `apps/language_server/lib/language_server/providers/code_action/helpers.ex` and `apps/language_server/lib/language_server/server.ex` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `9cd798ac` 1.19 fixes; `e5f158b8` fix warnings; `a060c7b0` step 8 — run `git show` on any of them.
Duplicated block (11 lines × 2) apps/language_server/lib/language_server/build.ex:433— apps/language_server/lib/language_server/build.ex:433-443 | apps/language_server/lib/language_server/build.ex:504-514 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `apps/language_server/lib/language_server/build.ex:502` calls `absname`, `config` and `apps/language_server/lib/language_server/build.ex:431` 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 (11 lines × 2) apps/language_server/lib/language_server/location.ex:297— apps/language_server/lib/language_server/location.ex:297-307 | apps/language_server/lib/language_server/location.ex:473-483 — 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 `apps/language_server/lib/language_server/location.ex:297` 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) apps/language_server/lib/language_server/providers/references/locator.ex:366— apps/language_server/lib/language_server/providers/references/locator.ex:366-376 | apps/language_server/lib/language_server/providers/references/locator.ex:416-426 — 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 `apps/language_server/lib/language_server/providers/references/locator.ex:366` 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) apps/language_server/lib/language_server/providers/execute_command/llm_docs_aggregator.ex:695— apps/language_server/lib/language_server/providers/execute_command/llm_docs_aggregator.ex:695-705 | apps/language_server/lib/language_server/providers/execute_command/llm_type_info.ex:298-308 — 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.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×3
Edited copy of a member (22 corresponding lines) apps/language_server/lib/language_server/providers/inlay_hints.ex:387— apps/language_server/lib/language_server/providers/inlay_hints.ex:387-416 | apps/language_server/lib/language_server/providers/inlay_hints.ex:423-444 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) apps/language_server/lib/language_server/server.ex:1374— apps/language_server/lib/language_server/server.ex:1374-1395 | apps/language_server/lib/language_server/server.ex:1416-1437 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:58— apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:58-79 | apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:84-107 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:507— apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:507-518 | apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:544-555 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) apps/language_server/lib/language_server/server.ex:1643— apps/language_server/lib/language_server/server.ex:1643-1654 | apps/language_server/lib/language_server/server.ex:1740-1752 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) apps/debug_adapter/lib/debug_adapter/server.ex:1740— apps/debug_adapter/lib/debug_adapter/server.ex:1740-1751 | apps/debug_adapter/lib/debug_adapter/server.ex:1761-1772 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (10 lines × 2) apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:182— apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:182-193 | apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:206-215 — 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 `apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:182` 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) apps/language_server/lib/language_server/providers/hover/docs.ex:369— apps/language_server/lib/language_server/providers/hover/docs.ex:369-378 | apps/language_server/lib/language_server/providers/signature_help/signature.ex:117-126 — 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 `apps/language_server/lib/language_server/providers/hover/docs.ex:369` 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) apps/debug_adapter/lib/debug_adapter/utils.ex:56— apps/debug_adapter/lib/debug_adapter/utils.ex:56-65 | apps/language_server/lib/language_server/source_file.ex:381-390 — 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) apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:83— apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:83-90 | apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:94-101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:94— apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:94-101 | apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:105-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) apps/language_server/lib/language_server/providers/completion/reducers/returns.ex:50— apps/language_server/lib/language_server/providers/completion/reducers/returns.ex:50-57 | apps/language_server/lib/language_server/providers/completion/reducers/returns.ex:69-76 — 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 `apps/language_server/lib/language_server/providers/completion/reducers/returns.ex:50` 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) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) apps/language_server/lib/language_server/build.ex:536— apps/language_server/lib/language_server/build.ex:536-608 | apps/language_server/lib/language_server/dialyzer_incremental.ex:43-66 | apps/language_server/lib/language_server/providers/completion/generic_reducer.ex:36-103 | apps/language_server/lib/language_server/source_file.ex:244-302 — 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) apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:112— apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:112-188 | apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:193-277 | apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:282-377 | apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:382-479 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) apps/language_server/lib/language_server/range_utils.ex:77— apps/language_server/lib/language_server/range_utils.ex:77-93 | apps/language_server/lib/language_server/range_utils.ex:100-120 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) apps/language_server/lib/language_server/providers/call_hierarchy.ex:46— apps/language_server/lib/language_server/providers/call_hierarchy.ex:46-62 | apps/language_server/lib/language_server/providers/call_hierarchy.ex:75-91 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (2 corresponding lines) · ×2
Edited copy of a member (2 corresponding lines) apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:395— apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:395-396 | apps/language_server/lib/language_server/ex_unit_test_tracer.ex:170-171 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (2 corresponding lines) apps/language_server/lib/language_server/providers/selection_ranges.ex:340— apps/language_server/lib/language_server/providers/selection_ranges.ex:340-341 | apps/language_server/lib/language_server/range_utils.ex:32-33 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (24 lines × 2) apps/language_server/lib/language_server/providers/completion/generic_reducer.ex:50— apps/language_server/lib/language_server/providers/completion/generic_reducer.ex:50-73 | apps/language_server/lib/language_server/providers/completion/generic_reducer.ex:79-102 — 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 `apps/language_server/lib/language_server/providers/completion/generic_reducer.ex:50` 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) apps/language_server/lib/language_server/providers/declaration/locator.ex:240— apps/language_server/lib/language_server/providers/declaration/locator.ex:240-263 | apps/language_server/lib/language_server/providers/definition/locator.ex:376-399 — `apps/language_server/lib/language_server/providers/declaration/locator.ex` and `apps/language_server/lib/language_server/providers/definition/locator.ex` 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 51 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 (19–20 lines × 3) apps/language_server/lib/language_server/build.ex:545— apps/language_server/lib/language_server/build.ex:545-563 | apps/language_server/lib/language_server/build.ex:573-591 | apps/language_server/lib/language_server/source_file.ex:280-299 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `apps/language_server/lib/language_server/build.ex:545` 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–20 lines × 3) apps/language_server/lib/language_server/dialyzer_incremental.ex:45— apps/language_server/lib/language_server/dialyzer_incremental.ex:45-64 | apps/language_server/lib/language_server/providers/completion/generic_reducer.ex:50-68 | apps/language_server/lib/language_server/providers/completion/generic_reducer.ex:79-97 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `apps/language_server/lib/language_server/dialyzer_incremental.ex:45` 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) apps/language_server/lib/language_server/providers/completion.ex:386— apps/language_server/lib/language_server/providers/completion.ex:386-401 | apps/language_server/lib/language_server/providers/completion.ex:410-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.
Duplicated block (16 lines × 2) apps/language_server/lib/language_server/providers/document_symbols.ex:247— apps/language_server/lib/language_server/providers/document_symbols.ex:247-262 | apps/language_server/lib/language_server/providers/document_symbols.ex: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.
Duplicated block (14 lines × 2) apps/language_server/lib/language_server/providers/call_hierarchy.ex:141— apps/language_server/lib/language_server/providers/call_hierarchy.ex:141-154 | apps/language_server/lib/language_server/providers/call_hierarchy.ex:168-181 — 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 (14 lines × 2) apps/language_server/lib/language_server/providers/execute_command/manipulate_pipes.ex:93— apps/language_server/lib/language_server/providers/execute_command/manipulate_pipes.ex:93-106 | apps/language_server/lib/language_server/providers/execute_command/manipulate_pipes.ex:137-150 — 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 `apps/language_server/lib/language_server/providers/execute_command/manipulate_pipes.ex:93` 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) apps/language_server/lib/language_server/providers/completion/reducers/returns.ex:39— apps/language_server/lib/language_server/providers/completion/reducers/returns.ex:39-45 | apps/language_server/lib/language_server/providers/completion/reducers/returns.ex:56-62 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) apps/language_server/lib/language_server/providers/code_action/replace_remote_function.ex:167— apps/language_server/lib/language_server/providers/code_action/replace_remote_function.ex:167-173 | apps/language_server/lib/language_server/providers/code_action/replace_with_underscore.ex:71-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Weak hash algorithm apps/language_server/lib/language_server/json_rpc.ex:179— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`:crypto.hash(:sha256, data)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm apps/language_server/lib/language_server/server.ex:2636— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`:crypto.hash(:sha256, data)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
CompletionEngine.do_expand (cyclomatic 38) apps/elixir_ls_utils/lib/completion_engine.ex:193— CompletionEngine.do_expand has cyclomatic complexity 38 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
RequestHandler.format_environment_result (cyclomatic 27) apps/language_server/lib/language_server/mcp/request_handler.ex:1032— RequestHandler.format_environment_result has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CompletionEngine.get_module_funs (cyclomatic 25) apps/elixir_ls_utils/lib/completion_engine.ex:1813— CompletionEngine.get_module_funs has cyclomatic complexity 25 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
Locator.find (cyclomatic 25) apps/language_server/lib/language_server/providers/references/locator.ex:76— Locator.find 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.
SelectionRanges.ast_node_ranges (cyclomatic 23) apps/language_server/lib/language_server/providers/selection_ranges.ex:424— SelectionRanges.ast_node_ranges has cyclomatic complexity 23 (threshold 15). 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.
Server.launch (cyclomatic 22) apps/debug_adapter/lib/debug_adapter/server.ex:2152— Server.launch has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Completion.completion (cyclomatic 22) apps/language_server/lib/language_server/providers/completion.ex:125— Completion.completion 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. This is NOT this file's highest cyclomatic complexity: Completion.completion_kind_gen_lsp (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
LlmDocsAggregator.aggregate_module_docs (cyclomatic 21) apps/language_server/lib/language_server/providers/execute_command/llm_docs_aggregator.ex:196— LlmDocsAggregator.aggregate_module_docs 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.
RequestHandler.format_single_doc_result (cyclomatic 18) apps/language_server/lib/language_server/mcp/request_handler.ex:602— RequestHandler.format_single_doc_result 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.
Callbacks.add_callbacks (cyclomatic 18) apps/language_server/lib/language_server/providers/completion/reducers/callbacks.ex:30— Callbacks.add_callbacks 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.
RequestHandler.format_dependency_section (cyclomatic 17) apps/language_server/lib/language_server/mcp/request_handler.ex:914— RequestHandler.format_dependency_section 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.
Docs.all (cyclomatic 17) apps/language_server/lib/language_server/providers/hover/docs.ex:105— Docs.all 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.
CompletionEngine.get_metadata_module_funs (cyclomatic 16) apps/elixir_ls_utils/lib/completion_engine.ex:1717— CompletionEngine.get_metadata_module_funs has cyclomatic complexity 16 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
RequestHandler.format_type_info_result (cyclomatic 16) apps/language_server/lib/language_server/mcp/request_handler.ex:691— RequestHandler.format_type_info_result 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.
Locator.find (cyclomatic 16) apps/language_server/lib/language_server/providers/definition/locator.ex:57— Locator.find 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.
CompletionEngine.get_module_funs (cognitive 58) apps/elixir_ls_utils/lib/completion_engine.ex:1813— CompletionEngine.get_module_funs has cognitive complexity 58 (threshold 15). Drivers by points: if/else 27 (45 pts), match/switch 5 (11 pts), boolean chains 2 (nesting depth added 24). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
Locator.find (cognitive 52) apps/language_server/lib/language_server/providers/references/locator.ex:76— Locator.find has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (26 pts), match/switch 9 (23 pts), boolean chains 3 (nesting depth added 27). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RequestHandler.format_environment_result (cognitive 49) apps/language_server/lib/language_server/mcp/request_handler.ex:1032— RequestHandler.format_environment_result has cognitive complexity 49 (threshold 15). Drivers by points: if/else 32 (39 pts), boolean chains 10 (nesting depth added 7). 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.
Docs.all (cognitive 40) apps/language_server/lib/language_server/providers/hover/docs.ex:105— Docs.all has cognitive complexity 40 (threshold 15). Drivers by points: match/switch 7 (21 pts), if/else 8 (18 pts), boolean chains 1 (nesting depth added 24). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LlmDocsAggregator.aggregate_module_docs (cognitive 38) apps/language_server/lib/language_server/providers/execute_command/llm_docs_aggregator.ex:196— LlmDocsAggregator.aggregate_module_docs has cognitive complexity 38 (threshold 15). Drivers by points: if/else 25, match/switch 10, error handling 1 (2 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Locator.find (cognitive 37) apps/language_server/lib/language_server/providers/definition/locator.ex:57— Locator.find has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 6 (18 pts) (nesting depth added 23). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Completion.completion (cognitive 33) apps/language_server/lib/language_server/providers/completion.ex:125— Completion.completion has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (22 pts), match/switch 4 (6 pts), error handling 3, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.launch (cognitive 29) apps/debug_adapter/lib/debug_adapter/server.ex:2152— Server.launch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 7, match/switch 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Callbacks.add_callbacks (cognitive 29) apps/language_server/lib/language_server/providers/completion/reducers/callbacks.ex:30— Callbacks.add_callbacks has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 9, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompletionEngine.get_metadata_module_funs (cognitive 28) apps/elixir_ls_utils/lib/completion_engine.ex:1717— CompletionEngine.get_metadata_module_funs has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 6 (8 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 11). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
SelectionRanges.ast_node_ranges (cognitive 27) apps/language_server/lib/language_server/providers/selection_ranges.ex:424— SelectionRanges.ast_node_ranges has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 15, if/else 8 (10 pts), match/switch 2 (nesting depth added 2). 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.
RequestHandler.format_type_info_result (cognitive 26) apps/language_server/lib/language_server/mcp/request_handler.ex:691— RequestHandler.format_type_info_result has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 7 (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.
Locator.find_outgoing_calls_in_metadata (cognitive 26) apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:487— Locator.find_outgoing_calls_in_metadata has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, match/switch 1 (4 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.
Signature.find_function_signatures (cognitive 26) apps/language_server/lib/language_server/providers/signature_help/signature.ex:94— Signature.find_function_signatures has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 6 (11 pts), boolean chains 1 (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RequestHandler.format_single_doc_result (cognitive 25) apps/language_server/lib/language_server/mcp/request_handler.ex:602— RequestHandler.format_single_doc_result has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 5, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LlmDocsAggregator.get_documentation (cognitive 25) apps/language_server/lib/language_server/providers/execute_command/llm_docs_aggregator.ex:72— LlmDocsAggregator.get_documentation has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 5 (13 pts), if/else 7 (9 pts), boolean chains 3 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
CompletionEngine.do_expand (cognitive 24) apps/elixir_ls_utils/lib/completion_engine.ex:193— CompletionEngine.do_expand has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 3 (6 pts) (nesting depth added 8). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
RequestHandler.format_dependency_section (cognitive 24) apps/language_server/lib/language_server/mcp/request_handler.ex:914— RequestHandler.format_dependency_section has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, boolean chains 8. 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.
Server.set_project_dir (cognitive 24) apps/language_server/lib/language_server/server.ex:2787— Server.set_project_dir has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (21 pts), match/switch 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.
MarkdownUtils.transform_ex_doc_link (cognitive 22) apps/language_server/lib/language_server/markdown_utils.ex:337— MarkdownUtils.transform_ex_doc_link has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 3 (5 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.
Completion.item_to_gen_lsp (cognitive 22) apps/language_server/lib/language_server/providers/completion.ex:1637— Completion.item_to_gen_lsp has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20 (22 pts) (nesting depth added 2). 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.
Server.set_settings (cognitive 22) apps/language_server/lib/language_server/server.ex:2370— Server.set_settings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server.trigger_build (cognitive 21) apps/language_server/lib/language_server/server.ex:2012— Server.trigger_build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Server.attach (cognitive 20) apps/debug_adapter/lib/debug_adapter/server.ex:2359— Server.attach has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, match/switch 1 (2 pts), error handling 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.
Record.get_field_types (cognitive 19) apps/language_server/lib/language_server/providers/completion/reducers/record.ex:139— Record.get_field_types has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectionRanges.container_ranges (cognitive 19) apps/language_server/lib/language_server/providers/selection_ranges.ex:215— SelectionRanges.container_ranges has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, match/switch 2 (5 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WorkspaceSymbols.index (cognitive 19) apps/language_server/lib/language_server/providers/workspace_symbols.ex:355— WorkspaceSymbols.index has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (16 pts), match/switch 3 (nesting depth added 2). 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.
Server.handle_request_packet (cognitive 19) apps/language_server/lib/language_server/server.ex:1005— Server.handle_request_packet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 3 (5 pts), match/switch 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.
MarkdownUtils.transform_ex_doc_links (cognitive 18) apps/language_server/lib/language_server/markdown_utils.ex:172— MarkdownUtils.transform_ex_doc_links has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DocumentSymbols.extract_symbol (cognitive 18) apps/language_server/lib/language_server/providers/document_symbols.ex:88— DocumentSymbols.extract_symbol has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 6 (7 pts), boolean chains 2 (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Location.find_elixir_file (cognitive 17) apps/language_server/lib/language_server/location.ex:74— Location.find_elixir_file has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (5 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.
LlmImplementationFinder.read_source_at_location (cognitive 17) apps/language_server/lib/language_server/providers/execute_command/llm_implementation_finder.ex:152— LlmImplementationFinder.read_source_at_location has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Docs.get_all_docs (cognitive 17) apps/language_server/lib/language_server/providers/hover/docs.ex:312— Docs.get_all_docs has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 5, boolean chains 2 (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Server.handle_call (cognitive 17) apps/language_server/lib/language_server/server.ex:201— Server.handle_call has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 1 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LlmDefinition.read_definition_source (cognitive 16) apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex:188— LlmDefinition.read_definition_source has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Change coupling clique: locator.ex, docs.ex, locator.ex apps/language_server/lib/language_server/providers/definition/locator.ex— 3 files — `apps/language_server/lib/language_server/providers/definition/locator.ex`, `apps/language_server/lib/language_server/providers/hover/docs.ex`, `apps/language_server/lib/language_server/providers/references/locator.ex` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) apps/language_server/lib/language_server/dialyzer_incremental.ex:78— apps/language_server/lib/language_server/dialyzer_incremental.ex:78-108 | apps/language_server/lib/language_server/ex_unit_test_tracer.ex:43-69 | apps/language_server/lib/language_server/mix_project_cache.ex:147-173 | apps/language_server/lib/language_server/parser.ex:78-104 | apps/language_server/lib/language_server/providers/workspace_symbols.ex:94-120 | apps/language_server/lib/language_server/tracer.ex:109-145 — These 6 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 6 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 6 times.
D4 · Code Duplication· Edited copy of a member (100 corresponding lines) · ×1
Edited copy of a member (100 corresponding lines) apps/language_server/lib/language_server/providers/definition/locator.ex:65— apps/language_server/lib/language_server/providers/definition/locator.ex:65-197 | apps/language_server/lib/language_server/providers/hover/docs.ex:112-211 — These two members are one piece of code written twice and then edited apart: 100 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (69 corresponding lines) · ×1
Edited copy of a member (69 corresponding lines) apps/debug_adapter/lib/debug_adapter/server.ex:925— apps/debug_adapter/lib/debug_adapter/server.ex:925-1001 | apps/debug_adapter/lib/debug_adapter/server.ex:1005-1073 — These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/manipulate_pipes.ex:73— apps/language_server/lib/language_server/providers/execute_command/manipulate_pipes.ex:73-116 | apps/language_server/lib/language_server/providers/execute_command/manipulate_pipes.ex:120-160 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (59 corresponding lines) · ×1
Edited copy of a member (59 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex:195— apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex:195-262 | apps/language_server/lib/language_server/providers/execute_command/llm_implementation_finder.ex:153-211 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) apps/language_server/lib/language_server/providers/call_hierarchy.ex:139— apps/language_server/lib/language_server/providers/call_hierarchy.ex:139-162 | apps/language_server/lib/language_server/providers/call_hierarchy.ex:166-189 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) apps/language_server/lib/language_server/location.ex:253— apps/language_server/lib/language_server/location.ex:253-275 | apps/language_server/lib/language_server/location.ex:289-307 | apps/language_server/lib/language_server/location.ex:464-483 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) apps/language_server/lib/language_server/location.ex:189— apps/language_server/lib/language_server/location.ex:189-221 | apps/language_server/lib/language_server/location.ex:418-450 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 39+ corresponding lines) · ×1
Edited copies of one member (3 members, 39+ corresponding lines) apps/language_server/lib/language_server/server.ex:2644— apps/language_server/lib/language_server/server.ex:2644-2689 | apps/language_server/lib/language_server/server.ex:2699-2737 | apps/language_server/lib/language_server/server.ex:2746-2784 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 39 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) apps/language_server/lib/language_server/diagnostics.ex:270— apps/language_server/lib/language_server/diagnostics.ex:270-303 | apps/language_server/lib/language_server/diagnostics.ex:307-337 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/llm_implementation_finder.ex:19— apps/language_server/lib/language_server/providers/execute_command/llm_implementation_finder.ex:19-43 | apps/language_server/lib/language_server/providers/execute_command/llm_type_info.ex:29-44 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×1
Edited copies of one member (3 members, 13+ corresponding lines) apps/language_server/lib/language_server/providers/declaration/locator.ex:30— apps/language_server/lib/language_server/providers/declaration/locator.ex:30-42 | apps/language_server/lib/language_server/providers/definition/locator.ex:29-46 | apps/language_server/lib/language_server/providers/references/locator.ex:24-54 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) apps/language_server/lib/language_server/mcp/request_handler.ex:433— apps/language_server/lib/language_server/mcp/request_handler.ex:433-459 | apps/language_server/lib/language_server/mcp/request_handler.ex:463-489 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) apps/elixir_ls_utils/lib/completion_engine.ex:1100— apps/elixir_ls_utils/lib/completion_engine.ex:1100-1117 | apps/elixir_ls_utils/lib/completion_engine.ex:1190-1207 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:522— apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:522-540 | apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:559-577 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×1
Edited copies of one member (3 members, 15+ corresponding lines) apps/debug_adapter/lib/debug_adapter/thread_registry.ex:29— apps/debug_adapter/lib/debug_adapter/thread_registry.ex:29-43 | apps/debug_adapter/lib/debug_adapter/variable_registry.ex:28-42 | apps/debug_adapter/lib/debug_adapter/variable_registry.ex:50-64 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex:66— apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex:66-80 | apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex:86-100 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 9+ corresponding lines) · ×1
Edited copies of one member (7 members, 9+ corresponding lines) apps/language_server/lib/language_server/server.ex:1223— apps/language_server/lib/language_server/server.ex:1223-1231 | apps/language_server/lib/language_server/server.ex:1248-1256 | apps/language_server/lib/language_server/server.ex:1273-1281 | apps/language_server/lib/language_server/server.ex:1301-1318 | apps/language_server/lib/language_server/server.ex:1335-1353 | apps/language_server/lib/language_server/server.ex:1454-1462 | apps/language_server/lib/language_server/server.ex:1615-1624 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) apps/language_server/lib/language_server/source_file.ex:406— apps/language_server/lib/language_server/source_file.ex:406-418 | apps/language_server/lib/language_server/source_file.ex:446-460 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×1
Edited copy of a member (14 corresponding lines) apps/language_server/lib/language_server/markdown_utils.ex:269— apps/language_server/lib/language_server/markdown_utils.ex:269-288 | apps/language_server/lib/language_server/markdown_utils.ex:292-305 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×1
Edited copy of a member (5 corresponding lines) apps/debug_adapter/lib/debug_adapter/server.ex:2130— apps/debug_adapter/lib/debug_adapter/server.ex:2130-2134 | apps/debug_adapter/lib/debug_adapter/server.ex:2145-2149 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) apps/language_server/lib/language_server/mcp/request_handler.ex:371— apps/language_server/lib/language_server/mcp/request_handler.ex:371-389 | apps/language_server/lib/language_server/mcp/request_handler.ex:393-409 | apps/language_server/lib/language_server/mcp/request_handler.ex:413-429 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×1
Edited copy of a member (10 corresponding lines) apps/debug_adapter/lib/debug_adapter/utils.ex:31— apps/debug_adapter/lib/debug_adapter/utils.ex:31-40 | apps/language_server/lib/language_server/source_file.ex:356-365 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×1
Edited copy of a member (7 corresponding lines) apps/language_server/lib/language_server/providers/signature_help/signature.ex:20— apps/language_server/lib/language_server/providers/signature_help/signature.ex:20-29 | apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:241-247 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:234— apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:234-237 | apps/language_server/lib/language_server/providers/references/locator.ex:351-355 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (52 lines × 2) apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:137— apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:137-188 | apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:226-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:137` 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 (44–47 lines × 2) apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex:195— apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex:195-238 | apps/language_server/lib/language_server/providers/execute_command/llm_implementation_finder.ex:153-199 — 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 `apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex:195` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note 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 (44 lines × 2) apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:298— apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:298-341 | apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:400-443 — 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 `apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:298` 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 (32–39 lines × 3) apps/language_server/lib/language_server/server.ex:2649— apps/language_server/lib/language_server/server.ex:2649-2687 | apps/language_server/lib/language_server/server.ex:2706-2737 | apps/language_server/lib/language_server/server.ex:2753-2784 — 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 `apps/language_server/lib/language_server/server.ex:2649` 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 (35–36 lines × 2) apps/language_server/lib/language_server/server.ex:232— apps/language_server/lib/language_server/server.ex:232-267 | apps/language_server/lib/language_server/server.ex:1037-1071 — 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 (31–35 lines × 3) apps/language_server/lib/language_server/mcp/request_handler.ex:30— apps/language_server/lib/language_server/mcp/request_handler.ex:30-60 | apps/language_server/lib/language_server/mcp/request_handler.ex:67-97 | apps/language_server/lib/language_server/mcp/request_handler.ex:107-141 — 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 (29–33 lines × 2) apps/language_server/lib/language_server/mcp/request_handler.ex:202— apps/language_server/lib/language_server/mcp/request_handler.ex:202-234 | apps/language_server/lib/language_server/mcp/request_handler.ex:249-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/language_server/lib/language_server/mcp/request_handler.ex:202` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (27 lines × 2) apps/language_server/lib/language_server/build.ex:148— apps/language_server/lib/language_server/build.ex:148-174 | apps/language_server/lib/language_server/build.ex:411-437 — 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 `apps/language_server/lib/language_server/build.ex:148` 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) apps/debug_adapter/lib/debug_adapter/breakpoint_condition.ex:79— apps/debug_adapter/lib/debug_adapter/breakpoint_condition.ex:79-103 | apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:25-49 — 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 `apps/debug_adapter/lib/debug_adapter/breakpoint_condition.ex:79` 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 (18–24 lines × 3) apps/debug_adapter/lib/debug_adapter/server.ex:583— apps/debug_adapter/lib/debug_adapter/server.ex:583-600 | apps/debug_adapter/lib/debug_adapter/server.ex:3171-3194 | apps/debug_adapter/lib/debug_adapter/server.ex:3333-3350 — 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 `apps/debug_adapter/lib/debug_adapter/server.ex:583` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note 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 (20–24 lines × 2) apps/language_server/lib/language_server/providers/inlay_hints.ex:393— apps/language_server/lib/language_server/providers/inlay_hints.ex:393-416 | apps/language_server/lib/language_server/providers/inlay_hints.ex:425-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.
Duplicated block (23 lines × 3) apps/debug_adapter/lib/debug_adapter/breakpoint_condition.ex:78— apps/debug_adapter/lib/debug_adapter/breakpoint_condition.ex:78-100 | apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:24-46 | apps/debug_adapter/lib/debug_adapter/server.ex:256-278 — 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 `apps/debug_adapter/lib/debug_adapter/breakpoint_condition.ex:78` 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, `apps/debug_adapter/lib/debug_adapter/server.ex:280` calls `get`, `halt` and `apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:47` 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 (22–23 lines × 2) apps/debug_adapter/lib/debug_adapter/server.ex:2288— apps/debug_adapter/lib/debug_adapter/server.ex:2288-2309 | apps/debug_adapter/lib/debug_adapter/server.ex:2447-2469 — 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 (23 lines × 2) apps/language_server/lib/language_server/mcp/request_handler.ex:344— apps/language_server/lib/language_server/mcp/request_handler.ex:344-366 | apps/language_server/lib/language_server/mcp/request_handler.ex:437-459 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `apps/language_server/lib/language_server/mcp/request_handler.ex:435` calls `format_implementations_result` and `apps/language_server/lib/language_server/mcp/request_handler.ex:343` 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 (22 lines × 6) apps/language_server/lib/language_server/dialyzer_incremental.ex:78— apps/language_server/lib/language_server/dialyzer_incremental.ex:78-99 | apps/language_server/lib/language_server/ex_unit_test_tracer.ex:43-64 | apps/language_server/lib/language_server/mix_project_cache.ex:147-168 | apps/language_server/lib/language_server/parser.ex:78-99 | apps/language_server/lib/language_server/providers/workspace_symbols.ex:94-115 | apps/language_server/lib/language_server/tracer.ex:109-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `apps/language_server/lib/language_server/dialyzer_incremental.ex:78` 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, `apps/language_server/lib/language_server/dialyzer_incremental.ex:101` calls `info` and `apps/language_server/lib/language_server/tracer.ex:132` 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 (22 lines × 2) apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:343— apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:343-364 | apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:445-466 — 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 `apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:343` 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 (19 lines × 2) apps/language_server/lib/language_server/server.ex:943— apps/language_server/lib/language_server/server.ex:943-961 | apps/language_server/lib/language_server/server.ex:1111-1129 — 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 (18 lines × 5) apps/language_server/lib/language_server/build.ex:545— apps/language_server/lib/language_server/build.ex:545-562 | apps/language_server/lib/language_server/build.ex:573-590 | apps/language_server/lib/language_server/dialyzer_incremental.ex:45-62 | apps/language_server/lib/language_server/providers/completion/generic_reducer.ex:50-67 | apps/language_server/lib/language_server/providers/completion/generic_reducer.ex:79-96 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `apps/language_server/lib/language_server/build.ex:545` 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 (18 lines × 3) apps/language_server/lib/language_server/providers/definition/locator.ex:118— apps/language_server/lib/language_server/providers/definition/locator.ex:118-135 | apps/language_server/lib/language_server/providers/hover/docs.ex:161-178 | apps/language_server/lib/language_server/providers/references/locator.ex:212-229 — 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 (17 lines × 4) apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:120— apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:120-136 | apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:202-218 | apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:287-303 | apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:389-405 — 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 `apps/language_server/lib/language_server/providers/execute_command/llm_module_dependencies.ex:120` 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–17 lines × 2) apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:20— apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:20-30 | apps/language_server/lib/language_server/providers/references/locator.ex:28-44 — 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–14 lines × 3) apps/language_server/lib/language_server/providers/declaration/locator.ex:34— apps/language_server/lib/language_server/providers/declaration/locator.ex:34-42 | apps/language_server/lib/language_server/providers/definition/locator.ex:33-46 | apps/language_server/lib/language_server/providers/implementation/locator.ex:29-42 — `apps/language_server/lib/language_server/providers/declaration/locator.ex` and `apps/language_server/lib/language_server/providers/definition/locator.ex` 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 51 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–14 lines × 2) apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:313— apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:313-322 | apps/language_server/lib/language_server/providers/references/locator.ex:117-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–14 lines × 2) apps/language_server/lib/language_server/providers/implementation/locator.ex:25— apps/language_server/lib/language_server/providers/implementation/locator.ex:25-33 | apps/language_server/lib/language_server/providers/references/locator.ex:24-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. Read the line range as the matched WINDOW rather than a finished unit: at `apps/language_server/lib/language_server/providers/implementation/locator.ex:25` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note 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 × 3) apps/language_server/lib/language_server/providers/completion.ex:387— apps/language_server/lib/language_server/providers/completion.ex:387-399 | apps/language_server/lib/language_server/providers/completion.ex:411-423 | apps/language_server/lib/language_server/providers/completion.ex:561-573 — 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 `apps/language_server/lib/language_server/providers/completion.ex:387` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) apps/language_server/lib/language_server/providers/declaration/locator.ex:47— apps/language_server/lib/language_server/providers/declaration/locator.ex:47-59 | apps/language_server/lib/language_server/providers/definition/locator.ex:65-77 — `apps/language_server/lib/language_server/providers/declaration/locator.ex` and `apps/language_server/lib/language_server/providers/definition/locator.ex` 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 51 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) apps/language_server/lib/language_server/server.ex:230— apps/language_server/lib/language_server/server.ex:230-245 | apps/language_server/lib/language_server/server.ex:909-920 | apps/language_server/lib/language_server/server.ex:1035-1049 — 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 `apps/language_server/lib/language_server/server.ex:230` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) apps/debug_adapter/lib/debug_adapter/server.ex:929— apps/debug_adapter/lib/debug_adapter/server.ex:929-940 | apps/debug_adapter/lib/debug_adapter/server.ex:1015-1026 — 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 `apps/debug_adapter/lib/debug_adapter/server.ex:929` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `apps/debug_adapter/lib/debug_adapter/server.ex:941` calls `to_string`, `get` and `apps/debug_adapter/lib/debug_adapter/server.ex:1026` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–11 lines × 2) apps/language_server/lib/language_server/providers/completion.ex:746— apps/language_server/lib/language_server/providers/completion.ex:746-754 | apps/language_server/lib/language_server/providers/completion.ex:1236-1246 — 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 `apps/language_server/lib/language_server/providers/completion.ex:746` 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–8 lines × 2) apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:127— apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:127-134 | apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:156-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `apps/debug_adapter/lib/debug_adapter/exunit_formatter.ex:127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) apps/language_server/lib/language_server/providers/definition/locator.ex:143— apps/language_server/lib/language_server/providers/definition/locator.ex:143-147 | apps/language_server/lib/language_server/providers/hover/docs.ex:180-184 | apps/language_server/lib/language_server/providers/references/locator.ex:233-237 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (5 lines × 2) apps/language_server/lib/language_server/providers/call_hierarchy.ex:95— apps/language_server/lib/language_server/providers/call_hierarchy.ex:95-99 | apps/language_server/lib/language_server/providers/references.ex:69-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Off the main sequence: elixir_ls_utils — elixir_ls_utils: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Duplicated predicate apps/language_server/lib/language_server/providers/definition/locator.ex:322— `Metadata.get_call_arity(metadata, env.module, f, line, column) || :any` appears character-identically in 2 files — apps/language_server/lib/language_server/providers/definition/locator.ex, apps/language_server/lib/language_server/providers/hover/docs.ex. 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 apps/language_server/lib/language_server/providers/declaration/locator.ex:149— `Metadata.get_call_arity(metadata, mod, fun, line, column) || :any` appears character-identically in 3 files — apps/language_server/lib/language_server/providers/declaration/locator.ex, apps/language_server/lib/language_server/providers/definition/locator.ex, apps/language_server/lib/language_server/providers/hover/docs.ex. 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 apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex:130— `Metadata.get_call_arity(metadata, module, function, line, column) || :any` appears character-identically in 3 files — apps/language_server/lib/language_server/providers/call_hierarchy/locator.ex, apps/language_server/lib/language_server/providers/implementation/locator.ex, apps/language_server/lib/language_server/providers/references/locator.ex. 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 apps/debug_adapter/lib/debug_adapter/server.ex:3363— `String.ends_with?(file, ".ex") or String.ends_with?(file, ".exs")` appears character-identically in 2 files — apps/debug_adapter/lib/debug_adapter/server.ex, apps/language_server/lib/language_server/parser.ex. 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 apps/language_server/lib/language_server/providers/selection_ranges.ex:435— `end_line == line and end_character >= character` appears character-identically in 2 files — apps/language_server/lib/language_server/providers/selection_ranges.ex, apps/language_server/lib/language_server/range_utils.ex. 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 apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex:228— `idx == length(extracted_lines) - 1 && end_column` appears character-identically in 2 files — apps/language_server/lib/language_server/providers/execute_command/llm_definition.ex, apps/language_server/lib/language_server/providers/execute_command/llm_implementation_finder.ex. 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 apps/language_server/lib/language_server/providers/completion/reducers/callbacks.ex:44— `protocol == nil or mod != elem(protocol, 0)` appears character-identically in 3 files — apps/language_server/lib/language_server/providers/completion/reducers/callbacks.ex, apps/language_server/lib/language_server/providers/completion/reducers/overridable.ex, apps/language_server/lib/language_server/providers/completion/reducers/returns.ex. 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 apps/language_server/lib/language_server/providers/selection_ranges.ex:125— `start_line == line and start_character <= character` appears character-identically in 2 files — apps/language_server/lib/language_server/providers/selection_ranges.ex, apps/language_server/lib/language_server/range_utils.ex. 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 apps/language_server/lib/language_server/providers/execute_command/manipulate_pipes.ex: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 apps/language_server/lib/language_server/code_unit.ex: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 apps/language_server/lib/language_server/providers/folding_range/indentation.ex: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 apps/language_server/lib/language_server/providers/on_type_formatting.ex: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 apps/language_server/lib/language_server/providers/code_mod/diff.ex: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 apps/language_server/lib/language_server/providers/folding_range/comment_block.ex: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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 53 significant file(s) lose their only recent owner: apps/debug_adapter/lib/debug_adapter/server.ex, apps/language_server/lib/language_server/server.ex, apps/elixir_ls_utils/lib/completion_engine.ex, apps/language_server/lib/language_server/providers/completion.ex, apps/language_server/lib/language_server/mix_tasks/format.ex, apps/language_server/lib/language_server/mcp/request_handler.ex, apps/language_server/lib/language_server/providers/inlay_hints.ex, apps/language_server/lib/language_server/build.ex (+45 more). Pair on, review, or document these before any departure.
No ADRs found REDACTED:1— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `REDACTED` makes this repository a deployable product (line 1).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 5.0/10. The most over is `apps/language_server` (25029 LoC, 574 module-visible types across 35 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.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 6 of 93 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; 93 of the 151 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: apps/language_server/lib/language_server/providers/execute_command/manipulate_pipes.ex, apps/language_server/lib/language_server/code_unit.ex, apps/language_server/lib/language_server/providers/folding_range/indentation.ex, apps/language_server/lib/language_server/providers/on_type_formatting.ex, apps/language_server/lib/language_server/providers/code_mod/diff.ex, apps/language_server/lib/language_server/providers/folding_range/comment_block.ex. 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.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
No src/ separation — Most of the production code is in directories of its own, but 2 application file(s) sit at the repository root beside the build and tooling files (`dep_versions.exs`, `mix.exs`).
Benchmarks don't track allocations apps/language_server/benchmarks/document_backing_store_bench.exs— A Elixir Benchee/Benchfella suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
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.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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 01a1d392-12a9-723e-9414-eb555d676853 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 35 · Warnings: 239 · Recommendations: 27 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 13-11-2026 @ 06:22 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.