Public report of AvaloniaUI/Avalonia, published 23 October 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 23 October 2026, 00:47 UTC · Survey ID cd_de69090a76ed40ddb1845e9c79c10065
AvaloniaUI/Avalonia
Measured 23 October 2026, 00:38 UTC, at code version 136efef
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
Code coverage is not measured: .NET and JavaScript/TypeScript suite (CouldNotMeasureNoCollector, CouldNotMeasureTestRunFailed).
Boundary Type-Coupling is not measured: Bounded contexts not declared.
IL efficiency is not measured: The target did not build.
CAI scoreAt riskDown 3 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 413,253 lines of product code in 147 projects, tests not counted · Estimated rebuild effort: about 9.0 person-years · Weakest lens: Security and Compliance, 50
Findings by how serious they are
214 critical1906 serious278 minor
7 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
23 October 2026, 00:38 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
82of 87 dimensions measured by tools. The other 5 are advisory notes from an AI model, which explain the code but don't count towards the score.
2351of 2398 findings point to an exact file and line, so you can open each one in the code. The other 47 concern the repository as a whole, such as missing documentation.
87dimensions across 6 lenses, read from 413,253 lines of product code in 147 projects.
AvaloniaUI/Avalonia scores 55 out of 100, but it is rated At risk while a critical security finding is open; the score itself is unchanged.
The weakest lens counts most in the score, and here that is Security and Compliance, which scores 50 and is rated Adequate. Its Static Analysis (SAST) dimension scores 1.2 out of 10, and until that reaches 4, Security and Compliance can't be rated higher than Adequate. The first actions are to resolve the 1 Leaked secret finding(s) in REDACTED Scanning and to resolve the 4 High secret finding(s) in Secrets (history), and if Security and Compliance rose to 70, the score would rise from 55 to about 59.
214 findings are critical: 137 in Explicit Debt, 37 in Static Analysis (SAST), 14 in Project dependency cycles, nine in Dependency Vulnerabilities, five in Knowledge Freshness, five in Secrets (history), two in Change Coupling, one in Circular Imports, one in Cryptographic Hygiene, one in REDACTED Scanning, one in Supply-chain Provenance & Signing and one in Test Quality.
Watchdog couldn't measure Test Reliability, Dependency Hygiene and Runtime evidence locked — no reproducible boot in this code, so those dimensions are left out of the score. The product code is 413,253 lines, which would take an estimated 9.0 person-years, around €1,300,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 Security and Compliance rose from 50 to 70, the lowest score rated Strong, the score would rise from 55 to about 59.
Code composition: what the lines of code are
Business logic 28%Supporting code 36%Tests 34%Generated by tools 0%Code analyzers 1%
New since the last survey: 180 findings
These 180 critical or serious findings weren't in the previous survey, on 9 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Large Files · src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts: 486 lines of code src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts
Test Coverage · No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/inputQueue.ts
Test Coverage · No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/multiThreadedDispatcher.ts
Cryptographic Hygiene · Password hashing without a KDF src/Avalonia.Controls/MaskedTextBox.cs
Cancellation propagation · Async method without CancellationToken: TryGetInProcessDataAsync src/Avalonia.Base/Input/Platform/Clipboard.cs
Cancellation propagation · Async method without CancellationToken: OpenFilePickerAsync src/Avalonia.Base/Platform/Storage/FallbackStorageProvider.cs
Cancellation propagation · Async method without CancellationToken: OpenFilePickerWithResultAsync src/Avalonia.Base/Platform/Storage/FallbackStorageProvider.cs
Cancellation propagation · Async method without CancellationToken: SaveFilePickerAsync src/Avalonia.Base/Platform/Storage/FallbackStorageProvider.cs
Cancellation propagation · Async method without CancellationToken: SaveFilePickerWithResultAsync src/Avalonia.Base/Platform/Storage/FallbackStorageProvider.cs
Cancellation propagation · Async method without CancellationToken: OpenFolderPickerAsync src/Avalonia.Base/Platform/Storage/FallbackStorageProvider.cs
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 508 findings
These 508 critical or serious findings were in the previous survey, on 9 October 2026, and are gone from this one. The first 100 are listed here.
Large Files · src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts: 517 lines of code src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts
€430,000 to €2,200,000, for 7,111 to 23,095 hours of work, about 9.0 person-years for 5 to 18 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 55. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 413,253 lines of product code
Comment lines
The estimate prices 341,310 lines. Comment lines count towards the size of 413,253 lines but aren't priced as work.
How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Resolve the 1 Assertions commented out finding(s) in Test Quality — start with BindingExpressionTests.Negation.cs.
Raises the score by about 2 points · Low effort · Test Quality
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €1,300,000 to build again, about 9.0 person-years of work. Its weakest lens is Security and Compliance, at 50 (Adequate). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 1 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.5 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 91,650 lines over the last 90 days, which is about 371,692 lines a year. At that pace, the extra work comes to an estimated 18.6 to 123.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — bounded-context dependency graph
Each box is a bounded context (its layer projects grouped, or a project count when large); arrows show dependencies between contexts. A shared kernel is where many arrows converge.
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.
281 modules, with 1263 dependencies between them. 15 loops run through 120 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 241 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.
Avalonia.Input.Platform uses Avalonia.Platform.Storage, so a change to Avalonia.Platform.Storage can break Avalonia.Input.Platform, while a change to Avalonia.Input.Platform can't break Avalonia.Platform.Storage.
Position
Below the diagonal: Avalonia.Input.Platform uses a module listed above it, which is the healthy direction.
3→17 Avalonia.Input.Platform uses Avalonia.Media.Imagingpart of a loop✕
Connections
1 pair of types, where a type in Avalonia.Input.Platform uses a type in Avalonia.Media.Imaging.
Avalonia.Input.Platform uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Input.Platform, while a change to Avalonia.Input.Platform can't break Avalonia.Media.Imaging.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3→21 Avalonia.Input.Platform uses Avalonia.Inputpart of a loop✕
Connections
24 pairs of types, where a type in Avalonia.Input.Platform uses a type in Avalonia.Input.
Avalonia.Input.Platform uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Input.Platform, while a change to Avalonia.Input.Platform can't break Avalonia.Input.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
4→21 Avalonia.Input.Raw uses Avalonia.Inputpart of a loop✕
Connections
29 pairs of types, where a type in Avalonia.Input.Raw uses a type in Avalonia.Input. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Input.Raw uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Input.Raw, while a change to Avalonia.Input.Raw can't break Avalonia.Input.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
4→32 Avalonia.Input.Raw uses Avaloniapart of a loop✕
Connections
10 pairs of types, where a type in Avalonia.Input.Raw uses a type in Avalonia.
Avalonia.Interactivity uses Avalonia.Reactive, so a change to Avalonia.Reactive can break Avalonia.Interactivity, while a change to Avalonia.Interactivity can't break Avalonia.Reactive.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6→16 Avalonia.Platform.Surfaces uses Avalonia.Platformpart of a loop✕
Connections
7 pairs of types, where a type in Avalonia.Platform.Surfaces uses a type in Avalonia.Platform.
Avalonia.Platform.Surfaces uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Platform.Surfaces, while a change to Avalonia.Platform.Surfaces can't break Avalonia.Platform.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→16 Avalonia.Styling uses Avalonia.Platformpart of a loop✕
Connections
4 pairs of types, where a type in Avalonia.Styling uses a type in Avalonia.Platform.
Avalonia.Styling uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Styling, while a change to Avalonia.Styling can't break Avalonia.Platform.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→26 Avalonia.Styling uses Avalonia.Controlspart of a loop✕
Connections
8 pairs of types, where a type in Avalonia.Styling uses a type in Avalonia.Controls.
Avalonia.Styling uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Styling, while a change to Avalonia.Styling can't break Avalonia.Controls.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→28 Avalonia.Styling uses Avalonia.Datapart of a loop✕
Connections
4 pairs of types, where a type in Avalonia.Styling uses a type in Avalonia.Data.
Avalonia.Styling uses Avalonia.Data, so a change to Avalonia.Data can break Avalonia.Styling, while a change to Avalonia.Styling can't break Avalonia.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→29 Avalonia.Styling uses Avalonia.Reactivepart of a loop✕
Connections
2 pairs of types, where a type in Avalonia.Styling uses a type in Avalonia.Reactive.
Avalonia.Styling uses Avalonia.Reactive, so a change to Avalonia.Reactive can break Avalonia.Styling, while a change to Avalonia.Styling can't break Avalonia.Reactive.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→30 Avalonia.Styling uses Avalonia.Collectionspart of a loop✕
Connections
4 pairs of types, where a type in Avalonia.Styling uses a type in Avalonia.Collections.
Avalonia.Styling uses Avalonia.Collections, so a change to Avalonia.Collections can break Avalonia.Styling, while a change to Avalonia.Styling can't break Avalonia.Collections.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→31 Avalonia.Styling uses Avalonia.Animationpart of a loop✕
Connections
3 pairs of types, where a type in Avalonia.Styling uses a type in Avalonia.Animation.
Avalonia.Styling uses Avalonia.Animation, so a change to Avalonia.Animation can break Avalonia.Styling, while a change to Avalonia.Styling can't break Avalonia.Animation.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→32 Avalonia.Styling uses Avaloniapart of a loop✕
Connections
37 pairs of types, where a type in Avalonia.Styling uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Utilities uses Avalonia.Collections, so a change to Avalonia.Collections can break Avalonia.Utilities, while a change to Avalonia.Utilities can't break Avalonia.Collections.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8→32 Avalonia.Utilities uses Avaloniapart of a loop✕
Connections
6 pairs of types, where a type in Avalonia.Utilities uses a type in Avalonia.
Avalonia.Input.TextInput uses Avalonia.Interactivity, so a change to Avalonia.Interactivity can break Avalonia.Input.TextInput, while a change to Avalonia.Input.TextInput can't break Avalonia.Interactivity.
Position
Below the diagonal: Avalonia.Input.TextInput uses a module listed above it, which is the healthy direction.
9→21 Avalonia.Input.TextInput uses Avalonia.Inputpart of a loop✕
Connections
1 pair of types, where a type in Avalonia.Input.TextInput uses a type in Avalonia.Input.
Avalonia.Input.TextInput uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Input.TextInput, while a change to Avalonia.Input.TextInput can't break Avalonia.Input.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→32 Avalonia.Input.TextInput uses Avaloniapart of a loop✕
Connections
10 pairs of types, where a type in Avalonia.Input.TextInput uses a type in Avalonia.
Avalonia.Input.TextInput uses Avalonia, so a change to Avalonia can break Avalonia.Input.TextInput, while a change to Avalonia.Input.TextInput can't break Avalonia.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Avalonia.Threading uses Avalonia.Utilities, so a change to Avalonia.Utilities can break Avalonia.Threading, while a change to Avalonia.Threading can't break Avalonia.Utilities.
Position
Below the diagonal: Avalonia.Threading uses a module listed above it, which is the healthy direction.
10→16 Avalonia.Threading uses Avalonia.Platformpart of a loop✕
Connections
2 pairs of types, where a type in Avalonia.Threading uses a type in Avalonia.Platform.
Avalonia.Threading uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Threading, while a change to Avalonia.Threading can't break Avalonia.Platform.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Avalonia.Controls.Platform uses Avalonia.Platform.Storage, so a change to Avalonia.Platform.Storage can break Avalonia.Controls.Platform, while a change to Avalonia.Controls.Platform can't break Avalonia.Platform.Storage.
Position
Below the diagonal: Avalonia.Controls.Platform uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Platform uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.Controls.Platform, while a change to Avalonia.Controls.Platform can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.Controls.Platform uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Platform uses Avalonia.Interactivity, so a change to Avalonia.Interactivity can break Avalonia.Controls.Platform, while a change to Avalonia.Controls.Platform can't break Avalonia.Interactivity.
Position
Below the diagonal: Avalonia.Controls.Platform uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Platform uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Controls.Platform, while a change to Avalonia.Controls.Platform can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Controls.Platform uses a module listed above it, which is the healthy direction.
11→16 Avalonia.Controls.Platform uses Avalonia.Platformpart of a loop✕
Connections
6 pairs of types, where a type in Avalonia.Controls.Platform uses a type in Avalonia.Platform.
Avalonia.Controls.Platform uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Controls.Platform, while a change to Avalonia.Controls.Platform can't break Avalonia.Platform.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→19 Avalonia.Controls.Platform uses Avalonia.Mediapart of a loop✕
Connections
2 pairs of types, where a type in Avalonia.Controls.Platform uses a type in Avalonia.Media.
Avalonia.Controls.Platform uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Controls.Platform, while a change to Avalonia.Controls.Platform can't break Avalonia.Media.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→21 Avalonia.Controls.Platform uses Avalonia.Inputpart of a loop✕
Connections
6 pairs of types, where a type in Avalonia.Controls.Platform uses a type in Avalonia.Input.
Avalonia.Controls.Platform uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Controls.Platform, while a change to Avalonia.Controls.Platform can't break Avalonia.Input.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→26 Avalonia.Controls.Platform uses Avalonia.Controlspart of a loop✕
Connections
13 pairs of types, where a type in Avalonia.Controls.Platform uses a type in Avalonia.Controls.
Avalonia.Controls.Platform uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Controls.Platform, while a change to Avalonia.Controls.Platform can't break Avalonia.Controls.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→32 Avalonia.Controls.Platform uses Avaloniapart of a loop✕
Connections
9 pairs of types, where a type in Avalonia.Controls.Platform uses a type in Avalonia.
Avalonia.Controls.Platform uses Avalonia, so a change to Avalonia can break Avalonia.Controls.Platform, while a change to Avalonia.Controls.Platform can't break Avalonia.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Avalonia.Data.Core uses Avalonia.Interactivity, so a change to Avalonia.Interactivity can break Avalonia.Data.Core, while a change to Avalonia.Data.Core can't break Avalonia.Interactivity.
Position
Below the diagonal: Avalonia.Data.Core uses a module listed above it, which is the healthy direction.
Avalonia.Data.Core uses Avalonia.Utilities, so a change to Avalonia.Utilities can break Avalonia.Data.Core, while a change to Avalonia.Data.Core can't break Avalonia.Utilities.
Position
Below the diagonal: Avalonia.Data.Core uses a module listed above it, which is the healthy direction.
Avalonia.Data.Core uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Data.Core, while a change to Avalonia.Data.Core can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Data.Core uses a module listed above it, which is the healthy direction.
12→28 Avalonia.Data.Core uses Avalonia.Datapart of a loop✕
Connections
21 pairs of types, where a type in Avalonia.Data.Core uses a type in Avalonia.Data.
Avalonia.Data.Core uses Avalonia.Data, so a change to Avalonia.Data can break Avalonia.Data.Core, while a change to Avalonia.Data.Core can't break Avalonia.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
12→29 Avalonia.Data.Core uses Avalonia.Reactivepart of a loop✕
Connections
3 pairs of types, where a type in Avalonia.Data.Core uses a type in Avalonia.Reactive.
Avalonia.Data.Core uses Avalonia.Reactive, so a change to Avalonia.Reactive can break Avalonia.Data.Core, while a change to Avalonia.Data.Core can't break Avalonia.Reactive.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
12→32 Avalonia.Data.Core uses Avaloniapart of a loop✕
Connections
15 pairs of types, where a type in Avalonia.Data.Core uses a type in Avalonia.
Avalonia.Rendering uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.Rendering, while a change to Avalonia.Rendering can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.Rendering uses a module listed above it, which is the healthy direction.
Avalonia.Rendering uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Rendering, while a change to Avalonia.Rendering can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Rendering uses a module listed above it, which is the healthy direction.
13→15 Avalonia.Rendering uses Avalonia.Rendering.Compositionpart of a loop✕
Connections
3 pairs of types, where a type in Avalonia.Rendering uses a type in Avalonia.Rendering.Composition.
Avalonia.Rendering uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.Rendering, while a change to Avalonia.Rendering can't break Avalonia.Rendering.Composition.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→16 Avalonia.Rendering uses Avalonia.Platformpart of a loop✕
Connections
6 pairs of types, where a type in Avalonia.Rendering uses a type in Avalonia.Platform.
Avalonia.Rendering uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Rendering, while a change to Avalonia.Rendering can't break Avalonia.Platform.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→19 Avalonia.Rendering uses Avalonia.Mediapart of a loop✕
Connections
5 pairs of types, where a type in Avalonia.Rendering uses a type in Avalonia.Media.
Avalonia.Rendering uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Rendering, while a change to Avalonia.Rendering can't break Avalonia.Media.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→21 Avalonia.Rendering uses Avalonia.Inputpart of a loop✕
Connections
1 pair of types, where a type in Avalonia.Rendering uses a type in Avalonia.Input.
Avalonia.Rendering uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Rendering, while a change to Avalonia.Rendering can't break Avalonia.Input.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→32 Avalonia.Rendering uses Avaloniapart of a loop✕
Connections
17 pairs of types, where a type in Avalonia.Rendering uses a type in Avalonia.
Avalonia.Rendering.Composition.Server uses System, so a change to System can break Avalonia.Rendering.Composition.Server, while a change to Avalonia.Rendering.Composition.Server can't break System.
Position
Below the diagonal: Avalonia.Rendering.Composition.Server uses a module listed above it, which is the healthy direction.
Avalonia.Rendering.Composition.Server uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.Rendering.Composition.Server, while a change to Avalonia.Rendering.Composition.Server can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.Rendering.Composition.Server uses a module listed above it, which is the healthy direction.
Avalonia.Rendering.Composition.Server uses Avalonia.Utilities, so a change to Avalonia.Utilities can break Avalonia.Rendering.Composition.Server, while a change to Avalonia.Rendering.Composition.Server can't break Avalonia.Utilities.
Position
Below the diagonal: Avalonia.Rendering.Composition.Server uses a module listed above it, which is the healthy direction.
Avalonia.Rendering.Composition.Server uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Rendering.Composition.Server, while a change to Avalonia.Rendering.Composition.Server can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Rendering.Composition.Server uses a module listed above it, which is the healthy direction.
Avalonia.Rendering.Composition.Server uses Avalonia.Rendering, so a change to Avalonia.Rendering can break Avalonia.Rendering.Composition.Server, while a change to Avalonia.Rendering.Composition.Server can't break Avalonia.Rendering.
Position
Below the diagonal: Avalonia.Rendering.Composition.Server uses a module listed above it, which is the healthy direction.
14→15 Avalonia.Rendering.Composition.Server uses Avalonia.Rendering.Compositionpart of a loop✕
Connections
6 pairs of types, where a type in Avalonia.Rendering.Composition.Server uses a type in Avalonia.Rendering.Composition.
Avalonia.Rendering.Composition.Server uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.Rendering.Composition.Server, while a change to Avalonia.Rendering.Composition.Server can't break Avalonia.Rendering.Composition.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14→16 Avalonia.Rendering.Composition.Server uses Avalonia.Platformpart of a loop✕
Connections
59 pairs of types, where a type in Avalonia.Rendering.Composition.Server uses a type in Avalonia.Platform. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Rendering.Composition.Server uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Rendering.Composition.Server, while a change to Avalonia.Rendering.Composition.Server can't break Avalonia.Platform.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14→19 Avalonia.Rendering.Composition.Server uses Avalonia.Mediapart of a loop✕
Connections
47 pairs of types, where a type in Avalonia.Rendering.Composition.Server uses a type in Avalonia.Media. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Rendering.Composition.Server uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Rendering.Composition.Server, while a change to Avalonia.Rendering.Composition.Server can't break Avalonia.Media.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14→32 Avalonia.Rendering.Composition.Server uses Avaloniapart of a loop✕
Connections
27 pairs of types, where a type in Avalonia.Rendering.Composition.Server uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Rendering.Composition.Server uses Avalonia, so a change to Avalonia can break Avalonia.Rendering.Composition.Server, while a change to Avalonia.Rendering.Composition.Server can't break Avalonia.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Avalonia.Rendering.Composition uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.Rendering.Composition, while a change to Avalonia.Rendering.Composition can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.Rendering.Composition uses a module listed above it, which is the healthy direction.
Avalonia.Rendering.Composition uses Avalonia.Utilities, so a change to Avalonia.Utilities can break Avalonia.Rendering.Composition, while a change to Avalonia.Rendering.Composition can't break Avalonia.Utilities.
Position
Below the diagonal: Avalonia.Rendering.Composition uses a module listed above it, which is the healthy direction.
Avalonia.Rendering.Composition uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Rendering.Composition, while a change to Avalonia.Rendering.Composition can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Rendering.Composition uses a module listed above it, which is the healthy direction.
Avalonia.Rendering.Composition uses Avalonia.Rendering, so a change to Avalonia.Rendering can break Avalonia.Rendering.Composition, while a change to Avalonia.Rendering.Composition can't break Avalonia.Rendering.
Position
Below the diagonal: Avalonia.Rendering.Composition uses a module listed above it, which is the healthy direction.
Avalonia.Rendering.Composition uses Avalonia.Rendering.Composition.Server, so a change to Avalonia.Rendering.Composition.Server can break Avalonia.Rendering.Composition, while a change to Avalonia.Rendering.Composition can't break Avalonia.Rendering.Composition.Server.
Position
Below the diagonal: Avalonia.Rendering.Composition uses a module listed above it, which is the healthy direction.
15→16 Avalonia.Rendering.Composition uses Avalonia.Platformpart of a loop✕
Connections
22 pairs of types, where a type in Avalonia.Rendering.Composition uses a type in Avalonia.Platform.
Avalonia.Rendering.Composition uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Rendering.Composition, while a change to Avalonia.Rendering.Composition can't break Avalonia.Platform.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→17 Avalonia.Rendering.Composition uses Avalonia.Media.Imagingpart of a loop✕
Connections
1 pair of types, where a type in Avalonia.Rendering.Composition uses a type in Avalonia.Media.Imaging.
Avalonia.Rendering.Composition uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Rendering.Composition, while a change to Avalonia.Rendering.Composition can't break Avalonia.Media.Imaging.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→19 Avalonia.Rendering.Composition uses Avalonia.Mediapart of a loop✕
Connections
24 pairs of types, where a type in Avalonia.Rendering.Composition uses a type in Avalonia.Media.
Avalonia.Rendering.Composition uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Rendering.Composition, while a change to Avalonia.Rendering.Composition can't break Avalonia.Media.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→32 Avalonia.Rendering.Composition uses Avaloniapart of a loop✕
Connections
16 pairs of types, where a type in Avalonia.Rendering.Composition uses a type in Avalonia.
Avalonia.Rendering.Composition uses Avalonia, so a change to Avalonia can break Avalonia.Rendering.Composition, while a change to Avalonia.Rendering.Composition can't break Avalonia.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Avalonia.Platform uses Avalonia.Input.Platform, so a change to Avalonia.Input.Platform can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Input.Platform.
Position
Below the diagonal: Avalonia.Platform uses a module listed above it, which is the healthy direction.
Avalonia.Platform uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.Platform uses a module listed above it, which is the healthy direction.
Avalonia.Platform uses Avalonia.Interactivity, so a change to Avalonia.Interactivity can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Interactivity.
Position
Below the diagonal: Avalonia.Platform uses a module listed above it, which is the healthy direction.
Avalonia.Platform uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.Platform uses a module listed above it, which is the healthy direction.
Avalonia.Platform uses Avalonia.Styling, so a change to Avalonia.Styling can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Styling.
Position
Below the diagonal: Avalonia.Platform uses a module listed above it, which is the healthy direction.
Avalonia.Platform uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Platform uses a module listed above it, which is the healthy direction.
Avalonia.Platform uses Avalonia.Controls.Platform, so a change to Avalonia.Controls.Platform can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Controls.Platform.
Position
Below the diagonal: Avalonia.Platform uses a module listed above it, which is the healthy direction.
Avalonia.Platform uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.Platform uses a module listed above it, which is the healthy direction.
16→17 Avalonia.Platform uses Avalonia.Media.Imagingpart of a loop✕
Connections
3 pairs of types, where a type in Avalonia.Platform uses a type in Avalonia.Media.Imaging.
Avalonia.Platform uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Media.Imaging.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→19 Avalonia.Platform uses Avalonia.Mediapart of a loop✕
Connections
25 pairs of types, where a type in Avalonia.Platform uses a type in Avalonia.Media.
Avalonia.Platform uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Media.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→21 Avalonia.Platform uses Avalonia.Inputpart of a loop✕
Connections
12 pairs of types, where a type in Avalonia.Platform uses a type in Avalonia.Input.
Avalonia.Platform uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Input.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→26 Avalonia.Platform uses Avalonia.Controlspart of a loop✕
Connections
9 pairs of types, where a type in Avalonia.Platform uses a type in Avalonia.Controls.
Avalonia.Platform uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Controls.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→29 Avalonia.Platform uses Avalonia.Reactivepart of a loop✕
Connections
1 pair of types, where a type in Avalonia.Platform uses a type in Avalonia.Reactive.
Avalonia.Platform uses Avalonia.Reactive, so a change to Avalonia.Reactive can break Avalonia.Platform, while a change to Avalonia.Platform can't break Avalonia.Reactive.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→32 Avalonia.Platform uses Avaloniapart of a loop✕
Connections
65 pairs of types, where a type in Avalonia.Platform uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Media.Imaging uses System, so a change to System can break Avalonia.Media.Imaging, while a change to Avalonia.Media.Imaging can't break System.
Position
Below the diagonal: Avalonia.Media.Imaging uses a module listed above it, which is the healthy direction.
Avalonia.Media.Imaging uses Avalonia.Utilities, so a change to Avalonia.Utilities can break Avalonia.Media.Imaging, while a change to Avalonia.Media.Imaging can't break Avalonia.Utilities.
Position
Below the diagonal: Avalonia.Media.Imaging uses a module listed above it, which is the healthy direction.
Avalonia.Media.Imaging uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Media.Imaging, while a change to Avalonia.Media.Imaging can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Media.Imaging uses a module listed above it, which is the healthy direction.
17→19 Avalonia.Media.Imaging uses Avalonia.Mediapart of a loop✕
Connections
7 pairs of types, where a type in Avalonia.Media.Imaging uses a type in Avalonia.Media.
Avalonia.Media.Imaging uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Media.Imaging, while a change to Avalonia.Media.Imaging can't break Avalonia.Media.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→32 Avalonia.Media.Imaging uses Avaloniapart of a loop✕
Connections
23 pairs of types, where a type in Avalonia.Media.Imaging uses a type in Avalonia.
Avalonia.Media.Imaging uses Avalonia, so a change to Avalonia can break Avalonia.Media.Imaging, while a change to Avalonia.Media.Imaging can't break Avalonia.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Avalonia.OpenGL.Egl uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.OpenGL.Egl, while a change to Avalonia.OpenGL.Egl can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.OpenGL.Egl uses a module listed above it, which is the healthy direction.
Avalonia.OpenGL.Egl uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.OpenGL.Egl, while a change to Avalonia.OpenGL.Egl can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.OpenGL.Egl uses a module listed above it, which is the healthy direction.
18→20 Avalonia.OpenGL.Egl uses Avalonia.OpenGLpart of a loop✕
Connections
16 pairs of types, where a type in Avalonia.OpenGL.Egl uses a type in Avalonia.OpenGL.
Avalonia.OpenGL.Egl uses Avalonia.OpenGL, so a change to Avalonia.OpenGL can break Avalonia.OpenGL.Egl, while a change to Avalonia.OpenGL.Egl can't break Avalonia.OpenGL.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
18→32 Avalonia.OpenGL.Egl uses Avaloniapart of a loop✕
Connections
6 pairs of types, where a type in Avalonia.OpenGL.Egl uses a type in Avalonia.
Avalonia.Media uses Avalonia.Utilities, so a change to Avalonia.Utilities can break Avalonia.Media, while a change to Avalonia.Media can't break Avalonia.Utilities.
Position
Below the diagonal: Avalonia.Media uses a module listed above it, which is the healthy direction.
Avalonia.Media uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Media, while a change to Avalonia.Media can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Media uses a module listed above it, which is the healthy direction.
Avalonia.Media uses Avalonia.Rendering, so a change to Avalonia.Rendering can break Avalonia.Media, while a change to Avalonia.Media can't break Avalonia.Rendering.
Position
Below the diagonal: Avalonia.Media uses a module listed above it, which is the healthy direction.
Avalonia.Media uses Avalonia.Rendering.Composition.Server, so a change to Avalonia.Rendering.Composition.Server can break Avalonia.Media, while a change to Avalonia.Media can't break Avalonia.Rendering.Composition.Server.
Position
Below the diagonal: Avalonia.Media uses a module listed above it, which is the healthy direction.
Avalonia.Media uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.Media, while a change to Avalonia.Media can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.Media uses a module listed above it, which is the healthy direction.
46 pairs of types, where a type in Avalonia.Media uses a type in Avalonia.Platform. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Media uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Media, while a change to Avalonia.Media can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Media uses a module listed above it, which is the healthy direction.
Avalonia.Media uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Media, while a change to Avalonia.Media can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.Media uses a module listed above it, which is the healthy direction.
19→30 Avalonia.Media uses Avalonia.Collectionspart of a loop✕
Connections
10 pairs of types, where a type in Avalonia.Media uses a type in Avalonia.Collections.
Avalonia.Media uses Avalonia.Collections, so a change to Avalonia.Collections can break Avalonia.Media, while a change to Avalonia.Media can't break Avalonia.Collections.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
19→31 Avalonia.Media uses Avalonia.Animationpart of a loop✕
Connections
7 pairs of types, where a type in Avalonia.Media uses a type in Avalonia.Animation.
Avalonia.Media uses Avalonia.Animation, so a change to Avalonia.Animation can break Avalonia.Media, while a change to Avalonia.Media can't break Avalonia.Animation.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
182 pairs of types, where a type in Avalonia.Media uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.OpenGL uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.OpenGL, while a change to Avalonia.OpenGL can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.OpenGL uses a module listed above it, which is the healthy direction.
Avalonia.OpenGL uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.OpenGL, while a change to Avalonia.OpenGL can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.OpenGL uses a module listed above it, which is the healthy direction.
Avalonia.OpenGL uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.OpenGL, while a change to Avalonia.OpenGL can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.OpenGL uses a module listed above it, which is the healthy direction.
Avalonia.OpenGL uses Avalonia.OpenGL.Egl, so a change to Avalonia.OpenGL.Egl can break Avalonia.OpenGL, while a change to Avalonia.OpenGL can't break Avalonia.OpenGL.Egl.
Position
Below the diagonal: Avalonia.OpenGL uses a module listed above it, which is the healthy direction.
20→32 Avalonia.OpenGL uses Avaloniapart of a loop✕
Connections
10 pairs of types, where a type in Avalonia.OpenGL uses a type in Avalonia.
Avalonia.Input uses Avalonia.Platform.Storage, so a change to Avalonia.Platform.Storage can break Avalonia.Input, while a change to Avalonia.Input can't break Avalonia.Platform.Storage.
Position
Below the diagonal: Avalonia.Input uses a module listed above it, which is the healthy direction.
Avalonia.Input uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.Input, while a change to Avalonia.Input can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.Input uses a module listed above it, which is the healthy direction.
48 pairs of types, where a type in Avalonia.Input uses a type in Avalonia.Interactivity. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Input uses Avalonia.Interactivity, so a change to Avalonia.Interactivity can break Avalonia.Input, while a change to Avalonia.Input can't break Avalonia.Interactivity.
Position
Below the diagonal: Avalonia.Input uses a module listed above it, which is the healthy direction.
Avalonia.Input uses Avalonia.Input.TextInput, so a change to Avalonia.Input.TextInput can break Avalonia.Input, while a change to Avalonia.Input can't break Avalonia.Input.TextInput.
Position
Below the diagonal: Avalonia.Input uses a module listed above it, which is the healthy direction.
Avalonia.Input uses Avalonia.Rendering, so a change to Avalonia.Rendering can break Avalonia.Input, while a change to Avalonia.Input can't break Avalonia.Rendering.
Position
Below the diagonal: Avalonia.Input uses a module listed above it, which is the healthy direction.
Avalonia.Input uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Input, while a change to Avalonia.Input can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Input uses a module listed above it, which is the healthy direction.
Avalonia.Input uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Input, while a change to Avalonia.Input can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.Input uses a module listed above it, which is the healthy direction.
Avalonia.Input uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Input, while a change to Avalonia.Input can't break Avalonia.Media.
Position
Below the diagonal: Avalonia.Input uses a module listed above it, which is the healthy direction.
21→29 Avalonia.Input uses Avalonia.Reactivepart of a loop✕
Connections
1 pair of types, where a type in Avalonia.Input uses a type in Avalonia.Reactive.
Avalonia.Input uses Avalonia.Reactive, so a change to Avalonia.Reactive can break Avalonia.Input, while a change to Avalonia.Input can't break Avalonia.Reactive.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
72 pairs of types, where a type in Avalonia.Input uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Controls.Presenters uses Avalonia.Interactivity, so a change to Avalonia.Interactivity can break Avalonia.Controls.Presenters, while a change to Avalonia.Controls.Presenters can't break Avalonia.Interactivity.
Position
Below the diagonal: Avalonia.Controls.Presenters uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Presenters uses Avalonia.Utilities, so a change to Avalonia.Utilities can break Avalonia.Controls.Presenters, while a change to Avalonia.Controls.Presenters can't break Avalonia.Utilities.
Position
Below the diagonal: Avalonia.Controls.Presenters uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Presenters uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Controls.Presenters, while a change to Avalonia.Controls.Presenters can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Controls.Presenters uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Presenters uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Controls.Presenters, while a change to Avalonia.Controls.Presenters can't break Avalonia.Media.
Position
Below the diagonal: Avalonia.Controls.Presenters uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Presenters uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Controls.Presenters, while a change to Avalonia.Controls.Presenters can't break Avalonia.Input.
Position
Below the diagonal: Avalonia.Controls.Presenters uses a module listed above it, which is the healthy direction.
22→24 Avalonia.Controls.Presenters uses Avalonia.Controls.Primitivespart of a loop✕
Connections
8 pairs of types, where a type in Avalonia.Controls.Presenters uses a type in Avalonia.Controls.Primitives.
Avalonia.Controls.Presenters uses Avalonia.Controls.Primitives, so a change to Avalonia.Controls.Primitives can break Avalonia.Controls.Presenters, while a change to Avalonia.Controls.Presenters can't break Avalonia.Controls.Primitives.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→26 Avalonia.Controls.Presenters uses Avalonia.Controlspart of a loop✕
Connections
19 pairs of types, where a type in Avalonia.Controls.Presenters uses a type in Avalonia.Controls.
Avalonia.Controls.Presenters uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Controls.Presenters, while a change to Avalonia.Controls.Presenters can't break Avalonia.Controls.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→29 Avalonia.Controls.Presenters uses Avalonia.Reactivepart of a loop✕
Connections
1 pair of types, where a type in Avalonia.Controls.Presenters uses a type in Avalonia.Reactive.
Avalonia.Controls.Presenters uses Avalonia.Reactive, so a change to Avalonia.Reactive can break Avalonia.Controls.Presenters, while a change to Avalonia.Controls.Presenters can't break Avalonia.Reactive.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→30 Avalonia.Controls.Presenters uses Avalonia.Collectionspart of a loop✕
Connections
3 pairs of types, where a type in Avalonia.Controls.Presenters uses a type in Avalonia.Collections.
Avalonia.Controls.Presenters uses Avalonia.Collections, so a change to Avalonia.Collections can break Avalonia.Controls.Presenters, while a change to Avalonia.Controls.Presenters can't break Avalonia.Collections.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
22→32 Avalonia.Controls.Presenters uses Avaloniapart of a loop✕
Connections
32 pairs of types, where a type in Avalonia.Controls.Presenters uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Controls.Presenters uses Avalonia, so a change to Avalonia can break Avalonia.Controls.Presenters, while a change to Avalonia.Controls.Presenters can't break Avalonia.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Avalonia.iOS uses Avalonia.Platform.Storage, so a change to Avalonia.Platform.Storage can break Avalonia.iOS, while a change to Avalonia.iOS can't break Avalonia.Platform.Storage.
Position
Below the diagonal: Avalonia.iOS uses a module listed above it, which is the healthy direction.
Avalonia.iOS uses Avalonia.Input.Platform, so a change to Avalonia.Input.Platform can break Avalonia.iOS, while a change to Avalonia.iOS can't break Avalonia.Input.Platform.
Position
Below the diagonal: Avalonia.iOS uses a module listed above it, which is the healthy direction.
Avalonia.iOS uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.iOS, while a change to Avalonia.iOS can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.iOS uses a module listed above it, which is the healthy direction.
Avalonia.iOS uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.iOS, while a change to Avalonia.iOS can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.iOS uses a module listed above it, which is the healthy direction.
Avalonia.iOS uses Avalonia.Input.TextInput, so a change to Avalonia.Input.TextInput can break Avalonia.iOS, while a change to Avalonia.iOS can't break Avalonia.Input.TextInput.
Position
Below the diagonal: Avalonia.iOS uses a module listed above it, which is the healthy direction.
Avalonia.iOS uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.iOS, while a change to Avalonia.iOS can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.iOS uses a module listed above it, which is the healthy direction.
Avalonia.iOS uses Avalonia.Rendering, so a change to Avalonia.Rendering can break Avalonia.iOS, while a change to Avalonia.iOS can't break Avalonia.Rendering.
Position
Below the diagonal: Avalonia.iOS uses a module listed above it, which is the healthy direction.
Avalonia.iOS uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.iOS, while a change to Avalonia.iOS can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.iOS uses a module listed above it, which is the healthy direction.
Avalonia.iOS uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.iOS, while a change to Avalonia.iOS can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.iOS uses a module listed above it, which is the healthy direction.
Avalonia.iOS uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.iOS, while a change to Avalonia.iOS can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.iOS uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Primitives uses Avalonia.Input.Platform, so a change to Avalonia.Input.Platform can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Input.Platform.
Position
Below the diagonal: Avalonia.Controls.Primitives uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Primitives uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.Controls.Primitives uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Primitives uses Avalonia.Interactivity, so a change to Avalonia.Interactivity can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Interactivity.
Position
Below the diagonal: Avalonia.Controls.Primitives uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Primitives uses Avalonia.Styling, so a change to Avalonia.Styling can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Styling.
Position
Below the diagonal: Avalonia.Controls.Primitives uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Primitives uses Avalonia.Input.TextInput, so a change to Avalonia.Input.TextInput can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Input.TextInput.
Position
Below the diagonal: Avalonia.Controls.Primitives uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Primitives uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Controls.Primitives uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Primitives uses Avalonia.Rendering, so a change to Avalonia.Rendering can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Rendering.
Position
Below the diagonal: Avalonia.Controls.Primitives uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Primitives uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Controls.Primitives uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Primitives uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.Controls.Primitives uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Primitives uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Media.
Position
Below the diagonal: Avalonia.Controls.Primitives uses a module listed above it, which is the healthy direction.
63 pairs of types, where a type in Avalonia.Controls.Primitives uses a type in Avalonia.Input. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Controls.Primitives uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Input.
Position
Below the diagonal: Avalonia.Controls.Primitives uses a module listed above it, which is the healthy direction.
Avalonia.Controls.Primitives uses Avalonia.Controls.Presenters, so a change to Avalonia.Controls.Presenters can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Controls.Presenters.
Position
Below the diagonal: Avalonia.Controls.Primitives uses a module listed above it, which is the healthy direction.
24→25 Avalonia.Controls.Primitives uses Avalonia.Automation.Peerspart of a loop✕
Connections
8 pairs of types, where a type in Avalonia.Controls.Primitives uses a type in Avalonia.Automation.Peers.
Avalonia.Controls.Primitives uses Avalonia.Automation.Peers, so a change to Avalonia.Automation.Peers can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Automation.Peers.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
24→26 Avalonia.Controls.Primitives uses Avalonia.Controlspart of a loop✕
Connections
88 pairs of types, where a type in Avalonia.Controls.Primitives uses a type in Avalonia.Controls. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Controls.Primitives uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Controls.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
24→28 Avalonia.Controls.Primitives uses Avalonia.Datapart of a loop✕
Connections
3 pairs of types, where a type in Avalonia.Controls.Primitives uses a type in Avalonia.Data.
Avalonia.Controls.Primitives uses Avalonia.Data, so a change to Avalonia.Data can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
24→29 Avalonia.Controls.Primitives uses Avalonia.Reactivepart of a loop✕
Connections
2 pairs of types, where a type in Avalonia.Controls.Primitives uses a type in Avalonia.Reactive.
Avalonia.Controls.Primitives uses Avalonia.Reactive, so a change to Avalonia.Reactive can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Reactive.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
24→30 Avalonia.Controls.Primitives uses Avalonia.Collectionspart of a loop✕
Connections
3 pairs of types, where a type in Avalonia.Controls.Primitives uses a type in Avalonia.Collections.
Avalonia.Controls.Primitives uses Avalonia.Collections, so a change to Avalonia.Collections can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.Collections.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
24→32 Avalonia.Controls.Primitives uses Avaloniapart of a loop✕
Connections
133 pairs of types, where a type in Avalonia.Controls.Primitives uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Controls.Primitives uses Avalonia, so a change to Avalonia can break Avalonia.Controls.Primitives, while a change to Avalonia.Controls.Primitives can't break Avalonia.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Avalonia.Automation.Peers uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Automation.Peers, while a change to Avalonia.Automation.Peers can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Automation.Peers uses a module listed above it, which is the healthy direction.
Avalonia.Automation.Peers uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Automation.Peers, while a change to Avalonia.Automation.Peers can't break Avalonia.Input.
Position
Below the diagonal: Avalonia.Automation.Peers uses a module listed above it, which is the healthy direction.
Avalonia.Automation.Peers uses Avalonia.Controls.Primitives, so a change to Avalonia.Controls.Primitives can break Avalonia.Automation.Peers, while a change to Avalonia.Automation.Peers can't break Avalonia.Controls.Primitives.
Position
Below the diagonal: Avalonia.Automation.Peers uses a module listed above it, which is the healthy direction.
25→26 Avalonia.Automation.Peers uses Avalonia.Controlspart of a loop✕
Connections
40 pairs of types, where a type in Avalonia.Automation.Peers uses a type in Avalonia.Controls. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Automation.Peers uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Automation.Peers, while a change to Avalonia.Automation.Peers can't break Avalonia.Controls.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25→32 Avalonia.Automation.Peers uses Avaloniapart of a loop✕
Connections
17 pairs of types, where a type in Avalonia.Automation.Peers uses a type in Avalonia.
Avalonia.Automation.Peers uses Avalonia, so a change to Avalonia can break Avalonia.Automation.Peers, while a change to Avalonia.Automation.Peers can't break Avalonia.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Avalonia.Controls uses Avalonia.Platform.Storage, so a change to Avalonia.Platform.Storage can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Platform.Storage.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
Avalonia.Controls uses Avalonia.Input.Platform, so a change to Avalonia.Input.Platform can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Input.Platform.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
Avalonia.Controls uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
99 pairs of types, where a type in Avalonia.Controls uses a type in Avalonia.Interactivity. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Controls uses Avalonia.Interactivity, so a change to Avalonia.Interactivity can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Interactivity.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in Avalonia.Controls uses a type in Avalonia.Styling. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Controls uses Avalonia.Styling, so a change to Avalonia.Styling can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Styling.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
Avalonia.Controls uses Avalonia.Utilities, so a change to Avalonia.Utilities can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Utilities.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
Avalonia.Controls uses Avalonia.Input.TextInput, so a change to Avalonia.Input.TextInput can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Input.TextInput.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
Avalonia.Controls uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
Avalonia.Controls uses Avalonia.Controls.Platform, so a change to Avalonia.Controls.Platform can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Controls.Platform.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
Avalonia.Controls uses Avalonia.Rendering, so a change to Avalonia.Rendering can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Rendering.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
Avalonia.Controls uses Avalonia.Rendering.Composition.Server, so a change to Avalonia.Rendering.Composition.Server can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Rendering.Composition.Server.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
Avalonia.Controls uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
Avalonia.Controls uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
Avalonia.Controls uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
59 pairs of types, where a type in Avalonia.Controls uses a type in Avalonia.Media. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Controls uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Media.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
205 pairs of types, where a type in Avalonia.Controls uses a type in Avalonia.Input. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Controls uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Input.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
Avalonia.Controls uses Avalonia.Controls.Presenters, so a change to Avalonia.Controls.Presenters can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Controls.Presenters.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
120 pairs of types, where a type in Avalonia.Controls uses a type in Avalonia.Controls.Primitives. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Controls uses Avalonia.Controls.Primitives, so a change to Avalonia.Controls.Primitives can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Controls.Primitives.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
43 pairs of types, where a type in Avalonia.Controls uses a type in Avalonia.Automation.Peers. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Controls uses Avalonia.Automation.Peers, so a change to Avalonia.Automation.Peers can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Automation.Peers.
Position
Below the diagonal: Avalonia.Controls uses a module listed above it, which is the healthy direction.
26→28 Avalonia.Controls uses Avalonia.Datapart of a loop✕
Connections
8 pairs of types, where a type in Avalonia.Controls uses a type in Avalonia.Data.
Avalonia.Controls uses Avalonia.Data, so a change to Avalonia.Data can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Data.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
26→29 Avalonia.Controls uses Avalonia.Reactivepart of a loop✕
Connections
6 pairs of types, where a type in Avalonia.Controls uses a type in Avalonia.Reactive.
Avalonia.Controls uses Avalonia.Reactive, so a change to Avalonia.Reactive can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Reactive.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
26→30 Avalonia.Controls uses Avalonia.Collectionspart of a loop✕
Connections
18 pairs of types, where a type in Avalonia.Controls uses a type in Avalonia.Collections.
Avalonia.Controls uses Avalonia.Collections, so a change to Avalonia.Collections can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Collections.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
26→31 Avalonia.Controls uses Avalonia.Animationpart of a loop✕
Connections
18 pairs of types, where a type in Avalonia.Controls uses a type in Avalonia.Animation.
Avalonia.Controls uses Avalonia.Animation, so a change to Avalonia.Animation can break Avalonia.Controls, while a change to Avalonia.Controls can't break Avalonia.Animation.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
26→32 Avalonia.Controls uses Avaloniapart of a loop✕
Connections
412 pairs of types, where a type in Avalonia.Controls uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Browser uses Avalonia.Platform.Storage, so a change to Avalonia.Platform.Storage can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Platform.Storage.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
Avalonia.Browser uses Avalonia.Input.Platform, so a change to Avalonia.Input.Platform can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Input.Platform.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
Avalonia.Browser uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
Avalonia.Browser uses Avalonia.Interactivity, so a change to Avalonia.Interactivity can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Interactivity.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
Avalonia.Browser uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
Avalonia.Browser uses Avalonia.Input.TextInput, so a change to Avalonia.Input.TextInput can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Input.TextInput.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
Avalonia.Browser uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
Avalonia.Browser uses Avalonia.Controls.Platform, so a change to Avalonia.Controls.Platform can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Controls.Platform.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
Avalonia.Browser uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in Avalonia.Browser uses a type in Avalonia.Platform. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Browser uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
Avalonia.Browser uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
Avalonia.Browser uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Media.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in Avalonia.Browser uses a type in Avalonia.Input. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Browser uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Input.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
Avalonia.Browser uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Browser, while a change to Avalonia.Browser can't break Avalonia.Controls.
Position
Below the diagonal: Avalonia.Browser uses a module listed above it, which is the healthy direction.
27→32 Avalonia.Browser uses Avaloniapart of a loop✕
Connections
20 pairs of types, where a type in Avalonia.Browser uses a type in Avalonia.
Avalonia.Data uses Avalonia.Styling, so a change to Avalonia.Styling can break Avalonia.Data, while a change to Avalonia.Data can't break Avalonia.Styling.
Position
Below the diagonal: Avalonia.Data uses a module listed above it, which is the healthy direction.
Avalonia.Data uses Avalonia.Data.Core, so a change to Avalonia.Data.Core can break Avalonia.Data, while a change to Avalonia.Data can't break Avalonia.Data.Core.
Position
Below the diagonal: Avalonia.Data uses a module listed above it, which is the healthy direction.
Avalonia.Data uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Data, while a change to Avalonia.Data can't break Avalonia.Controls.
Position
Below the diagonal: Avalonia.Data uses a module listed above it, which is the healthy direction.
Avalonia.Reactive uses Avalonia.Data, so a change to Avalonia.Data can break Avalonia.Reactive, while a change to Avalonia.Reactive can't break Avalonia.Data.
Position
Below the diagonal: Avalonia.Reactive uses a module listed above it, which is the healthy direction.
29→32 Avalonia.Reactive uses Avaloniapart of a loop✕
Connections
12 pairs of types, where a type in Avalonia.Reactive uses a type in Avalonia.
Avalonia.Collections uses Avalonia.Utilities, so a change to Avalonia.Utilities can break Avalonia.Collections, while a change to Avalonia.Collections can't break Avalonia.Utilities.
Position
Below the diagonal: Avalonia.Collections uses a module listed above it, which is the healthy direction.
Avalonia.Collections uses Avalonia.Reactive, so a change to Avalonia.Reactive can break Avalonia.Collections, while a change to Avalonia.Collections can't break Avalonia.Reactive.
Position
Below the diagonal: Avalonia.Collections uses a module listed above it, which is the healthy direction.
Avalonia.Animation uses Avalonia.Utilities, so a change to Avalonia.Utilities can break Avalonia.Animation, while a change to Avalonia.Animation can't break Avalonia.Utilities.
Position
Below the diagonal: Avalonia.Animation uses a module listed above it, which is the healthy direction.
Avalonia.Animation uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Animation, while a change to Avalonia.Animation can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Animation uses a module listed above it, which is the healthy direction.
Avalonia.Animation uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Animation, while a change to Avalonia.Animation can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.Animation uses a module listed above it, which is the healthy direction.
Avalonia.Animation uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Animation, while a change to Avalonia.Animation can't break Avalonia.Media.
Position
Below the diagonal: Avalonia.Animation uses a module listed above it, which is the healthy direction.
Avalonia.Animation uses Avalonia.Controls.Primitives, so a change to Avalonia.Controls.Primitives can break Avalonia.Animation, while a change to Avalonia.Animation can't break Avalonia.Controls.Primitives.
Position
Below the diagonal: Avalonia.Animation uses a module listed above it, which is the healthy direction.
Avalonia.Animation uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Animation, while a change to Avalonia.Animation can't break Avalonia.Controls.
Position
Below the diagonal: Avalonia.Animation uses a module listed above it, which is the healthy direction.
Avalonia.Animation uses Avalonia.Reactive, so a change to Avalonia.Reactive can break Avalonia.Animation, while a change to Avalonia.Animation can't break Avalonia.Reactive.
Position
Below the diagonal: Avalonia.Animation uses a module listed above it, which is the healthy direction.
Avalonia.Animation uses Avalonia.Collections, so a change to Avalonia.Collections can break Avalonia.Animation, while a change to Avalonia.Animation can't break Avalonia.Collections.
Position
Below the diagonal: Avalonia.Animation uses a module listed above it, which is the healthy direction.
31→32 Avalonia.Animation uses Avaloniapart of a loop✕
Connections
44 pairs of types, where a type in Avalonia.Animation uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia uses Avalonia.Controls.Platform, so a change to Avalonia.Controls.Platform can break Avalonia, while a change to Avalonia can't break Avalonia.Controls.Platform.
Position
Below the diagonal: Avalonia uses a module listed above it, which is the healthy direction.
Avalonia uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia, while a change to Avalonia can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia uses a module listed above it, which is the healthy direction.
31 pairs of types, where a type in Avalonia uses a type in Avalonia.Data. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia uses Avalonia.Collections, so a change to Avalonia.Collections can break Avalonia, while a change to Avalonia can't break Avalonia.Collections.
Position
Below the diagonal: Avalonia uses a module listed above it, which is the healthy direction.
Avalonia.Headless uses Avalonia.Input.Platform, so a change to Avalonia.Input.Platform can break Avalonia.Headless, while a change to Avalonia.Headless can't break Avalonia.Input.Platform.
Position
Below the diagonal: Avalonia.Headless uses a module listed above it, which is the healthy direction.
Avalonia.Headless uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.Headless, while a change to Avalonia.Headless can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.Headless uses a module listed above it, which is the healthy direction.
Avalonia.Headless uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.Headless, while a change to Avalonia.Headless can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.Headless uses a module listed above it, which is the healthy direction.
Avalonia.Headless uses Avalonia.Controls.Platform, so a change to Avalonia.Controls.Platform can break Avalonia.Headless, while a change to Avalonia.Headless can't break Avalonia.Controls.Platform.
Position
Below the diagonal: Avalonia.Headless uses a module listed above it, which is the healthy direction.
Avalonia.Headless uses Avalonia.Rendering, so a change to Avalonia.Rendering can break Avalonia.Headless, while a change to Avalonia.Headless can't break Avalonia.Rendering.
Position
Below the diagonal: Avalonia.Headless uses a module listed above it, which is the healthy direction.
Avalonia.Headless uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.Headless, while a change to Avalonia.Headless can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.Headless uses a module listed above it, which is the healthy direction.
62 pairs of types, where a type in Avalonia.Headless uses a type in Avalonia.Platform. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Headless uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Headless, while a change to Avalonia.Headless can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Headless uses a module listed above it, which is the healthy direction.
Avalonia.Headless uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Headless, while a change to Avalonia.Headless can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.Headless uses a module listed above it, which is the healthy direction.
Avalonia.Headless uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Headless, while a change to Avalonia.Headless can't break Avalonia.Media.
Position
Below the diagonal: Avalonia.Headless uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in Avalonia.Headless uses a type in Avalonia.Input. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Headless uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Headless, while a change to Avalonia.Headless can't break Avalonia.Input.
Position
Below the diagonal: Avalonia.Headless uses a module listed above it, which is the healthy direction.
Avalonia.Headless uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Headless, while a change to Avalonia.Headless can't break Avalonia.Controls.
Position
Below the diagonal: Avalonia.Headless uses a module listed above it, which is the healthy direction.
47 pairs of types, where a type in Avalonia.Headless uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.LinuxFramebuffer uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.LinuxFramebuffer, while a change to Avalonia.LinuxFramebuffer can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.LinuxFramebuffer uses a module listed above it, which is the healthy direction.
Avalonia.LinuxFramebuffer uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.LinuxFramebuffer, while a change to Avalonia.LinuxFramebuffer can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.LinuxFramebuffer uses a module listed above it, which is the healthy direction.
Avalonia.LinuxFramebuffer uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.LinuxFramebuffer, while a change to Avalonia.LinuxFramebuffer can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.LinuxFramebuffer uses a module listed above it, which is the healthy direction.
Avalonia.LinuxFramebuffer uses Avalonia.Controls.Platform, so a change to Avalonia.Controls.Platform can break Avalonia.LinuxFramebuffer, while a change to Avalonia.LinuxFramebuffer can't break Avalonia.Controls.Platform.
Position
Below the diagonal: Avalonia.LinuxFramebuffer uses a module listed above it, which is the healthy direction.
Avalonia.LinuxFramebuffer uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.LinuxFramebuffer, while a change to Avalonia.LinuxFramebuffer can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.LinuxFramebuffer uses a module listed above it, which is the healthy direction.
Avalonia.LinuxFramebuffer uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.LinuxFramebuffer, while a change to Avalonia.LinuxFramebuffer can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.LinuxFramebuffer uses a module listed above it, which is the healthy direction.
Avalonia.LinuxFramebuffer uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.LinuxFramebuffer, while a change to Avalonia.LinuxFramebuffer can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.LinuxFramebuffer uses a module listed above it, which is the healthy direction.
Avalonia.LinuxFramebuffer uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.LinuxFramebuffer, while a change to Avalonia.LinuxFramebuffer can't break Avalonia.Media.
Position
Below the diagonal: Avalonia.LinuxFramebuffer uses a module listed above it, which is the healthy direction.
Avalonia.LinuxFramebuffer uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.LinuxFramebuffer, while a change to Avalonia.LinuxFramebuffer can't break Avalonia.Input.
Position
Below the diagonal: Avalonia.LinuxFramebuffer uses a module listed above it, which is the healthy direction.
Avalonia.LinuxFramebuffer uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.LinuxFramebuffer, while a change to Avalonia.LinuxFramebuffer can't break Avalonia.Controls.
Position
Below the diagonal: Avalonia.LinuxFramebuffer uses a module listed above it, which is the healthy direction.
Avalonia.LinuxFramebuffer uses Avalonia, so a change to Avalonia can break Avalonia.LinuxFramebuffer, while a change to Avalonia.LinuxFramebuffer can't break Avalonia.
Position
Below the diagonal: Avalonia.LinuxFramebuffer uses a module listed above it, which is the healthy direction.
31 pairs of types, where a type in Avalonia.Native uses a type in Avalonia.Platform.Storage. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Native uses Avalonia.Platform.Storage, so a change to Avalonia.Platform.Storage can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Platform.Storage.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Input.Platform, so a change to Avalonia.Input.Platform can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Input.Platform.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Utilities, so a change to Avalonia.Utilities can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Utilities.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Input.TextInput, so a change to Avalonia.Input.TextInput can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Input.TextInput.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Controls.Platform, so a change to Avalonia.Controls.Platform can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Controls.Platform.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Rendering, so a change to Avalonia.Rendering can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Rendering.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
63 pairs of types, where a type in Avalonia.Native uses a type in Avalonia.Platform. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Native uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in Avalonia.Native uses a type in Avalonia.Media.
The types involved
Avalonia.Native.WindowImpl → Avalonia.Media.Color
Direction
Avalonia.Native uses Avalonia.Media, so a change to Avalonia.Media can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Media.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.OpenGL, so a change to Avalonia.OpenGL can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.OpenGL.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Input.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Automation.Peers, so a change to Avalonia.Automation.Peers can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Automation.Peers.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
Avalonia.Native uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Native, while a change to Avalonia.Native can't break Avalonia.Controls.
Position
Below the diagonal: Avalonia.Native uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in Avalonia.Native uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Wayland.Server.Persistent uses System, so a change to System can break Avalonia.Wayland.Server.Persistent, while a change to Avalonia.Wayland.Server.Persistent can't break System.
Position
Below the diagonal: Avalonia.Wayland.Server.Persistent uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server.Persistent uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.Wayland.Server.Persistent, while a change to Avalonia.Wayland.Server.Persistent can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.Wayland.Server.Persistent uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server.Persistent uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.Wayland.Server.Persistent, while a change to Avalonia.Wayland.Server.Persistent can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.Wayland.Server.Persistent uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server.Persistent uses Avalonia.Input.TextInput, so a change to Avalonia.Input.TextInput can break Avalonia.Wayland.Server.Persistent, while a change to Avalonia.Wayland.Server.Persistent can't break Avalonia.Input.TextInput.
Position
Below the diagonal: Avalonia.Wayland.Server.Persistent uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server.Persistent uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Wayland.Server.Persistent, while a change to Avalonia.Wayland.Server.Persistent can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Wayland.Server.Persistent uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server.Persistent uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Wayland.Server.Persistent, while a change to Avalonia.Wayland.Server.Persistent can't break Avalonia.Input.
Position
Below the diagonal: Avalonia.Wayland.Server.Persistent uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server.Persistent uses Avalonia, so a change to Avalonia can break Avalonia.Wayland.Server.Persistent, while a change to Avalonia.Wayland.Server.Persistent can't break Avalonia.
Position
Below the diagonal: Avalonia.Wayland.Server.Persistent uses a module listed above it, which is the healthy direction.
36→39 Avalonia.Wayland.Server.Persistent uses Avalonia.Wayland.Serverpart of a loop✕
Connections
6 pairs of types, where a type in Avalonia.Wayland.Server.Persistent uses a type in Avalonia.Wayland.Server.
Avalonia.Wayland.Server.Persistent uses Avalonia.Wayland.Server, so a change to Avalonia.Wayland.Server can break Avalonia.Wayland.Server.Persistent, while a change to Avalonia.Wayland.Server.Persistent can't break Avalonia.Wayland.Server.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
36→40 Avalonia.Wayland.Server.Persistent uses Avalonia.Waylandpart of a loop✕
Connections
2 pairs of types, where a type in Avalonia.Wayland.Server.Persistent uses a type in Avalonia.Wayland.
Avalonia.Wayland.Server.Persistent uses Avalonia.Wayland, so a change to Avalonia.Wayland can break Avalonia.Wayland.Server.Persistent, while a change to Avalonia.Wayland.Server.Persistent can't break Avalonia.Wayland.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Avalonia.Win32 uses Avalonia.Platform.Storage, so a change to Avalonia.Platform.Storage can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Platform.Storage.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
Avalonia.Win32 uses Avalonia.Input.Platform, so a change to Avalonia.Input.Platform can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Input.Platform.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
Avalonia.Win32 uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
Avalonia.Win32 uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
Avalonia.Win32 uses Avalonia.Utilities, so a change to Avalonia.Utilities can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Utilities.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
Avalonia.Win32 uses Avalonia.Input.TextInput, so a change to Avalonia.Input.TextInput can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Input.TextInput.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
Avalonia.Win32 uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
Avalonia.Win32 uses Avalonia.Controls.Platform, so a change to Avalonia.Controls.Platform can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Controls.Platform.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
Avalonia.Win32 uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
44 pairs of types, where a type in Avalonia.Win32 uses a type in Avalonia.Platform. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Win32 uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
Avalonia.Win32 uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
Avalonia.Win32 uses Avalonia.OpenGL.Egl, so a change to Avalonia.OpenGL.Egl can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.OpenGL.Egl.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
Avalonia.Win32 uses Avalonia.OpenGL, so a change to Avalonia.OpenGL can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.OpenGL.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in Avalonia.Win32 uses a type in Avalonia.Input. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Win32 uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Input.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
Avalonia.Win32 uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Win32, while a change to Avalonia.Win32 can't break Avalonia.Controls.
Position
Below the diagonal: Avalonia.Win32 uses a module listed above it, which is the healthy direction.
35 pairs of types, where a type in Avalonia.Win32 uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.X11 uses Avalonia.Platform.Storage, so a change to Avalonia.Platform.Storage can break Avalonia.X11, while a change to Avalonia.X11 can't break Avalonia.Platform.Storage.
Position
Below the diagonal: Avalonia.X11 uses a module listed above it, which is the healthy direction.
Avalonia.X11 uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.X11, while a change to Avalonia.X11 can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.X11 uses a module listed above it, which is the healthy direction.
Avalonia.X11 uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.X11, while a change to Avalonia.X11 can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.X11 uses a module listed above it, which is the healthy direction.
Avalonia.X11 uses Avalonia.Input.TextInput, so a change to Avalonia.Input.TextInput can break Avalonia.X11, while a change to Avalonia.X11 can't break Avalonia.Input.TextInput.
Position
Below the diagonal: Avalonia.X11 uses a module listed above it, which is the healthy direction.
Avalonia.X11 uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.X11, while a change to Avalonia.X11 can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.X11 uses a module listed above it, which is the healthy direction.
Avalonia.X11 uses Avalonia.Controls.Platform, so a change to Avalonia.Controls.Platform can break Avalonia.X11, while a change to Avalonia.X11 can't break Avalonia.Controls.Platform.
Position
Below the diagonal: Avalonia.X11 uses a module listed above it, which is the healthy direction.
Avalonia.X11 uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.X11, while a change to Avalonia.X11 can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.X11 uses a module listed above it, which is the healthy direction.
30 pairs of types, where a type in Avalonia.X11 uses a type in Avalonia.Platform. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.X11 uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.X11, while a change to Avalonia.X11 can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.X11 uses a module listed above it, which is the healthy direction.
Avalonia.X11 uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.X11, while a change to Avalonia.X11 can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.X11 uses a module listed above it, which is the healthy direction.
Avalonia.X11 uses Avalonia.OpenGL.Egl, so a change to Avalonia.OpenGL.Egl can break Avalonia.X11, while a change to Avalonia.X11 can't break Avalonia.OpenGL.Egl.
Position
Below the diagonal: Avalonia.X11 uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in Avalonia.X11 uses a type in Avalonia.Input. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.X11 uses Avalonia.Automation.Peers, so a change to Avalonia.Automation.Peers can break Avalonia.X11, while a change to Avalonia.X11 can't break Avalonia.Automation.Peers.
Position
Below the diagonal: Avalonia.X11 uses a module listed above it, which is the healthy direction.
Avalonia.X11 uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.X11, while a change to Avalonia.X11 can't break Avalonia.Controls.
Position
Below the diagonal: Avalonia.X11 uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in Avalonia.X11 uses a type in Avalonia. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Avalonia.Wayland.Server uses System, so a change to System can break Avalonia.Wayland.Server, while a change to Avalonia.Wayland.Server can't break System.
Position
Below the diagonal: Avalonia.Wayland.Server uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.Wayland.Server, while a change to Avalonia.Wayland.Server can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.Wayland.Server uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server uses Avalonia.Threading, so a change to Avalonia.Threading can break Avalonia.Wayland.Server, while a change to Avalonia.Wayland.Server can't break Avalonia.Threading.
Position
Below the diagonal: Avalonia.Wayland.Server uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server uses Avalonia.Rendering, so a change to Avalonia.Rendering can break Avalonia.Wayland.Server, while a change to Avalonia.Wayland.Server can't break Avalonia.Rendering.
Position
Below the diagonal: Avalonia.Wayland.Server uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.Wayland.Server, while a change to Avalonia.Wayland.Server can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.Wayland.Server uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Wayland.Server, while a change to Avalonia.Wayland.Server can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Wayland.Server uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Wayland.Server, while a change to Avalonia.Wayland.Server can't break Avalonia.Input.
Position
Below the diagonal: Avalonia.Wayland.Server uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server uses Avalonia, so a change to Avalonia can break Avalonia.Wayland.Server, while a change to Avalonia.Wayland.Server can't break Avalonia.
Position
Below the diagonal: Avalonia.Wayland.Server uses a module listed above it, which is the healthy direction.
Avalonia.Wayland.Server uses Avalonia.Wayland.Server.Persistent, so a change to Avalonia.Wayland.Server.Persistent can break Avalonia.Wayland.Server, while a change to Avalonia.Wayland.Server can't break Avalonia.Wayland.Server.Persistent.
Position
Below the diagonal: Avalonia.Wayland.Server uses a module listed above it, which is the healthy direction.
39→40 Avalonia.Wayland.Server uses Avalonia.Waylandpart of a loop✕
Connections
1 pair of types, where a type in Avalonia.Wayland.Server uses a type in Avalonia.Wayland.
Avalonia.Wayland.Server uses Avalonia.Wayland, so a change to Avalonia.Wayland can break Avalonia.Wayland.Server, while a change to Avalonia.Wayland.Server can't break Avalonia.Wayland.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
Avalonia.Wayland uses Avalonia.Platform.Storage, so a change to Avalonia.Platform.Storage can break Avalonia.Wayland, while a change to Avalonia.Wayland can't break Avalonia.Platform.Storage.
Position
Below the diagonal: Avalonia.Wayland uses a module listed above it, which is the healthy direction.
Avalonia.Wayland uses Avalonia.Input.Raw, so a change to Avalonia.Input.Raw can break Avalonia.Wayland, while a change to Avalonia.Wayland can't break Avalonia.Input.Raw.
Position
Below the diagonal: Avalonia.Wayland uses a module listed above it, which is the healthy direction.
Avalonia.Wayland uses Avalonia.Platform.Surfaces, so a change to Avalonia.Platform.Surfaces can break Avalonia.Wayland, while a change to Avalonia.Wayland can't break Avalonia.Platform.Surfaces.
Position
Below the diagonal: Avalonia.Wayland uses a module listed above it, which is the healthy direction.
Avalonia.Wayland uses Avalonia.Input.TextInput, so a change to Avalonia.Input.TextInput can break Avalonia.Wayland, while a change to Avalonia.Wayland can't break Avalonia.Input.TextInput.
Position
Below the diagonal: Avalonia.Wayland uses a module listed above it, which is the healthy direction.
Avalonia.Wayland uses Avalonia.Controls.Platform, so a change to Avalonia.Controls.Platform can break Avalonia.Wayland, while a change to Avalonia.Wayland can't break Avalonia.Controls.Platform.
Position
Below the diagonal: Avalonia.Wayland uses a module listed above it, which is the healthy direction.
Avalonia.Wayland uses Avalonia.Rendering.Composition, so a change to Avalonia.Rendering.Composition can break Avalonia.Wayland, while a change to Avalonia.Wayland can't break Avalonia.Rendering.Composition.
Position
Below the diagonal: Avalonia.Wayland uses a module listed above it, which is the healthy direction.
Avalonia.Wayland uses Avalonia.Platform, so a change to Avalonia.Platform can break Avalonia.Wayland, while a change to Avalonia.Wayland can't break Avalonia.Platform.
Position
Below the diagonal: Avalonia.Wayland uses a module listed above it, which is the healthy direction.
Avalonia.Wayland uses Avalonia.Media.Imaging, so a change to Avalonia.Media.Imaging can break Avalonia.Wayland, while a change to Avalonia.Wayland can't break Avalonia.Media.Imaging.
Position
Below the diagonal: Avalonia.Wayland uses a module listed above it, which is the healthy direction.
Avalonia.Wayland uses Avalonia.Input, so a change to Avalonia.Input can break Avalonia.Wayland, while a change to Avalonia.Wayland can't break Avalonia.Input.
Position
Below the diagonal: Avalonia.Wayland uses a module listed above it, which is the healthy direction.
Avalonia.Wayland uses Avalonia.Controls, so a change to Avalonia.Controls can break Avalonia.Wayland, while a change to Avalonia.Wayland can't break Avalonia.Controls.
Position
Below the diagonal: Avalonia.Wayland uses a module listed above it, which is the healthy direction.
Avalonia.Wayland uses Avalonia.Wayland.Server.Persistent, so a change to Avalonia.Wayland.Server.Persistent can break Avalonia.Wayland, while a change to Avalonia.Wayland can't break Avalonia.Wayland.Server.Persistent.
Position
Below the diagonal: Avalonia.Wayland uses a module listed above it, which is the healthy direction.
Avalonia.Wayland uses Avalonia.Wayland.Server, so a change to Avalonia.Wayland.Server can break Avalonia.Wayland, while a change to Avalonia.Wayland can't break Avalonia.Wayland.Server.
Position
Below the diagonal: Avalonia.Wayland uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 56% · Adequate · gated by X1 ·
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
44
High / Critical
A03:2025 — Software Supply Chain Failures
18
High / Critical
A07:2025 — Authentication Failures
7
High / Critical
Roadmap
Immediately resolve the leaked secret in REDACTED and strengthen data protection by vaulting keys and encrypting sensitive columns to eliminate coverage gaps. Next, replace weak password hashing with a proper salted KDF and fixed-time comparison, beginning in MaskedTextBox.cs. Finally, clear the explicit code debt by addressing the 23 file-scoped pragma disables and 24 write-only private fields, starting with VulkanStructs.cs and EmbedSample.Gtk.cs respectively.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Store passwords with a salted KDF — `Microsoft.AspNetCore.Identity.PasswordHasher<T>`, `Rfc2898DeriveBytes` (PBKDF2), or BCrypt/Argon2 — and compare with `CryptographicOperations.FixedTimeEquals`. (A fast/plain hash, or a client-hashed value stored and compared verbatim, is not password storage.) Start in `src/Avalonia.Controls/MaskedTextBox.cs:328`.
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 — 214
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 — 1906
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 — 278
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 7
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 82 of 87 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 87 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, 2351 of 2398 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 7,223 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 6 test source file(s) (.ts, .fs) that it cannot: it parses C# syntax and matches C# test attributes, so a vitest/jest/JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: this repository's test suite spans .NET and JavaScript/TypeScript, and the JavaScript/TypeScript half could not be re-run — unit: measured (0 flaky); integration: measured (0 flaky); other: not included — too large to re-run within its budget; JavaScript/TypeScript (mocha via `npm install --ignore-scripts` (no lockfile) in tests/Avalonia.DesignerSupport.Tests/Remote/HtmlTransport/webapp/): not included — the mocha run in tests/Avalonia.DesignerSupport.Tests/Remote/HtmlTransport/webapp/ produced no per-test report (> simple-test@1.0.0 test). No partial figure is published as if it were the whole: reliability is excluded from the score rather than counted as a near-zero.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the mocha suite in tests/Avalonia.DesignerSupport.Tests/Remote/HtmlTransport/webapp/ was NOT MEASURED: the mocha run in tests/Avalonia.DesignerSupport.Tests/Remote/HtmlTransport/webapp/ produced no per-test report (> simple-test@1.0.0 test). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: /root/.codehealth/sdks/11.0.100-rc.2.26504.105/sdk/11.0.100-rc.2.26504.105/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: android [….
D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'nukebuild/_build.csproj' with message: Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-transport/nuget/v3/index.json.
The proxy tunnel request to proxy 'http://egress:3128/' failed with status code '403'.".
D18 Solution Shape — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The build did not finish within its budget on this run; structural metrics are reported, build/warning status is unknown.
D23 Boundary Type-Coupling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Large codebase (401,738 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can 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"]`.
D30 Dependency Vulnerabilities — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Pkgs.dev.azure.com could not be reached (NU1301: Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-transport/nuget/v3/index.json. The proxy tunnel request to proxy 'http://egress:3128/' failed with status code '403'.). 2 of 3 declared ecosystem(s) (npm,osv) WERE scanned and every vulnerability they reported is included in this result; nuget was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that nuget is free of known-vulnerable dependencies.
D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `REDACTED`, `src/Android/Avalonia.Android/AvaloniaView.cs`, `src/Android/Avalonia.Android/BackPressedCallback.cs`, `src/Android/Avalonia.Android/Platform/AndroidPlatformFeedback.cs`, `src/Android/Avalonia.Android/Platform/AndroidPlatformSettings.cs`, … (+168 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D39 IL Efficiency — 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. `dotnet build` exited 1 with a compiler/MSBuild diagnostic, so there were no assemblies to read IL from. The build itself is D18's row, with the ask; nothing further is charged here.
AXB1 Runtime evidence locked — no reproducible boot — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 3 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
GD1 Unfinished & placeholder code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1 further occurrence(s) are not listed individually; the score already reflects all 41.
IC1 Incompleteness & stubs — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 149 further occurrence(s) are not listed individually; the score already reflects all 189.
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.
X1 Async correctness — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 160 further occurrence(s) are not listed individually; the score already reflects all 200.
X18 Disposal-pattern correctness — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 23 further occurrence(s) are not listed individually; the score already reflects all 63.
X2 Cancellation propagation — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 318 further occurrence(s) are not listed individually; the score already reflects all 358.
X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 30 further occurrence(s) are not listed individually; the score already reflects all 70.
Package restore incomplete — third-party types were unresolved in part of the solution — NuGet restore did not complete for src/Android/Avalonia.Android/Avalonia.Android.csproj, src/iOS/Avalonia.iOS/Avalonia.iOS.csproj, samples/ControlCatalog.Android/ControlCatalog.Android.csproj, samples/ControlCatalog.Browser/ControlCatalog.Browser.csproj, samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj and 6 more, so those projects were analysed with framework references only: every check keyed on a third-party type saw an error type there and reported nothing. Findings on those projects are a lower bound; run `dotnet restore` on them and rescan.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample — it is advisory and cannot weigh a comment against the precise code change it was written to explain.
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.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (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.
C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (5): D19, D21, D22, D24, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
261 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was PhysicalKeyExtensions.ToQwertyKeySymbol at 215. A further 47 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being HeadlessVncFramebufferSource.TranslateKey at 187 — they are counted neither in the figure above nor in this dimension's score. 27 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/Avalonia.Base/Collections/Pooled/ThrowHelper.cs (ThrowHelper.GetArgumentName at 60), src/Avalonia.FreeDesktop.AtSpi/AtSpiNode.RoleMapping.cs (AtSpiNode.ToAtSpiRole at 47), src/Windows/Avalonia.Win32.Automation/AutomationNode.cs (AutomationNode.ToUiaControlType at 45), src/Windows/Avalonia.WinUI/Automation/ControlTypeMap.cs (ControlTypeMap.ToXaml at 42), src/Avalonia.X11/X11Structs.cs (XEvent.ToString at 32), and 22 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 254 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with PhysicalKeyExtensions.ToQwertyKeySymbol (cyclomatic 215), WindowImpl.AppWndProc (cyclomatic 182). — 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 2 together lifts Cyclomatic Complexity from 5.2 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 489 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 7 bodies over 120 down to 120 or less in Cognitive Complexity — start with XamlCompilerTaskExecutor.CompileCore (cognitive 185), WindowImpl.AppWndProc (cognitive 176), ExpressionVariant.GetProperty (cognitive 152). — 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 5.4 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.5 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 82 TooManyMethods finding(s) in God Classes — start with WindowImpl.cs, PooledList.cs, NavigationPage.cs. — One of this dimension's main actionable groups (82 warning-level).
Resolve the 41 MethodTooLong finding(s) in God Classes — start with ColorSpectrum.cs (4), Grid.cs (2), ConnectedAnimation.cs (2). — One of this dimension's main actionable groups (41 warning-level).
Resolve the 39 FileTooLong finding(s) in God Classes — start with Keysyms.cs, UnmanagedMethods.cs, X11Structs.cs. — One of this dimension's main actionable groups (39 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
260 duplicated block group(s) detected. A further 6 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 44 of the 266 are in trees this repository does not ship — vendored, example/demo, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 91 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 19 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with FluentTheme.xaml.cs (2), CompositionHitTestAabbTree.cs (2), StreamGeometryBuilder.cs. — One of this dimension's main actionable groups (19 warning-level).
Resolve the 13 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with TaskStreamPlugin`1.cs (2), RelativePanel.cs (2), ScreenQueries.cs. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 13 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with BindingExpressionVisitor.cs (2), AvaloniaXamlIlQueryTransformer.cs (2), FrugalList.cs. — One of this dimension's main actionable groups (13 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.7 / 10Stronggated by 5 serious findings✓ 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.
Off the main sequence: Avalonia.HarfBuzz(net10.0) · ×5src/HarfBuzz/Avalonia.HarfBuzz/Avalonia.HarfBuzz.csproj:1
What to do
Resolve the 5 Off the main sequence finding(s) in Coupling — start with Avalonia.HarfBuzz.csproj, Avalonia.Dialogs.csproj, Avalonia.Remote.Protocol.csproj. — One of this dimension's main actionable groups (5 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 21 Low cohesion finding(s) in Cohesion (LCOM4) — start with NavigationPageAppearancePage.xaml.cs, TextInputResponder.cs, EmbeddedView.axaml.cs. — One of this dimension's main actionable groups (21 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
7231 test methods: 7167 unit, 64 integration, 0 BDD, 0 e2e.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.9 / 10Adequategated by 1 critical finding✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
21 skipped (17 with a documented reason), 18 zero-assertion, 1 synchronised by a fixed sleep, 3 whose failure is swallowed by a catch-all, 15 mock references across 7223 tests. Measured on the C# suite only — at least 6 test source file(s) (.ts, .fs) went unread, so its test quality is unmeasured and is not in these counts.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 Assertions commented out finding(s) in Test Quality — start with BindingExpressionTests.Negation.cs. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 17 No assertions finding(s) in Test Quality — start with AvaloniaObjectTests_Binding.cs (2), ClassesTests.cs (2), PopupTests.cs (2). — One of this dimension's main actionable groups (17 warning-level).
Resolve the 4 Skipped test finding(s) in Test Quality — start with TrayIconTests.cs (2), StyleTests.cs, CalendarDatePickerTests.cs. — One of this dimension's main actionable groups (4 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 47 packages use a banned license. ★ DEPTH: every package graded here is one this repository's MSBuild projects declare as a direct `PackageReference` (68 declared), and nothing beyond them was reached — this is the DECLARATION-SITE set, NOT the transitive closure. .NET has no lockfile a checkout is guaranteed to carry and this pass grades an unrestored tree, so a banned licence that only a direct dependency's OWN dependencies pull in is outside this verdict, exactly as the JVM arm's declaration-site verdict is.
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.
Top hotspots: src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs (5×182=910); src/Avalonia.X11/X11Window.cs (9×70=630); src/Avalonia.Controls/VirtualizingStackPanel.cs (5×19=95) Repeated repair below the complexity floor: src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs (3 of 5 changes were fixes); src/Avalonia.Base/Media/StreamGeometry.cs (3 of 4 changes were fixes)
Resolve the 15 Hotspot finding(s) in Churn × Complexity Hotspots — start with WindowImpl.AppWndProc.cs, X11Window.cs, VirtualizingStackPanel.cs. — One of this dimension's main actionable groups (15 warning-level).
Resolve the 2 Repeated repair finding(s) in Churn × Complexity Hotspots — start with UnmanagedMethods.cs, StreamGeometry.cs. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.2 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
99 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/Avalonia.Base/Media/PreciseEllipticArcHelper.cs. Counted over 1285 of the 2842 production source files in this repository: 1551 are under the ~2,400-byte size floor this dimension measures over, and the remaining 6 have no attributable history left to measure.
Off-boarding risk: anonymized user #1 · ×9
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
449 deducted debt markers + unmeasured dead symbols across 401738 LoC in the .NET projects (0.5/KLoC) → score 9.0. Dead code not measured: the solution did not load cleanly, so the reference search was skipped.
+ 10 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 62 EmptyCatchBlock finding(s) in Explicit Debt — start with X11Info.cs (6), CompositionGlTexture.cs (5), WaylandTextInputV3.cs (4). — One of this dimension's main actionable groups (62 issue-level).
Resolve the 24 WriteOnlyPrivateField finding(s) in Explicit Debt — start with EmbedSample.Gtk.cs, MethodToCommandConverter.cs, VisualQueryProvider.cs. — One of this dimension's main actionable groups (24 issue-level).
Resolve the 23 FileScopedPragmaDisable finding(s) in Explicit Debt — start with VulkanStructs.cs (3), RenderOptions.cs (2), BrowserSoftwareRenderTarget.cs (2). — One of this dimension's main actionable groups (23 issue-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the solution is laid out in a sensible, conventional structure.
Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.
147 projects, 7562 source files, 572476 hand-written lines of code (401738 production / 170738 test — the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), plus 202 generated (machine-written code — designer, scaffolded and tool-emitted files — excluded from quality), 435 inter-project edges (build status unknown — did not finish).
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The repository's root README gives a strong overview of Avalonia as the cross-platform UI framework for dotnet and its comparison to WPF, plus links to the blog, sponsorships, and an outline covering Getting Started, Visual Studio, JetBrains Rider, Avalonia Packages, Bleeding Edge Builds, Learning, Documentation, Tutorials, Samples, Breaking Changes, Building and Using, Contributing, Code of Conduct, Security, Licence, XPF - cross-platform WPF. The native/Avalonia.Native/README.md is a focused directory README documenting the Objective-C++ COM backend (COM Reference Management + Implementing COM interfaces), with an outline covering COM smart pointer types, thread safety, and the mandatory Inheritance rule. Avalonia.Wayland/README.md documents the Wayland platform's crash-recovery expectations, protocol docs location, and architecture; it is clipped mid-sentence but its outline sections exist (Special considerations, Protocol docs, Architecture). The samples/ControlCatalog/Controls/README.md gives a detailed catalog format guide plus sectioned-scroll vs gallery selection criteria. Avalonia.Generators/README.md explains the C# SourceGenerator for typed x:Name references and includes usage code with an API suppression note. All four documents are strong; the XML-doc coverage is low (0-119) but the visible content is clear and complete. Avalonia's documentation is comprehensive for a framework project: the root README covers what it does, installation, usage, contribution, and licensing; build, debugging, and NuGet packages are detailed in separate files. The architecture/Docs markdown files (e.g., macOS-native, XAML compiler debugging) cover platform-specific details. XML-doc coverage is low across Avalonia projects but high for the Avalonia.Base/.NET assemblies (52-13%); the main gaps are that the root README lacks an overview of what the project does and a usage example, both present in the summary, and there is no architecture/design doc for the framework itself.
Documentation: contradicts the code · ×2docs/api-compat.md
Resolve the 2 Documentation finding(s) in Documentation Quality — start with api-compat.md, index.md. — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
0 naming inconsistencies across 200 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D22 · Internal API ConsistencyExemplary◐ Sampled · advisory
What it measures: Whether the internal API surface is consistent and coherent.
Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Judged by language model at low temperature (0.0-0.1) on deterministically sampled inline comments with surrounding code; findings verified back to sampled comments by substring match. Advisory, sampled.
3 of 104 projects flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
✓ On the Gold path — maintain.
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D27 · Navigability6.9 / 10Adequate✓ Tool-verified
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
68 % of calls cross a namespace and 1 % go through an interface, but 71 % of collaborators are co-located — so following a call takes several hops. Baseline: large — vertical-slice locality expected.
Resolve the 4 Pass-through layer finding(s) in Navigability — start with Sink.cs, AndroidScreens.cs, AvaloniaView.Automation.cs. — One of this dimension's main actionable groups (4 recommendation-level).
Detailed fixes: d27_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
5 finding(s): 0 critical, 5 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 4 High secret finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
45 finding(s): 0 critical, 38 high, 7 medium, 0 low. 28 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. semgrep hit a parse error in 192 file(s) — `REDACTED` (lines 549–553, line 559, lines 565–567, …), `samples/ControlCatalog.Desktop/NativeControls/Mac/EmbedSample.Mac.cs` (lines 43–44, line 57), `samples/ControlCatalog/Controls/SampleInfo.cs` (lines 11–12, line 25, line 57), `samples/ControlCatalog/Models/PageItem.cs` (line 12), `samples/ControlCatalog/Pages/ContentPage/ContentPageFirstLookPage.xaml.cs` (lines 18–34, lines 34–59), … (+187 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. In 153 of those file(s) — `REDACTED`, `samples/ControlCatalog.Desktop/NativeControls/Mac/EmbedSample.Mac.cs`, `samples/ControlCatalog/Controls/SampleInfo.cs`, `samples/ControlCatalog/Models/PageItem.cs`, `samples/ControlCatalog/Pages/NavigationPage/NavigationPageScrollAwarePage.xaml.cs`, … (+148 more) — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them. In 14 of those file(s) — `samples/ControlCatalog/Pages/ContentPage/ContentPageFirstLookPage.xaml.cs`, `src/Avalonia.Base/Media/DrawingBrush.cs`, `src/Avalonia.Base/Rendering/Composition/Server/ServerCustomCompositionVisual.cs`, `src/Avalonia.Base/Utilities/AvaloniaPropertyDictionary.cs`, `src/Avalonia.Controls/Menu.cs`, … (+9 more) — the break is at a TYPE DECLARATION (a C# primary constructor semgrep's grammar cannot parse), so the loss is wider than the named lines: rules scoped to that type see no type to scope to and are blind over its whole body, while rules matching statements keep working there. Absence of a type-scoped finding in those types is not evidence of anything. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 6 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) charged to Static Analysis (SAST) — the other 28 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (31 issue-level, 3 of them charged here).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
13 finding(s): 1 critical, 8 high, 4 medium, 0 low. Partial dependency scan: 2 of 3 declared ecosystem(s) were scanned (npm,osv), and the findings above are real and complete for them. nuget was not scanned (nuget: pkgs.dev.azure.com could not be reached (NU1301: Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10-transport/nuget/v3/index.json. The proxy tunnel request to proxy 'http://egress:3128/' failed with status code '403'.)), so this is not the whole dependency surface and the result is reported at reduced confidence.
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 8 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8). — One of this dimension's main actionable groups (8 issue-level).
Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 2 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
60 of 1291 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/Avalonia.Base/Collections/Pooled/PooledList.cs. Counted over 1291 of the 2842 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 5 Orphaned knowledge finding(s) in Knowledge Freshness — start with PooledList.cs, ThrowHelper.cs, RelativePanel.AttachedProperties.cs. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 55 Orphaned file finding(s) in Knowledge Freshness — start with ManagedFileChooserViewModel.cs, VelocityTracker.cs, AvaloniaXamlIlResourceTransformer.cs. — One of this dimension's main actionable groups (55 recommendation-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 2 Boundary-crossing change coupling finding(s) in Change Coupling — start with DrawingContextProxy.cs, XamlCompilerTaskExecutor.cs. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 7 Change coupling finding(s) in Change Coupling — start with TextEllipsisHelper.cs (2), MouseDevice.cs, ServerCompositionDrawListVisual.cs. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with IBusX11TextInputMethod.cs, FcitxX11TextInputMethod.cs. — One of this dimension's main actionable groups (2 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.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
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. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 113 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.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether 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.
The namespaces Avalonia.Platform.Storage ↔ Avalonia.Platform.Storage.FileIO depend on each other. The lightest dependency in the cycle is Avalonia.Platform.Storage → Avalonia.Platform.Storage.FileIO (Avalonia.Platform.Storage.NoopStorageProvider → Avalonia.Platform.Storage.FileIO.BclStorageProvider, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Avalonia.Base/Platform/Storage/NoopStorageProvider.cs:4
The namespaces Avalonia ↔ Avalonia.Animation ↔ Avalonia.Animation.Animators ↔ Avalonia.Animation.Easings ↔ Avalonia.Automation ↔ Avalonia.Automation.Peers ↔ Avalonia.Automation.Provider ↔ Avalonia.Browser ↔ Avalonia.Browser.Skia ↔ Avalonia.Collections ↔ Avalonia.Controls ↔ Avalonia.Controls.ApplicationLifetimes ↔ Avalonia.Controls.Chrome ↔ Avalonia.Controls.Diagnostics ↔ Avalonia.Controls.Documents ↔ Avalonia.Controls.Embedding ↔ Avalonia.Controls.Generators ↔ Avalonia.Controls.Platform ↔ Avalonia.Controls.Presenters ↔ Avalonia.Controls.Primitives ↔ Avalonia.Controls.Primitives.PopupPositioning ↔ Avalonia.Controls.PullToRefresh ↔ Avalonia.Controls.Selection ↔ Avalonia.Controls.Shapes ↔ Avalonia.Controls.Templates ↔ Avalonia.Controls.Utils ↔ Avalonia.Data ↔ Avalonia.Data.Core ↔ Avalonia.Data.Core.ExpressionNodes ↔ Avalonia.Data.Core.Plugins ↔ Avalonia.Diagnostics ↔ Avalonia.Input ↔ Avalonia.Input.GestureRecognizers ↔ Avalonia.Input.Navigation ↔ Avalonia.Input.Platform ↔ Avalonia.Input.Raw ↔ Avalonia.Input.TextInput ↔ Avalonia.Interactivity ↔ Avalonia.Layout ↔ Avalonia.LogicalTree ↔ Avalonia.Media ↔ Avalonia.Media.Fonts ↔ Avalonia.Media.Fonts.Tables ↔ Avalonia.Media.Fonts.Tables.Cmap ↔ Avalonia.Media.Fonts.Tables.Glyf ↔ Avalonia.Media.Fonts.Tables.Metrics ↔ Avalonia.Media.Fonts.Tables.Name ↔ Avalonia.Media.Imaging ↔ Avalonia.Media.Immutable ↔ Avalonia.Media.TextFormatting ↔ Avalonia.Media.TextFormatting.Unicode ↔ Avalonia.Media.Transformation ↔ Avalonia.OpenGL ↔ Avalonia.OpenGL.Egl ↔ Avalonia.OpenGL.Features ↔ Avalonia.OpenGL.Surfaces ↔ Avalonia.Platform ↔ Avalonia.Platform.Internal ↔ Avalonia.Platform.Surfaces ↔ Avalonia.PropertyStore ↔ Avalonia.Reactive ↔ Avalonia.Rendering ↔ Avalonia.Rendering.Composition ↔ Avalonia.Rendering.Composition.Animations ↔ Avalonia.Rendering.Composition.Drawing ↔ Avalonia.Rendering.Composition.Expressions ↔ Avalonia.Rendering.Composition.HitTesting ↔ Avalonia.Rendering.Composition.Server ↔ Avalonia.Rendering.Composition.Transport ↔ Avalonia.Rendering.SceneGraph ↔ Avalonia.Styling ↔ Avalonia.Styling.Activators ↔ Avalonia.Threading ↔ Avalonia.Utilities ↔ Avalonia.VisualTree ↔ Avalonia.iOS ↔ Avalonia.iOS.Metal depend on each other. The lightest dependency in the cycle is Avalonia → Avalonia.Animation (Avalonia.StyledElement → Avalonia.Animation.Animatable, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Avalonia.Base/StyledElement.cs:8
The namespaces Avalonia.LinuxFramebuffer ↔ Avalonia.LinuxFramebuffer.Output depend on each other. The lightest dependency in the cycle is Avalonia.LinuxFramebuffer.Output → Avalonia.LinuxFramebuffer (Avalonia.LinuxFramebuffer.Output.DrmConnector → Avalonia.LinuxFramebuffer.DrmConnectorType, 4 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:13
The namespaces Avalonia.Android ↔ Avalonia.Android.Platform ↔ Avalonia.Android.Platform.Input ↔ Avalonia.Android.Platform.SkiaPlatform ↔ Avalonia.Android.Platform.Specific.Helpers depend on each other. The lightest dependency in the cycle is Avalonia.Android.Platform.SkiaPlatform → Avalonia.Android.Platform.Input (Avalonia.Android.Platform.SkiaPlatform.TopLevelImpl → Avalonia.Android.Platform.Input.AndroidInputMethod, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs:12
The namespaces Avalonia.Markup.Xaml ↔ Avalonia.Markup.Xaml.XamlIl.Runtime depend on each other. The lightest dependency in the cycle is Avalonia.Markup.Xaml → Avalonia.Markup.Xaml.XamlIl.Runtime (Avalonia.Markup.Xaml.EagerParentStackEnumerator → Avalonia.Markup.Xaml.XamlIl.Runtime.IAvaloniaXamlIlEagerParentStackProvider, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Markup/Avalonia.Markup.Xaml/EagerParentStackEnumerator.cs:2
The namespaces Avalonia.Dialogs ↔ Avalonia.Dialogs.Internal depend on each other. The lightest dependency in the cycle is Avalonia.Dialogs.Internal → Avalonia.Dialogs (Avalonia.Dialogs.Internal.ManagedFileChooserViewModel → Avalonia.Dialogs.ManagedFileDialogOptions, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Avalonia.Dialogs/Internal/ManagedFileChooserViewModel.cs:16
The namespaces Avalonia.FreeDesktop.AtSpi ↔ Avalonia.FreeDesktop.AtSpi.Handlers depend on each other. The lightest dependency in the cycle is Avalonia.FreeDesktop.AtSpi → Avalonia.FreeDesktop.AtSpi.Handlers (Avalonia.FreeDesktop.AtSpi.AtSpiNode → Avalonia.FreeDesktop.AtSpi.Handlers.AtSpiAccessibleHandler, 11 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Avalonia.FreeDesktop.AtSpi/AtSpiNode.cs:12
The namespaces Avalonia.Generators.Common ↔ Avalonia.Generators.Common.Domain ↔ Avalonia.Generators.Compiler depend on each other. The lightest dependency in the cycle is Avalonia.Generators.Common → Avalonia.Generators.Compiler (Avalonia.Generators.Common.XamlXViewResolver → Avalonia.Generators.Compiler.MiniCompiler, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/tools/Avalonia.Generators/Common/XamlXViewResolver.cs:6
The namespaces Avalonia.Markup.Xaml.Loader.CompilerExtensions.Transformers ↔ Avalonia.Markup.Xaml.XamlIl.CompilerExtensions ↔ Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.GroupTransformers ↔ Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers depend on each other. The lightest dependency in the cycle is Avalonia.Markup.Xaml.Loader.CompilerExtensions.Transformers → Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers (Avalonia.Markup.Xaml.Loader.CompilerExtensions.Transformers.XamlSourceInfoValueManipulation → Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers.AvaloniaXamlIlWellKnownTypes, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlAddSourceInfoTransformer.cs:2
The namespaces Avalonia.Native ↔ Avalonia.Native.Interop ↔ Avalonia.Native.Interop.Impl depend on each other. The lightest dependency in the cycle is Avalonia.Native → Avalonia.Native.Interop.Impl (Avalonia.Native.AvaloniaNativeMenuExporter → Avalonia.Native.Interop.Impl.__MicroComIAvnMenuProxy, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Avalonia.Native/AvaloniaNativeMenuExporter.cs:8
The namespaces Avalonia.Vulkan ↔ Avalonia.Vulkan.Interop ↔ Avalonia.Vulkan.UnmanagedInterop depend on each other. The lightest dependency in the cycle is Avalonia.Vulkan.UnmanagedInterop → Avalonia.Vulkan (Avalonia.Vulkan.UnmanagedInterop.VulkanDeviceApi → Avalonia.Vulkan.IVulkanDevice, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Avalonia.Vulkan/UnmanagedInterop/VulkanDeviceApi.cs:12
The namespaces Avalonia.X11 ↔ Avalonia.X11.Dispatching ↔ Avalonia.X11.Screens ↔ Avalonia.X11.Selections ↔ Avalonia.X11.Selections.DragDrop depend on each other. The lightest dependency in the cycle is Avalonia.X11 → Avalonia.X11.Screens (Avalonia.X11.AvaloniaX11Platform → Avalonia.X11.Screens.X11Screens, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Avalonia.X11/X11Platform.cs:23
The namespaces Avalonia.Wayland ↔ Avalonia.Wayland.Server ↔ Avalonia.Wayland.Server.Persistent ↔ Avalonia.Wayland.Server.Transient ↔ Avalonia.Wayland.Server.Transient.Clipboard ↔ Avalonia.Wayland.Server.Transient.Rendering depend on each other. The lightest dependency in the cycle is Avalonia.Wayland → Avalonia.Wayland.Server.Transient (Avalonia.Wayland.WaylandTextInputMethod → Avalonia.Wayland.Server.Transient.IWaylandTextInputV3Events, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Avalonia.Wayland/WindowImpl.TextInput.cs:7
The namespaces Avalonia.Win32 ↔ Avalonia.Win32.Input depend on each other. The lightest dependency in the cycle is Avalonia.Win32 → Avalonia.Win32.Input (Avalonia.Win32.WindowImpl → Avalonia.Win32.Input.WindowsInputPane, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:14
What to do
Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
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.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`IInputElement` declares 25 members: `GotFocus`, `LostFocus`, `KeyDown`, `KeyUp`, `TextInput`, `PointerEntered`, `PointerExited`, `PointerPressed`, `PointerMoved`, `PointerReleased`, `PointerWheelChanged`, `Focusable`, `IsEnabled`, `Cursor`, `IsEffectivelyEnabled`, `IsEffectivelyVisible`, `IsKeyboardFocusWithin`, `IsFocused`, `IsHitTestVisible`, `IsPointerOver`, `Focus`, `KeyBindings`, `AddHandler`, `RemoveHandler`, `RaiseEvent`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/Avalonia.Base/Input/IInputElement.cs:11
`IDrawingContextImpl` declares 28 members: `Transform`, `Clear`, `DrawBitmap`, `DrawBitmap`, `DrawLine`, `DrawGeometry`, `DrawRectangle`, `DrawRegion`, `DrawEllipse`, `DrawGlyphRun`, `CreateLayer`, `PushClip`, `PushClip`, `PushClip`, `PopClip`, `PushLayer`, `PopLayer`, `PushOpacity`, `PopOpacity`, `PushOpacityMask`, `PopOpacityMask`, `PushGeometryClip`, `PopGeometryClip`, `PushRenderOptions`, `PopRenderOptions`, `PushTextOptions`, `PopTextOptions`, `GetFeature`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 28 declarations carry 25 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 25 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/Avalonia.Base/Platform/IDrawingContextImpl.cs:13
`IPlatformRenderInterface` declares 27 members: `CreateEllipseGeometry`, `CreateLineGeometry`, `CreateRectangleGeometry`, `CreateStreamGeometryBuilder`, `CreateGeometryGroup`, `CreateCombinedGeometry`, `BuildGlyphRunGeometry`, `CreateRenderTargetBitmap`, `CreateWriteableBitmap`, `LoadBitmap`, `LoadBitmap`, `LoadWriteableBitmapToWidth`, `LoadWriteableBitmapToHeight`, `LoadWriteableBitmap`, `LoadWriteableBitmap`, `LoadBitmapToWidth`, `LoadBitmapToHeight`, `ResizeBitmap`, `LoadBitmap`, `CreateGlyphRun`, `CreateBackendContext`, `SupportsIndividualRoundRects`, `DefaultAlphaFormat`, `DefaultPixelFormat`, `IsSupportedBitmapPixelFormat`, `SupportsRegions`, `CreateRegion`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 27 declarations carry 24 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 24 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/Avalonia.Base/Platform/IPlatformRenderInterface.cs:15
`INavigation` declares 25 members under just 14 distinct name(s): `NavigationStack`, `ModalStack`, `StackDepth`, `CanGoBack`, `PushAsync`, `PushAsync`, `PushAsync`, `PopAsync`, `PopAsync`, `PopToRootAsync`, `PopToRootAsync`, `PopToPageAsync`, `PopToPageAsync`, `ReplaceAsync`, `ReplaceAsync`, `ReplaceAsync`, `PushModalAsync`, `PushModalAsync`, `PushModalAsync`, `PopModalAsync`, `PopModalAsync`, `PopAllModalsAsync`, `PopAllModalsAsync`, `InsertPage`, `RemovePage`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 25 separate responsibilities: a caller binds to 14 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 25 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — src/Avalonia.Controls/Page/INavigation.cs:14
`ISelectionModel` declares 21 members: `Source`, `SingleSelect`, `SelectedIndex`, `SelectedIndexes`, `SelectedItem`, `SelectedItems`, `AnchorIndex`, `Count`, `IndexesChanged`, `SelectionChanged`, `LostSelection`, `SourceReset`, `BeginBatchUpdate`, `EndBatchUpdate`, `IsSelected`, `Select`, `Deselect`, `SelectRange`, `DeselectRange`, `SelectAll`, `Clear`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/Avalonia.Controls/Selection/ISelectionModel.cs:8
`ITopLevelImpl` declares 24 members: `DesktopScaling`, `Handle`, `ClientSize`, `RenderScaling`, `Surfaces`, `Input`, `Paint`, `Resized`, `ScalingChanged`, `TransparencyLevelChanged`, `PlatformSpecificSceneInfo`, `PlatformSpecificSceneInfoChanged`, `Compositor`, `SetInputRoot`, `PointToClient`, `PointToScreen`, `SetCursor`, `Closed`, `LostFocus`, `CreatePopup`, `SetTransparencyLevelHint`, `TransparencyLevel`, `AcrylicCompensationLevels`, `SetFrameThemeVariant`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/Avalonia.Controls/Platform/ITopLevelImpl.cs:19
`IWindowImpl` declares 31 members: `WindowState`, `WindowStateGetterIsUsable`, `WindowStateChanged`, `SetTitle`, `SetParent`, `SetEnabled`, `GotInputWhenDisabled`, `SetWindowDecorations`, `SetIcon`, `ShowTaskbarIcon`, `CanResize`, `SetCanMinimize`, `SetCanMaximize`, `Closing`, `IsClientAreaExtendedToDecorations`, `ExtendClientAreaToDecorationsChanged`, `NeedsManagedDecorations`, `RequestedDrawnDecorations`, `DrawnDecorationsRequestChanged`, `ExtendedMargins`, `OffScreenMargin`, `BeginMoveDrag`, `BeginResizeDrag`, `Resize`, `Move`, `SetMinMaxSize`, `SetExtendClientAreaToDecorationsHint`, `SetExtendClientAreaTitleBarHeightHint`, `AllowedWindowActions`, `AllowedWindowActionsChanged`, `SetShadowExtents`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/Avalonia.Controls/Platform/IWindowImpl.cs:12
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Where the width is an overload set rather than separate responsibilities, collapse the overloads instead — segregating those relieves no caller.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Do you agree with this assessment?
C1 · Data Protection3.5 / 10Weak✓ Tool-verified
Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.
Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.
What to do
Strengthen data-at-rest protection: vault your keys (Azure Key Vault / AWS KMS / IDataProtector key ring) and encrypt the most sensitive columns (EF HasConversion encryption or provider-native column encryption) — partial coverage still leaves gaps.
Enforce HTTPS (UseHttpsRedirection / RequireHttpsMetadata) so data in transit is always encrypted.
Do you agree with this assessment?
C2 · Access Controls7.0 / 10Strong✓ Tool-verified
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Authorization IS enforced here (by imperative guard methods that throw on violation) — this is NOT a claim that the code is unprotected. What's missing is a NAMED rule set: the guards encode the access rules inline, so the rules can't be listed, reviewed or tested apart from the call sites that apply them. Recommendation, not a defect.
What to do
Name the access rules — give each one a named predicate/policy object your guards consult, so the rule set can be reviewed and unit-tested independently of the call sites that enforce it.
Do you agree with this assessment?
C4 · Data Retention7.5 / 10Strong✓ Tool-verified
Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).
Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.
A retention mechanism is present, but the data-lifecycle is not yet complete — missing: a scheduled purge / cleanup job (PurgeOlderThan / CleanupJob).
What to do
Complete the data-lifecycle story: an expiry limit (a declared maximum age for the stored data — a retention-age setting, or a store-level TTL where your storage offers one), a scheduled purge/cleanup job that enforces it, and a documented retention period covering the personal data.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface. (×38) — src/Avalonia.Base/Media/DrawingGroup.cs:248, src/Avalonia.Base/Media/DrawingGroup.cs:281, src/Avalonia.Base/Styling/ValueStyleQuery.cs:22, …
A placeholder string (" Lorem ipsum.") is still in shipped code — typical of generated boilerplate that was never filled in. — samples/IntegrationTestApp/Pages/AutomationPage.axaml.cs:15
A placeholder string ("Lorem ipsum dolor sit amet, consectetur …") is still in shipped code — typical of generated boilerplate that was never filled in. — samples/RenderDemo/Pages/FormattedTextPage.axaml.cs:24
What to do
Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
`TryCreateDataItemAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/Android/Avalonia.Android/Platform/Specific/Helpers/ClipDataHelper.cs:139
`TryGetFileFromPathAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:43
`TryGetFolderFromPathAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:96
Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored. (×2) — src/Avalonia.Base/Collections/Pooled/ThrowHelper.cs:411, src/Avalonia.Base/Collections/Pooled/ThrowHelper.cs:551
Control only reaches here when `child == current` is false, because the guard on line 892 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test. — src/Avalonia.Base/Input/FocusManager.cs:901
`GetRootOfPopupSubTree` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — src/Avalonia.Base/Input/FocusManager.cs:1152
`PushClipCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Base/Media/DrawingGroup.cs:248
`DrawBitmap` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Base/Media/DrawingGroup.cs:281
`ToString` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Base/Styling/ValueStyleQuery.cs:22
The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently. — src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs:618
`InteropAutomationPeer` has 19 unfinished members out of 22 declared members (methods, properties, indexers and events, whether or not each carries a body) — a scaffolded type that was never implemented. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:15
`BringIntoViewCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:22
`GetAcceleratorKeyCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:23
`GetAccessKeyCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:24
`GetAutomationControlTypeCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:25
`GetAutomationIdCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:26
`GetBoundingRectangleCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:27
`GetClassNameCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:28
`GetLabeledByCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:29
`GetNameCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:30
`GetHelpTextCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:31
`GetPlaceholderTextCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:32
`GetOrCreateChildrenCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:33
`HasKeyboardFocusCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:35
`IsContentElementCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:36
`IsControlElementCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:37
`IsEnabledCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:38
`IsKeyboardFocusableCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:39
`SetFocusCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:40
`ShowContextMenuCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:41
`KeyFromIndex` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Controls/ItemsSourceView.cs:258
`SetDesignerScalingFactor` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/Avalonia.Controls/Platform/PlatformManager.cs:19
Both arms of `handle.SelectionHandleType == SelectionHandleType.Start ? … : …` are `caretBound.BottomLeft`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. — src/Avalonia.Controls/Primitives/TextSelectionCanvas.cs:342
`Invalidate` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/Avalonia.DesignerSupport/Remote/Stubs.cs:82
`ShowDialog` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/Avalonia.DesignerSupport/Remote/Stubs.cs:135
Control only reaches here when `count > 0 && results.Count >= count` is false, because the guard on line 99 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test. — src/Avalonia.FreeDesktop.AtSpi/Handlers/AtSpiCollectionHandler.cs:105
`CreateEmbeddableWindow` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — src/Avalonia.Native/AvaloniaNativePlatform.cs:205
`OnFocusProxyEvent` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/Avalonia.X11/X11WindowModes/InputProxyWindowMode.cs:29
`SetSystemDecorations` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/Headless/Avalonia.Headless/HeadlessWindowImpl.cs:174
What to do
Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.
Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 100 of 104 project(s) that lack one — worth up to 1.9 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
src/tools/Avalonia.Generators/README.md names the project `Avalonia.INamed`, but no project, folder or namespace of that name exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — src/tools/Avalonia.Generators/README.md:3
src/tools/Avalonia.Generators/README.md names the project `Avalonia.NameGenerator`, but no project, folder or namespace of that name exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — src/tools/Avalonia.Generators/README.md:68
What to do
Reconcile the README with reality: src/tools/Avalonia.Generators/README.md names the project `Avalonia.INamed`, but no project, folder or namespace of that name exists; src/tools/Avalonia.Generators/README.md names the project `Avalonia.NameGenerator`, but no project, folder or namespace of that name exists.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Dependabot is configured but does not watch `github-actions`, `npm`, `gitsubmodule` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 1128 use(s) across 407,304 production line(s) (~2.8/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
39 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
`.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×27) — src/Avalonia.Base/Input/AsyncToSyncDataTransferItem.cs:20, src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawingSurface.cs:40, src/Avalonia.Base/Threading/DispatcherOperation.cs:192, …
`.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×5) — src/Avalonia.Base/Media/MediaContext.Compositor.cs:108, src/Avalonia.Controls/TopLevel.cs:619, samples/ControlCatalog.Desktop/NativeControls/Gtk/GtkHelper.cs:33, …
`operation.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — src/Avalonia.Base/Threading/Dispatcher.Invoke.cs:494
`_fence.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — src/Avalonia.Vulkan/Interop/VulkanCommandBuffer.cs:27
`.GetAwaiter() .GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×2) — src/Headless/Avalonia.Headless.XUnit/AvaloniaDelayEnumeratedTheoryTestCase.cs:75, src/Headless/Avalonia.Headless.XUnit/AvaloniaTestCase.cs:74
`_dispatchTask.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — src/Headless/Avalonia.Headless/HeadlessUnitTestSession.cs:238
`Task.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×2) — src/Windows/Avalonia.Win32/OpenGl/WglGdiResourceManager.cs:161, src/Windows/Avalonia.Win32/OpenGl/WglGdiResourceManager.cs:170
What to do
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
Do you agree with this assessment?
R1 · Type Safety9.5 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
What to do
Migrate the remaining .js/.jsx files to TypeScript.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:241 · src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:289 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:241
src/Avalonia.DesignerSupport/Remote/HtmlTransport/webapp/src/Models/Input/PointerPressedEventMessage.ts:6 · src/Avalonia.DesignerSupport/Remote/HtmlTransport/webapp/src/Models/Input/PointerReleasedEventMessage.ts:6 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — src/Avalonia.DesignerSupport/Remote/HtmlTransport/webapp/src/Models/Input/PointerPressedEventMessage.ts:6
src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:113 · src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:113
src/Browser/Avalonia.Browser/webapp/modules/avalonia/screens.ts:82 · src/Browser/Avalonia.Browser/webapp/modules/avalonia/screens.ts:97 — the two spans are one implementation copied and then locally edited — 55 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — src/Browser/Avalonia.Browser/webapp/modules/avalonia/screens.ts:82
src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:97 · src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:120 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:97
src/Browser/Avalonia.Browser/webapp/modules/avalonia/inputQueue.ts:99 · src/Browser/Avalonia.Browser/webapp/modules/avalonia/inputQueue.ts:173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — src/Browser/Avalonia.Browser/webapp/modules/avalonia/inputQueue.ts:99
src/Browser/Avalonia.Browser/webapp/modules/avalonia/nativeControlHost.ts:32 · src/Browser/Avalonia.Browser/webapp/modules/avalonia/nativeControlHost.ts:42 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/Browser/Avalonia.Browser/webapp/modules/avalonia/nativeControlHost.ts:32
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
getCaretCoordinates has cyclomatic complexity 13 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/Browser/Avalonia.Browser/webapp/modules/avalonia/caretHelper.ts:3
tryGetReadableDataItemValueAsync has cyclomatic complexity 12 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:214
Do you agree with this assessment?
R3 · Large Files9.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts has 486 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage2.3 / 10Critical✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×30) — src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:1, src/Browser/Avalonia.Browser/webapp/modules/avalonia/inputQueue.ts:1, src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling3.4 / 10Weak✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.
test ✓ · lint ✗ · typecheck ✗ — read from this repository's REDACTED scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add eslint and `tsc --noEmit` as REDACTED scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code9.8 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
1 file(s) (~94 LoC) were excluded from dead-code analysis. This package DOES declare main/module/exports — but every declared target is missing from the scanned tree, which is what a build-output entry (dist/, lib/, out/) looks like before the package is built. Point a declared target at the source entry, or build the package before scanning, so reachability can follow it. — tests/Avalonia.DesignerSupport.Tests/Remote/HtmlTransport/webapp
Unreachable from the 5 application, 1 tooling and 1 test entry point(s) detected in this repo. Nothing this repository declares compiles or type-checks these files, so a wrong deletion here would raise no compile error — gate removals on `npm test`, which loads the modules, and note that it only covers what it exercises. An undetected custom entry would make these reachable.
no import path from any entry point (5 application, 1 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make — src/Browser/Avalonia.Browser/webapp/build.js
Nothing ultimately consumes this binding: its only referrer is the re-export in src/Browser/Avalonia.Browser/webapp/modules/storage.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/Browser/Avalonia.Browser/webapp/modules/storage.ts in the same commit, or the barrel will import a name that no longer exists. — src/Browser/Avalonia.Browser/webapp/modules/storage/storageProvider.ts:13
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2)
Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Security — Cryptographic hygiene (weak hash/cipher, password key-derivation). This codebase has no web surface, so transport/header/cookie/CSRF controls are N/A and only crypto is scored.
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.
`MaskProvider.PasswordChar != PasswordChar` checks a password against the stored one in plaintext, so the store holds the password itself and whoever reads it holds every account. Store a salted KDF hash (PBKDF2/scrypt/Argon2/bcrypt) and verify by deriving again. — src/Avalonia.Controls/MaskedTextBox.cs:328
MD5/SHA1 is constructed 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+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses. (×2) — src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:163, src/Avalonia.Remote.Protocol/MetsysBson.cs:474
What to do
Store passwords with a salted KDF — `Microsoft.AspNetCore.Identity.PasswordHasher<T>`, `Rfc2898DeriveBytes` (PBKDF2), or BCrypt/Argon2 — and compare with `CryptographicOperations.FixedTimeEquals`. (A fast/plain hash, or a client-hashed value stored and compared verbatim, is not password storage.) Start in `src/Avalonia.Controls/MaskedTextBox.cs:328`.
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 (`System.IO.Hashing.XxHash64`/`Crc32`) where it only derives an identifier such as a cache key or a mutex name. This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:163` (SHA1), `src/Avalonia.Remote.Protocol/MetsysBson.cs:474` (MD5). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Do you agree with this assessment?
X1 · Async correctness3.5 / 10Weak✓ Tool-verified
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout. (×3) — src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin`1.cs:42, src/Avalonia.Base/Threading/DispatcherOperation.cs:380, src/Avalonia.DesignerSupport/Remote/RemoteDesignerEntryPoint.cs:121
Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process. (×13) — src/Avalonia.Base/Input/AsyncToSyncDataTransferItem.cs:20, src/Avalonia.Base/Media/MediaContext.Compositor.cs:108, src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawingSurface.cs:40, …
`async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained. (×15) — src/Avalonia.Controls.ColorPicker/ColorSlider/ColorSlider.cs:91, src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1049, src/Avalonia.Controls/Expander.cs:221, …
`File.ReadAllText` blocks the thread on I/O while `File.ReadAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin. — src/Avalonia.DesignerSupport/Remote/FileWatcherTransport.cs:75
`WaitHandle.WaitOne` parks the thread until another thread signals it — inside a method that is already `async`, the wait should be awaitable (a `TaskCompletionSource`, `SemaphoreSlim.WaitAsync`, or `WaitHandle` bridged with `Task.Factory.FromAsync`). — REDACTED:201
`MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin. (×7) — src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:410, src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:416, src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:442, …
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader3.5 / 10Weak✓ Tool-verified
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
`length` is read from the stream being parsed at line 1295 (`ReadInt32`), then read in bulk from that same stream at line 1304 — and nowhere in this method is `length` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). A file the caller did not write therefore chooses the size directly: a value near `int.MaxValue` allocates until the process dies, and a value that overflows the cast to `int` goes negative and throws out of a parser whose failure path was written for malformed input, not for hostile input. Bound `length` against the bytes actually remaining in the stream before spending it. — src/Avalonia.Remote.Protocol/MetsysBson.cs:1304
What to do
Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
`meter` is a `Meter`, which implements `IDisposable`, and it is created here (line 21). Every use of it in `InitMetrics` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var meter = …;`), which releases it at the end of the scope on every path including a throw. — src/Avalonia.Base/Diagnostics/Diagnostic.Metrics.cs:21
`_asyncDataTransfer` is never created by `AsyncToSyncDataTransfer` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 44). Its declared type `IAsyncDataTransfer` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Base/Input/AsyncToSyncDataTransfer.cs:44
`PlatformImpl` is never created by `Cursor` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 65). Its declared type `ICursorImpl` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Base/Input/Cursor.cs:65
`dataTransfer` is never created by `SyncToAsyncDataTransfer` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 42). Its declared type `IDataTransfer` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Base/Input/SyncToAsyncDataTransfer.cs:42
`PlatformTypeface` is never created by `GlyphTypeface` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 1153). Its declared type `IPlatformTypeface` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Base/Media/GlyphTypeface.cs:1153
`PlatformImpl` is never created by `RenderTargetBitmap` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 88). Its declared type `IRef` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Base/Media/Imaging/RenderTargetBitmap.cs:88
`PlatformImpl` is never created by `ImmediateDrawingContext` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 365). Its declared type `IDrawingContextImpl` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Base/Media/ImmediateDrawingContext.cs:365
`builder` is never created by `BuilderWrapper` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 118). Its declared type `IStreamGeometryBuilder` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Base/Media/StreamGeometry.cs:118
`_context` is never created by `StreamGeometryContext` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 100). Its declared type `IGeometryContext` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Base/Media/StreamGeometryContext.cs:100
`CompositingRenderer` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_recorder` itself (line 22), which makes that instance its own. But `_recorder` is named in none of the methods the disposal search covered: `Dispose` (line 304), `Stop` (line 294) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_recorder?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/Avalonia.Base/Rendering/Composition/CompositingRenderer.cs:22
`BatchStreamPoolBase` declares a finalizer (line 162), but nothing in the type is unmanaged: no `IntPtr`/`UIntPtr` or pointer field, no `SafeHandle`, no `HandleRef`, no `extern`/`DllImport` member and no `Marshal`/`GCHandle`/`NativeMemory` use. A finalizer can only release what the garbage collector cannot, so on a purely-managed type it releases nothing and costs something: every instance is put on the finalizer queue, survives at least one extra collection, and is then finalized on a thread that is NOT the disposing one — where the managed objects it touches may already have been finalized themselves. Delete the finalizer (and the `GC.SuppressFinalize` that exists to defuse it); if a handle is added later, wrap it in a `SafeHandle`, which brings its own correct finalization. — src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamArrayPool.cs:162
`cts` is a `CancellationTokenSource`, which implements `IDisposable`, and it is created here (line 163). Every use of it in `Wait` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var cts = …;`), which releases it at the end of the scope on every path including a throw. — src/Avalonia.Base/Threading/DispatcherOperation.cs:163
`cts` is a `CancellationTokenSource`, which implements `IDisposable`, and it is created here (line 339). Every use of it in `CreateCancelledToken` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var cts = …;`), which releases it at the end of the scope on every path including a throw. — src/Avalonia.Base/Threading/DispatcherOperation.cs:339
`_enumerator` is never created by `EnumeratorAsyncWrapper` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 44). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Base/Utilities/AsyncEnumerableHelper.cs:44
`Ref` declares a finalizer (line 141), but nothing in the type is unmanaged: no `IntPtr`/`UIntPtr` or pointer field, no `SafeHandle`, no `HandleRef`, no `extern`/`DllImport` member and no `Marshal`/`GCHandle`/`NativeMemory` use. A finalizer can only release what the garbage collector cannot, so on a purely-managed type it releases nothing and costs something: every instance is put on the finalizer queue, survives at least one extra collection, and is then finalized on a thread that is NOT the disposing one — where the managed objects it touches may already have been finalized themselves. Delete the finalizer (and the `GC.SuppressFinalize` that exists to defuse it); if a handle is added later, wrap it in a `SafeHandle`, which brings its own correct finalization. — src/Avalonia.Base/Utilities/Ref.cs:141
`br` is a `BinaryReader`, which implements `IDisposable`, and it is created here (line 45). Every use of it in `AvaloniaResources` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var br = …;`), which releases it at the end of the scope on every path including a throw. — src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.Helpers.cs:45
`ClassicDesktopStyleApplicationLifetime` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_cts` itself (line 22), which makes that instance its own. But `_cts` is named in none of the methods the disposal search covered: `Dispose` (line 168) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_cts?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:22
`cts` is a `CancellationTokenSource`, which implements `IDisposable`, and it is created here (line 19). Every use of it in `Run` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var cts = …;`), which releases it at the end of the scope on every path including a throw. — src/Avalonia.Controls/DesktopApplicationExtensions.cs:19
`cts` is a `CancellationTokenSource`, which implements `IDisposable`, and it is created here (line 37). Every use of it in `Run` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var cts = …;`), which releases it at the end of the scope on every path including a throw. — src/Avalonia.Controls/DesktopApplicationExtensions.cs:37
`_cleanup` is declared `IDisposable` and nothing more, and every assignment to it takes a constructor parameter — so `PopupOpenState` can do exactly one thing with it, which is the release performed here (line 1137), and it is the only reference left that can perform it. That release is the tail of an unprotected sequence: `.Dispose()` runs first (line 1135), and nothing in `Dispose` catches it. A single throw from that call skips the release entirely — and because a bare `IDisposable` carries no state to inspect and no second holder to fall back on, whatever it represents (a lock taken for this instance, a semaphore lease, a scope) is then held for the remaining lifetime of the process, with nothing left that could ever give it back. Wrap the calls that precede it in a `try` and move the release into the `finally`, so the one statement that must happen is the one that always happens. — src/Avalonia.Controls/Primitives/Popup.cs:1137
`textLayout` is a `TextLayout`, which implements `IDisposable`, and it is created here (line 2756). Every use of it in `MeasureOverride` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var textLayout = …;`), which releases it at the end of the scope on every path including a throw. — src/Avalonia.Controls/TextBox.cs:2756
`textLayout` is a `TextLayout`, which implements `IDisposable`, and it is created here (line 2772). Every use of it in `MeasureOverride` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var textLayout = …;`), which releases it at the end of the scope on every path including a throw. — src/Avalonia.Controls/TextBox.cs:2772
`HtmlWebSocketTransport` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_wakeup` itself (line 27), which makes that instance its own. But `_wakeup` is named in none of the methods the disposal search covered: `Dispose` (line 210) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_wakeup?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — REDACTED:27
`SimpleWebSocket` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_receiveFrameStream` itself (line 264), which makes that instance its own. But `_receiveFrameStream` is named in none of the methods the disposal search covered: `Dispose` (line 283) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_receiveFrameStream?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:264
`SimpleWebSocket` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_receiveMessageStream` itself (line 265), which makes that instance its own. But `_receiveMessageStream` is named in none of the methods the disposal search covered: `Dispose` (line 283) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_receiveMessageStream?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:265
`GlContext` is never created by `CompositionGlContext` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 67). Its declared type `IGlContext` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.OpenGL/Composition/CompositionGlContext.cs:67
`_compositionContext` is never created by `OpenGlControlBaseResources` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 135). Its declared type `ICompositionGlContext` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.OpenGL/Controls/OpenGlControlResources.cs:135
`_restoreContext` is declared `IDisposable` and nothing more, and every assignment to it takes a constructor parameter — so `Session` can do exactly one thing with it, which is the release performed here (line 176), and it is the only reference left that can perform it. That release is the tail of an unprotected sequence: `_context.GlInterface.Flush()` runs first (line 175), and nothing in `Dispose` catches it. A single throw from that call skips the release entirely — and because a bare `IDisposable` carries no state to inspect and no second holder to fall back on, whatever it represents (a lock taken for this instance, a semaphore lease, a scope) is then held for the remaining lifetime of the process, with nothing left that could ever give it back. Wrap the calls that precede it in a `try` and move the release into the `finally`, so the one statement that must happen is the one that always happens. — src/Avalonia.OpenGL/Egl/EglGlPlatformImageSurfaceBase.cs:176
`_restoreContext` is declared `IDisposable` and nothing more, and every assignment to it takes a constructor parameter — so `Session` can do exactly one thing with it, which is the release performed here (line 129), and it is the only reference left that can perform it. That release is the tail of an unprotected sequence: `_display.EglInterface.WaitNative(EglConsts.EGL_CORE_NATIVE_ENGINE)` runs first (line 126), and nothing in `Dispose` catches it. A single throw from that call skips the release entirely — and because a bare `IDisposable` carries no state to inspect and no second holder to fall back on, whatever it represents (a lock taken for this instance, a semaphore lease, a scope) is then held for the remaining lifetime of the process, with nothing left that could ever give it back. Wrap the calls that precede it in a `try` and move the release into the `finally`, so the one statement that must happen is the one that always happens. — src/Avalonia.OpenGL/Egl/EglGlPlatformSurfaceBase.cs:129
`BsonStreamTransportConnection` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_outputBlock` itself (line 19), which makes that instance its own. But `_outputBlock` is named in none of the methods the disposal search covered: `Dispose` (line 36) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_outputBlock?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/Avalonia.Remote.Protocol/BsonStreamTransport.cs:19
`_conn` is never created by `TransportConnectionWrapper` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 33). Its declared type `IAvaloniaRemoteTransportConnection` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Remote.Protocol/TransportConnectionWrapper.cs:33
`_fb` is never created by `FramebufferProxy` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 220). Its declared type `ILockedFramebuffer` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Headless/Avalonia.Headless/HeadlessWindowImpl.cs:220
`_export` is never created by `XdgForeignPortalParentLease` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 165). Its declared type `IWaylandXdgTopLevelExport` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Wayland/WindowImpl.cs:165
`ManagedLoopFrame` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_internalTokenSource` itself (line 229), which makes that instance its own. But `_internalTokenSource` is named in none of the methods the disposal search covered: `Dispose` (line 278) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_internalTokenSource?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/Avalonia.X11/Dispatching/GlibDispatcherImplBase.cs:229
`_clearContext` is declared `IDisposable` and nothing more, and every assignment to it takes a constructor parameter — so `Session` can do exactly one thing with it, which is the release performed here (line 93), and it is the only reference left that can perform it. That release is the tail of an unprotected sequence: `_context.Glx.WaitX()` runs first (line 92), and nothing in `Dispose` catches it. A single throw from that call skips the release entirely — and because a bare `IDisposable` carries no state to inspect and no second holder to fall back on, whatever it represents (a lock taken for this instance, a semaphore lease, a scope) is then held for the remaining lifetime of the process, with nothing left that could ever give it back. Wrap the calls that precede it in a `try` and move the release into the `finally`, so the one statement that must happen is the one that always happens. — src/Avalonia.X11/Glx/GlxGlPlatformSurface.cs:93
`eventWaiter` is never created by `SelectionReadSession` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 21). Its declared type `IXEventWaiter` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.X11/Selections/SelectionReadSession.cs:21
`FramebufferToplevelImpl` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_inputQueue` itself (line 19), which makes that instance its own. But `_inputQueue` is named in none of the methods the disposal search covered: `Dispose` (line 37) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_inputQueue?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs:19
`inner` is never created by `MtlEventSemaphore` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 354). Its declared type `IAvnMTLSharedEvent` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Native/AvaloniaNativeGlPlatformGraphics.cs:354
`_factory` is never created by `AvaloniaNativePlatform` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 192). Its declared type `IAvaloniaNativeFactory` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Native/AvaloniaNativePlatform.cs:192
`texture` is never created by `ImportedTexture` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 146). Its declared type `IAvnMetalTexture` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — src/Avalonia.Native/Metal.cs:146
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 26/383 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
No CancellationToken parameter — this work can't be stopped early once started. (×37) — REDACTED:278, REDACTED:398, REDACTED:416, …
No CancellationToken parameter — the body observes an ambient token instead (a field or a context object), so the work does stop on cancellation, but a caller cannot cancel this call independently of the owner that created that token. (×2) — src/Avalonia.Controls/Animation/ConnectedAnimation.cs:256, src/Avalonia.Controls/Expander.cs:221
What to do
Thread a CancellationToken through async methods so work stops promptly on cancellation.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.
The guard on line 34 rejects `name` and line 36 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(name)` is true of a value that is NOT null: it is satisfied by an EMPTY `name`, and on that path `name` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. — src/Avalonia.Base/Media/FontFamily.cs:36
The guard on line 1111 rejects `maxTextWidths` and line 1113 reports that rejection as `ArgumentNullException` — but the condition's own test `maxTextWidths.Length <= 0` is true of a value that is NOT null: it is satisfied by an EMPTY `maxTextWidths`, and on that path `maxTextWidths` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. — src/Avalonia.Base/Media/FormattedText.cs:1113
What to do
Each finding names the throw and the test in its own condition that is true of a NON-null value. Confirm from the two, then throw the exception that describes what was actually wrong: `ArgumentException` for a value that arrived empty, or the .NET 8 helpers that spell the whole guard in one line and pick the type for you — `ArgumentException.ThrowIfNullOrEmpty(s)` / `ThrowIfNullOrWhiteSpace(s)` for strings, `ArgumentNullException.ThrowIfNull(x)` followed by `ArgumentOutOfRangeException.ThrowIfZero(x.Count)` for a collection. Splitting the two conditions is usually clearer than picking one exception for both: they are different failures and the caller may want to handle them differently.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element7.1 / 10Strong✓ Tool-verified
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
This loop runs once per element of `options`, and the statement it guards acts on the element it is on — `options[j]`. The test deciding whether that statement runs does not: `options[i] is { } option` reads `options[i]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out. — samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml.cs:148
What to do
Each finding names the test and the statement it guards, which index the same collection at two different subscripts — one fixed, one the loop variable. Confirm from the two, then decide which subscript the test meant. If it was meant to be per-element, give it the loop variable so each element is judged on itself. If it really is one answer for the whole collection, hoist the test OUT of the loop, where a reader can see it is asked once and where it is not re-evaluated on every pass — leaving it inside, reading a fixed element, is the one arrangement that cannot be right under either reading.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×26) — nukebuild/BuildTasksPatcher.cs:52, nukebuild/BuildTasksPatcher.cs:142, nukebuild/Helpers.cs:18, …
`catch (RenderTargetNotReadyException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×2) — src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs:174, src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs:226
`catch (RenderTargetCorruptedException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×2) — src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs:179, src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs:231
`catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×4) — src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs:1108, src/Avalonia.Dialogs/Internal/BclMountedVolumeInfoProvider.cs:26, src/Avalonia.FreeDesktop/DBusMenuExporter.cs:118, …
An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else). (×6) — src/Avalonia.OpenGL/Composition/CompositionGlTexture.cs:111, src/Avalonia.OpenGL/Composition/CompositionGlTexture.cs:122, src/Avalonia.OpenGL/Composition/CompositionGlTexture.cs:132, …
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.
Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `REDACTED` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
This method contradicts itself about `device`: line 118 writes `device?.Dispose`, which says `device` can be null, but line 108 then dereferences it directly as `device.WaitForCommitCompletion` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `device` truly cannot be null here, the `?.` is misleading. Settle it one way — test `device` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — src/Windows/Avalonia.Win32/DComposition/DirectCompositionConnection.cs:108
53/79 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
~0.9 `!` suppressions per 1k syntax nodes — 1186 suppression(s) across the 1367606 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.
What to do
Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
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 — 4 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 30 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Repo shows no audit-logging mechanism (IAuditable, an immutable audit log, an EF SaveChanges interceptor) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 37 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 user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC7 A11y enforcement — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AX1 Captive dependencies — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
D11 Test Reliability — Test reliability not measured — polyglot suite, one half not re-run
D12 Dependency Hygiene — Dependency hygiene not measured
D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
D25 ADR Conformance — no ADRs to check
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 173 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D39 IL Efficiency — IL not measured — the target did not build
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 dependency cycles — architectural integrity not assessed
D8 Code Coverage — Coverage NOT MEASURED: the .NET half could not be measured — the repository runs its tests on Microsoft.Testing.Platform and wires up no coverage extension for it; the JavaScript/TypeScript half could not be measured — the mocha suite in tests/Avalonia.DesignerSupport.Tests/Remote/HtmlTransport/webapp/ ran and not one test passed (> simple-test@1.0.0 test), so the coverage report describes the failed run, not the code. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 41 value object(s); a Domain/Aggregates/ValueObjects layer
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — 2 mutating command handler(s)/consumer(s) detected and 4 handler method(s) walked, but no persistent write was recognised in any of them — idempotency not assessed
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
P8 Schema migrations — no EF Core usage detected
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (Cobertura — `dotnet test --collect:"XPlat Code Coverage"` with a `coverlet.collector` PackageReference) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R5 Dependency Freshness — uses a bun lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X6 Hand-rolled structured-format parsing — 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.
EmptyCatchBlock nukebuild/BuildTasksPatcher.cs:52— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock nukebuild/BuildTasksPatcher.cs:142— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock nukebuild/Helpers.cs:18— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock samples/ControlCatalog/Pages/DialogsPage.xaml.cs:55— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock samples/ControlCatalog/Pages/OpenGl/OpenGlInteropPage.xaml.cs:112— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock samples/GpuInterop/D3DDemo/D3D11Swapchain.cs:115— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock samples/WinUIEmbedSample/EmbeddedView.axaml.cs:78— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Android/Avalonia.Android/Platform/AndroidLauncher.cs:34— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Android/Avalonia.Android/Platform/AndroidLauncher.cs:35— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Android/Avalonia.Android/Platform/Storage/AndroidStorageItem.cs:629— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Base/Data/Core/ExpressionNodes/LogicalNotNode.cs:61— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Base/Data/Core/Plugins/AvaloniaPropertyAccessorPlugin.cs:127— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Base/Data/Core/Plugins/InpcPropertyAccessorPlugin.cs:183— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Base/Data/Core/Plugins/MethodAccessorPlugin.cs:60— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Base/Data/Core/Plugins/ReflectionMethodAccessorPlugin.cs:205— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Base/Platform/StandardAssetLoader.cs:265— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Base/Platform/Storage/FileIO/BclStorageItem.cs:82— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Base/Rendering/Composition/Server/ServerCompositor.cs:160— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Controls.ColorPicker/ColorPreviewer/ColorPreviewer.cs:122— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.DesignerSupport/Remote/PreviewerWindowingPlatform.cs:35— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.DesignerSupport/Remote/RemoteDesignerEntryPoint.cs:234— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Dialogs/Internal/ManagedFileChooserViewModel.cs:361— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Native/AvaloniaNativeGlPlatformGraphics.cs:371— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Native/AvaloniaNativePlatform.cs:146— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock src/Avalonia.Native/AvaloniaNativePlatform.cs:160— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
WriteOnlyPrivateField samples/ControlCatalog.Desktop/NativeControls/Gtk/EmbedSample.Gtk.cs:12— private Process? _mplayer — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Avalonia.Base/Data/Converters/MethodToCommandConverter.cs:23— private WeakPropertyChangedProxy? weakPropertyChanged — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Avalonia.Base/Platform/VisualQueryProvider.cs:8— private Visual _visual — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Avalonia.Base/Rendering/Composition/Animations/KeyFrameAnimationInstance.cs:23— private AnimationStopBehavior _stopBehavior — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Avalonia.Controls/ContextMenu.cs:83— private IInputElement? _previousFocus — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Avalonia.Controls/ItemsControl.cs:89— private ItemsPresenter? _itemsPresenter — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Avalonia.Controls/TextBox.cs:396— private int _currentClickCount — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Avalonia.Controls/Window.cs:223— private Size _maxPlatformClientSize — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Avalonia.Native/AvaloniaNativeDragSource.cs:13— private IAvaloniaNativeFactory _factory — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Avalonia.Native/MacOSMountedVolumeInfoProvider.cs:13— private IDisposable _disposable — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Avalonia.Native/PopupImpl.cs:63— private PopupImpl _parent — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Avalonia.Wayland/Server/Persistent/WaylandBitmapCursor.cs:29— private WaylandConnection? _connection — assigned 2 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Headless/Avalonia.Headless/HeadlessWindowImpl.cs:29— private HeadlessWindowImpl? _popupParent — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlRootObjectScopeTransformer.cs:30— private AvaloniaXamlIlWellKnownTypes _types — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Skia/Avalonia.Skia/Gpu/OpenGl/GlSkiaExternalObjectsFeature.cs:86— private GlSkiaGpu _gpu — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Skia/Avalonia.Skia/Gpu/Vulkan/VulkanSkiaExternalObjectsFeature.cs:13— private IVulkanPlatformGraphicsContext _context — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Windows/Avalonia.Win32/DirectX/DxgiRenderTarget.cs:19— private DxgiConnection _connection — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Windows/Avalonia.Win32/OpenGl/Angle/SwapChainGlSurface.cs:148— private IntPtr _swapChain3Ptr — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/Windows/Avalonia.Win32/SimpleWindow.cs:14— private string s_className — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/iOS/Avalonia.iOS/Eagl/LayerFbo.cs:18— private CAEAGLLayer _layer — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField src/iOS/Avalonia.iOS/NativeControlHostImpl.cs:68— private IPlatformHandle? _child — assigned 2 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField tests/Avalonia.Base.UnitTests/Media/TextFormatting/BiDiClassTests.cs:12— private ITestOutputHelper _outputHelper — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField tests/Avalonia.Benchmarks/Styling/Style_Apply_Detach_Complex.cs:15— private TestRoot _root — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField tests/Avalonia.UnitTests/TestRoot.cs:21— private NameScope _nameScope — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
FileScopedPragmaDisable src/Avalonia.Base/Input/MouseDevice.cs:8— #pragma warning disable CS0618 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.Base/Input/PenDevice.cs:10— #pragma warning disable CS0618 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.Base/Input/TouchDevice.cs:11— #pragma warning disable CS0618 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.Base/Media/RenderOptions.cs:172— #pragma warning disable CS0618 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.Base/Media/RenderOptions.cs:174— #pragma warning disable CS0618 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.Base/Media/FontWeight.cs:1— #pragma warning disable CA1069 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.Base/Platform/Storage/FallbackStorageProvider.cs:7— #pragma warning disable CA1823 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.Vulkan/UnmanagedInterop/VulkanStructs.cs:7— #pragma warning disable CA1823 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Browser/Avalonia.Browser/Rendering/BrowserSoftwareRenderTarget.cs:8— #pragma warning disable CA1823 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.Vulkan/UnmanagedInterop/VulkanStructs.cs:5— #pragma warning disable CS0649 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Windows/Avalonia.Win32/DirectX/DirectXStructs.cs:4— #pragma warning disable CS0649 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable tests/Avalonia.RenderTests/Media/BitmapTests.cs:15— #pragma warning disable CS0649 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable tests/Avalonia.RenderTests/Media/BoxShadowTests.cs:5— #pragma warning disable CS0649 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable tests/Avalonia.RenderTests/Media/DrawingContextTests.cs:7— #pragma warning disable CS0649 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable tests/Avalonia.RenderTests/Media/EffectTests.cs:7— #pragma warning disable CS0649 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.Vulkan/UnmanagedInterop/VulkanStructs.cs:6— #pragma warning disable CS0169 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Browser/Avalonia.Browser/Rendering/BrowserSoftwareRenderTarget.cs:7— #pragma warning disable CS0169 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.X11/Glx/GlxConsts.cs:4— #pragma warning disable 414 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.X11/X11Atoms.cs:37— #pragma warning disable 649 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.X11/X11Structs.cs:45— #pragma warning disable 649 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Avalonia.X11/XIStructs.cs:8— #pragma warning disable 649 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs:14— #pragma warning disable 169, 649 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
FileScopedPragmaDisable tests/Avalonia.Base.UnitTests/PropertyStore/FramePriorityExtensionsTests.cs:7— #pragma warning disable format — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
NoWarnInCsproj nukebuild/_build.csproj:7— CS0649 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj nukebuild/_build.csproj:7— CA1847 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj tests/Avalonia.IntegrationTests.Appium/Avalonia.IntegrationTests.Appium.csproj:16— NU1510 — this warning is switched off for the WHOLE project, including builds years from now. It is raised by the build itself — the packaging, restore or SDK step — about the project as a whole, not by the compiler or an analyzer at a line of code, so there is no call site to narrow it to and no per-site directive that could carry a reason: this element is the only place the decision can be recorded. Say WHY here, in a comment on the entry, or fix what the rule is reporting and drop the code from the list.
NoWarnInCsproj samples/GpuInterop/GpuInterop.csproj:14— NU1510 — this warning is switched off for the WHOLE project, including builds years from now. It is raised by the build itself — the packaging, restore or SDK step — about the project as a whole, not by the compiler or an analyzer at a line of code, so there is no call site to narrow it to and no per-site directive that could carry a reason: this element is the only place the decision can be recorded. Say WHY here, in a comment on the entry, or fix what the rule is reporting and drop the code from the list.
NoWarnInCsproj src/Avalonia.DesignerSupport/Avalonia.DesignerSupport.csproj:10— CS1591 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj:9— CS1591 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj build/SharedVersion.props:11— CS1591 — this project generates an XML documentation file as a build output, so its documentation is something it PUBLISHES to whoever consumes the assembly, and this entry switches off a rule whose only job is to report that documentation missing or malformed. The two decisions sit in the same file and the quiet one wins: the documentation this project ships has holes exactly where the rule would have pointed, no build says so, and the people who meet the gap are downstream — in their editor, at the moment they are trying to use the member. Write the documentation the rule is asking for and drop the code from the list; where only some elements genuinely cannot carry it, narrow the suppression to those sites and give each one its reason, so the rest of the API stays covered. If the documentation was never meant to be consumed, the honest fix is the other line — stop generating the file, so the project no longer publishes something it is choosing not to check.
NoWarnInCsproj src/Avalonia.Build.Tasks/Avalonia.Build.Tasks.csproj:10— NU1605 — this warning is switched off for the WHOLE project, including builds years from now. It is raised by the build itself — the packaging, restore or SDK step — about the project as a whole, not by the compiler or an analyzer at a line of code, so there is no call site to narrow it to and no per-site directive that could carry a reason: this element is the only place the decision can be recorded. Say WHY here, in a comment on the entry, or fix what the rule is reporting and drop the code from the list.
NoWarnInCsproj src/Avalonia.Build.Tasks/Avalonia.Build.Tasks.csproj:10— CS8632 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj samples/IntegrationTestApp/IntegrationTestApp.csproj:5— AVP1012 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj samples/IntegrationTestApp/IntegrationTestApp.csproj:5— AVLN3001 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj src/tools/Avalonia.UnicodeTrieGenerator/Avalonia.UnicodeTrieGenerator.csproj:7— CA1304 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj src/tools/Avalonia.UnicodeTrieGenerator/Avalonia.UnicodeTrieGenerator.csproj:7— CA1815 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj src/tools/Avalonia.UnicodeTrieGenerator/Avalonia.UnicodeTrieGenerator.csproj:7— CA1854 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj src/iOS/Avalonia.iOS/Avalonia.iOS.csproj:11— CA1416 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj src/Windows/Avalonia.WinUI/Avalonia.WinUI.csproj:24— CA1416 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj src/Windows/Avalonia.Win32/Avalonia.Win32.csproj:33— CA1416 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj src/Android/Avalonia.Android/Avalonia.Android.csproj:9— CS8002 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj samples/Directory.Build.props:12— CS8002 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj build/XUnit.props:10— CS8002 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj build/SharedVersion.props:11— NU5104 — this warning is switched off for the WHOLE project, including builds years from now. It is raised by the build itself — the packaging, restore or SDK step — about the project as a whole, not by the compiler or an analyzer at a line of code, so there is no call site to narrow it to and no per-site directive that could carry a reason: this element is the only place the decision can be recorded. Say WHY here, in a comment on the entry, or fix what the rule is reporting and drop the code from the list.
NoWarnInCsproj build/NullableEnable.props:5— nullable — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj build/AnalyzerProject.targets:7— RS2008 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
Namespace dependency cycle src/Avalonia.Base/Platform/Storage/NoopStorageProvider.cs:4— The namespaces Avalonia.Platform.Storage ↔ Avalonia.Platform.Storage.FileIO depend on each other. The lightest dependency in the cycle is Avalonia.Platform.Storage → Avalonia.Platform.Storage.FileIO (Avalonia.Platform.Storage.NoopStorageProvider → Avalonia.Platform.Storage.FileIO.BclStorageProvider, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/Avalonia.Base/StyledElement.cs:8— The namespaces Avalonia ↔ Avalonia.Animation ↔ Avalonia.Animation.Animators ↔ Avalonia.Animation.Easings ↔ Avalonia.Automation ↔ Avalonia.Automation.Peers ↔ Avalonia.Automation.Provider ↔ Avalonia.Browser ↔ Avalonia.Browser.Skia ↔ Avalonia.Collections ↔ Avalonia.Controls ↔ Avalonia.Controls.ApplicationLifetimes ↔ Avalonia.Controls.Chrome ↔ Avalonia.Controls.Diagnostics ↔ Avalonia.Controls.Documents ↔ Avalonia.Controls.Embedding ↔ Avalonia.Controls.Generators ↔ Avalonia.Controls.Platform ↔ Avalonia.Controls.Presenters ↔ Avalonia.Controls.Primitives ↔ Avalonia.Controls.Primitives.PopupPositioning ↔ Avalonia.Controls.PullToRefresh ↔ Avalonia.Controls.Selection ↔ Avalonia.Controls.Shapes ↔ Avalonia.Controls.Templates ↔ Avalonia.Controls.Utils ↔ Avalonia.Data ↔ Avalonia.Data.Core ↔ Avalonia.Data.Core.ExpressionNodes ↔ Avalonia.Data.Core.Plugins ↔ Avalonia.Diagnostics ↔ Avalonia.Input ↔ Avalonia.Input.GestureRecognizers ↔ Avalonia.Input.Navigation ↔ Avalonia.Input.Platform ↔ Avalonia.Input.Raw ↔ Avalonia.Input.TextInput ↔ Avalonia.Interactivity ↔ Avalonia.Layout ↔ Avalonia.LogicalTree ↔ Avalonia.Media ↔ Avalonia.Media.Fonts ↔ Avalonia.Media.Fonts.Tables ↔ Avalonia.Media.Fonts.Tables.Cmap ↔ Avalonia.Media.Fonts.Tables.Glyf ↔ Avalonia.Media.Fonts.Tables.Metrics ↔ Avalonia.Media.Fonts.Tables.Name ↔ Avalonia.Media.Imaging ↔ Avalonia.Media.Immutable ↔ Avalonia.Media.TextFormatting ↔ Avalonia.Media.TextFormatting.Unicode ↔ Avalonia.Media.Transformation ↔ Avalonia.OpenGL ↔ Avalonia.OpenGL.Egl ↔ Avalonia.OpenGL.Features ↔ Avalonia.OpenGL.Surfaces ↔ Avalonia.Platform ↔ Avalonia.Platform.Internal ↔ Avalonia.Platform.Surfaces ↔ Avalonia.PropertyStore ↔ Avalonia.Reactive ↔ Avalonia.Rendering ↔ Avalonia.Rendering.Composition ↔ Avalonia.Rendering.Composition.Animations ↔ Avalonia.Rendering.Composition.Drawing ↔ Avalonia.Rendering.Composition.Expressions ↔ Avalonia.Rendering.Composition.HitTesting ↔ Avalonia.Rendering.Composition.Server ↔ Avalonia.Rendering.Composition.Transport ↔ Avalonia.Rendering.SceneGraph ↔ Avalonia.Styling ↔ Avalonia.Styling.Activators ↔ Avalonia.Threading ↔ Avalonia.Utilities ↔ Avalonia.VisualTree ↔ Avalonia.iOS ↔ Avalonia.iOS.Metal depend on each other. The lightest dependency in the cycle is Avalonia → Avalonia.Animation (Avalonia.StyledElement → Avalonia.Animation.Animatable, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:13— The namespaces Avalonia.LinuxFramebuffer ↔ Avalonia.LinuxFramebuffer.Output depend on each other. The lightest dependency in the cycle is Avalonia.LinuxFramebuffer.Output → Avalonia.LinuxFramebuffer (Avalonia.LinuxFramebuffer.Output.DrmConnector → Avalonia.LinuxFramebuffer.DrmConnectorType, 4 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs:12— The namespaces Avalonia.Android ↔ Avalonia.Android.Platform ↔ Avalonia.Android.Platform.Input ↔ Avalonia.Android.Platform.SkiaPlatform ↔ Avalonia.Android.Platform.Specific.Helpers depend on each other. The lightest dependency in the cycle is Avalonia.Android.Platform.SkiaPlatform → Avalonia.Android.Platform.Input (Avalonia.Android.Platform.SkiaPlatform.TopLevelImpl → Avalonia.Android.Platform.Input.AndroidInputMethod, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/Markup/Avalonia.Markup.Xaml/EagerParentStackEnumerator.cs:2— The namespaces Avalonia.Markup.Xaml ↔ Avalonia.Markup.Xaml.XamlIl.Runtime depend on each other. The lightest dependency in the cycle is Avalonia.Markup.Xaml → Avalonia.Markup.Xaml.XamlIl.Runtime (Avalonia.Markup.Xaml.EagerParentStackEnumerator → Avalonia.Markup.Xaml.XamlIl.Runtime.IAvaloniaXamlIlEagerParentStackProvider, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/Avalonia.Dialogs/Internal/ManagedFileChooserViewModel.cs:16— The namespaces Avalonia.Dialogs ↔ Avalonia.Dialogs.Internal depend on each other. The lightest dependency in the cycle is Avalonia.Dialogs.Internal → Avalonia.Dialogs (Avalonia.Dialogs.Internal.ManagedFileChooserViewModel → Avalonia.Dialogs.ManagedFileDialogOptions, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/Avalonia.FreeDesktop.AtSpi/AtSpiNode.cs:12— The namespaces Avalonia.FreeDesktop.AtSpi ↔ Avalonia.FreeDesktop.AtSpi.Handlers depend on each other. The lightest dependency in the cycle is Avalonia.FreeDesktop.AtSpi → Avalonia.FreeDesktop.AtSpi.Handlers (Avalonia.FreeDesktop.AtSpi.AtSpiNode → Avalonia.FreeDesktop.AtSpi.Handlers.AtSpiAccessibleHandler, 11 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/tools/Avalonia.Generators/Common/XamlXViewResolver.cs:6— The namespaces Avalonia.Generators.Common ↔ Avalonia.Generators.Common.Domain ↔ Avalonia.Generators.Compiler depend on each other. The lightest dependency in the cycle is Avalonia.Generators.Common → Avalonia.Generators.Compiler (Avalonia.Generators.Common.XamlXViewResolver → Avalonia.Generators.Compiler.MiniCompiler, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlAddSourceInfoTransformer.cs:2— The namespaces Avalonia.Markup.Xaml.Loader.CompilerExtensions.Transformers ↔ Avalonia.Markup.Xaml.XamlIl.CompilerExtensions ↔ Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.GroupTransformers ↔ Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers depend on each other. The lightest dependency in the cycle is Avalonia.Markup.Xaml.Loader.CompilerExtensions.Transformers → Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers (Avalonia.Markup.Xaml.Loader.CompilerExtensions.Transformers.XamlSourceInfoValueManipulation → Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers.AvaloniaXamlIlWellKnownTypes, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/Avalonia.Native/AvaloniaNativeMenuExporter.cs:8— The namespaces Avalonia.Native ↔ Avalonia.Native.Interop ↔ Avalonia.Native.Interop.Impl depend on each other. The lightest dependency in the cycle is Avalonia.Native → Avalonia.Native.Interop.Impl (Avalonia.Native.AvaloniaNativeMenuExporter → Avalonia.Native.Interop.Impl.__MicroComIAvnMenuProxy, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/Avalonia.Vulkan/UnmanagedInterop/VulkanDeviceApi.cs:12— The namespaces Avalonia.Vulkan ↔ Avalonia.Vulkan.Interop ↔ Avalonia.Vulkan.UnmanagedInterop depend on each other. The lightest dependency in the cycle is Avalonia.Vulkan.UnmanagedInterop → Avalonia.Vulkan (Avalonia.Vulkan.UnmanagedInterop.VulkanDeviceApi → Avalonia.Vulkan.IVulkanDevice, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/Avalonia.X11/X11Platform.cs:23— The namespaces Avalonia.X11 ↔ Avalonia.X11.Dispatching ↔ Avalonia.X11.Screens ↔ Avalonia.X11.Selections ↔ Avalonia.X11.Selections.DragDrop depend on each other. The lightest dependency in the cycle is Avalonia.X11 → Avalonia.X11.Screens (Avalonia.X11.AvaloniaX11Platform → Avalonia.X11.Screens.X11Screens, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/Avalonia.Wayland/WindowImpl.TextInput.cs:7— The namespaces Avalonia.Wayland ↔ Avalonia.Wayland.Server ↔ Avalonia.Wayland.Server.Persistent ↔ Avalonia.Wayland.Server.Transient ↔ Avalonia.Wayland.Server.Transient.Clipboard ↔ Avalonia.Wayland.Server.Transient.Rendering depend on each other. The lightest dependency in the cycle is Avalonia.Wayland → Avalonia.Wayland.Server.Transient (Avalonia.Wayland.WaylandTextInputMethod → Avalonia.Wayland.Server.Transient.IWaylandTextInputV3Events, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:14— The namespaces Avalonia.Win32 ↔ Avalonia.Win32.Input depend on each other. The lightest dependency in the cycle is Avalonia.Win32 → Avalonia.Win32.Input (Avalonia.Win32.WindowImpl → Avalonia.Win32.Input.WindowsInputPane, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Orphaned knowledge src/Avalonia.Base/Collections/Pooled/PooledList.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/Avalonia.Base/Collections/Pooled/ThrowHelper.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/Avalonia.Controls/RelativePanel.AttachedProperties.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/Avalonia.Base/Collections/Pooled/PooledStack.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge src/Avalonia.Base/Matrix.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
DisabledAnalyzers src/Avalonia.FreeDesktop.AtSpi/Avalonia.FreeDesktop.AtSpi.csproj:7— EnableNETAnalyzers — this does not switch a rule off, it stops the analyzers running for the whole project: every rule they ship is silenced at once, including every rule added by a future upgrade, and nothing at the sites they would have reported records that anything was switched off. There is no code here to look up and nothing to weigh, which is what makes it the one suppression that is never revisited. Turn the analyzers back on and deal with what they report — suppressing the handful of rules that are genuinely unwanted, each on its own line with its reason, keeps the rest protecting the project and leaves a record a reader can audit.
DisabledAnalyzers src/Avalonia.Build.Tasks/Avalonia.Build.Tasks.csproj:19— EnableNETAnalyzers — this does not switch a rule off, it stops the analyzers running for the whole project: every rule they ship is silenced at once, including every rule added by a future upgrade, and nothing at the sites they would have reported records that anything was switched off. There is no code here to look up and nothing to weigh, which is what makes it the one suppression that is never revisited. Turn the analyzers back on and deal with what they report — suppressing the handful of rules that are genuinely unwanted, each on its own line with its reason, keeps the rest protecting the project and leaves a record a reader can audit.
DisabledAnalyzers src/tools/Avalonia.DBus.Generators/Avalonia.DBus.Generators.csproj:9— EnableNETAnalyzers — this does not switch a rule off, it stops the analyzers running for the whole project: every rule they ship is silenced at once, including every rule added by a future upgrade, and nothing at the sites they would have reported records that anything was switched off. There is no code here to look up and nothing to weigh, which is what makes it the one suppression that is never revisited. Turn the analyzers back on and deal with what they report — suppressing the handful of rules that are genuinely unwanted, each on its own line with its reason, keeps the rest protecting the project and leaves a record a reader can audit.
DisabledAnalyzers src/tools/Avalonia.Browser.BuildTasks/Avalonia.Browser.BuildTasks.csproj:6— EnableNETAnalyzers — this does not switch a rule off, it stops the analyzers running for the whole project: every rule they ship is silenced at once, including every rule added by a future upgrade, and nothing at the sites they would have reported records that anything was switched off. There is no code here to look up and nothing to weigh, which is what makes it the one suppression that is never revisited. Turn the analyzers back on and deal with what they report — suppressing the handful of rules that are genuinely unwanted, each on its own line with its reason, keeps the rest protecting the project and leaves a record a reader can audit.
Boundary-crossing change coupling: DrawingContextProxy.cs ↔ DrawingContextImpl.cs src/Avalonia.Base/Rendering/Composition/Server/DrawingContextProxy.cs:1— `src/Avalonia.Base/Rendering/Composition/Server/DrawingContextProxy.cs` (context Avalonia.Base) and `src/Skia/Avalonia.Skia/DrawingContextImpl.cs` (context Skia) sit in DIFFERENT parts of the tree yet change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `e31fc59e` Use DrawingContextProxy as a staging area for Push/Pop/SetTransform o…; `cffb4b8d` Don't merge RenderOptions during update and only push them to drawing…; `b465af28` Introduce DrawingContext Push/PopRenderOptions — run `git show` on any of them.
Boundary-crossing change coupling: XamlCompilerTaskExecutor.cs ↔ XamlIncludeGroupTransformer.cs src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs:1— `src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs` (context Avalonia.Build.Tasks) and `src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/GroupTransformers/XamlIncludeGroupTransformer.cs` (context Markup) sit in DIFFERENT parts of the tree yet 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, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `5361b98c` #19962 Add AXAML Source Information to debug Builds (#20524); `28d7c1c3` Adjust transformers and comments; `de9e9580` Pass parent's service provider to the StyleInclude, so parents stack … — run `git show` on any of them.
Assertions commented out: Should_Negate_Boolean_Value tests/Avalonia.Base.UnitTests/Data/Core/BindingExpressionTests.Negation.cs:11— The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
BlanketAnalyzerSeverityNone .editorconfig:139— dotnet_analyzer_diagnostic.category-Performance.severity = none — every rule in the Performance category — this is not one rule switched off, it is a whole set the file never lists: every rule the entry covers is silenced for every file the section matches, in every project under this directory, and any rule added to that set by a future analyzer upgrade is silenced too, without anybody deciding so. It reads as narrower than it is — the analyzers still run and the build still looks configured — and because no rule is named there is nothing for a reader to look up and no list that will ever disclose what is covered. Replace it with the rules you actually mean to switch off, each on its own line, so the set is finite, visible and reviewable, and the ones nobody chose keep protecting the tree. If the blanket entry is genuinely right, link the decision from a comment above it: a comment that only restates the entry is what the editor generates when it writes this line, so it is a reference to the decision — an issue or a ticket — that clears this row.
S1 · Cryptographic Hygiene· Password hashing without a KDF · ×1
Password hashing without a KDF src/Avalonia.Controls/MaskedTextBox.cs:328— `MaskProvider.PasswordChar != PasswordChar` checks a password against the stored one in plaintext, so the store holds the password itself and whoever reads it holds every account. Store a salted KDF hash (PBKDF2/scrypt/Argon2/bcrypt) and verify by deriving again.
TodoComment samples/RenderDemo/App.xaml.cs:21— // TODO: Make this work with GTK/Skia/Cairo depending on command-line args — 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 src/Avalonia.Base/Collections/AvaloniaListConverter.cs:27— // TODO: Use StringTokenizer here. — 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 src/Avalonia.Base/Data/Core/TargetTypeConverter.cs:74— // TODO: TypeConverters are not trimming friendly in some edge cases, we probably need — 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 src/Avalonia.Base/Data/Core/TargetTypeConverter.cs:109— // TODO: This requires reflection: we probably need to make compiled bindings emit — 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 src/Avalonia.Base/Input/AccessKeyHandler.cs:193— // TODO: Use FocusScopes to store the current element and restore it when context menu is closed. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/Avalonia.Base/Input/FocusHelpers.cs:14— // TODO: add control overrides to return custom focus list from control — 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 src/Avalonia.Base/Input/FocusManager.cs:170— // TODO: Make this do something useful, i.e. select the first focusable — 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 src/Avalonia.Base/Input/FocusManager.cs:1154— //TODO Popup api — 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 src/Avalonia.Base/Input/KeyGesture.cs:163— // TODO: Move that to external key parser — 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 src/Avalonia.Base/Input/Navigation/XYFocus.FindElements.cs:108— // TODO: The check for bounds is no longer correct — 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 src/Avalonia.Base/Input/Navigation/XYFocus.Impl.cs:75— // TODO: handle non-Visual IInputElement implementations, like TextElement, when we support that. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/Avalonia.Base/Input/Navigation/XYFocus.Impl.cs:302— // TODO: Avalonia, missing Popup API — 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 src/Avalonia.Base/Media/BitmapCache.cs:102— // TODO: Make it to be a multi-compositor resource once we support visuals being attached to multiple — 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 src/Avalonia.Base/Media/GradientBrush.cs:101— // TODO: Technically it allocates, so it would be better to sync stops individually — 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 src/Avalonia.Base/Media/ImmediateDrawingContext.cs:290— //TODO: Eliminate platform-specific push opacity call — 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 src/Avalonia.Base/Media/MediaContext.Compositor.cs:119— // TODO: do we need to execute a render pass here too? — 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 src/Avalonia.Base/Media/MediaContext.Compositor.cs:135— // TODO: We are sending a dispose command outside of the normal commit cycle and we might — 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 src/Avalonia.Base/Media/MediaContext.Compositor.cs:153— // TODO: maybe skip the full render here? — 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 src/Avalonia.Base/Media/MediaContext.cs:214— // TODO: port the rest of the Loaded logic later — 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 src/Avalonia.Base/Platform/Storage/FileIO/BclStorageProvider.cs:118— // TODO, replace with https://github.com/dotnet/runtime/issues/70484 when implemented.
TodoComment src/Avalonia.Base/Rendering/Composition/Animations/KeyFrameAnimationInstance.cs:168— // TODO: Update subscriptions based on the current keyframe rather than keeping subscriptions to all of them — 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 src/Avalonia.Base/Rendering/Composition/Enums.cs:118— //TODO: Uniform, UniformToFill — 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 src/Avalonia.Base/Rendering/Composition/Expressions/BuiltInExpressionFfi.cs:117— 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 src/Avalonia.Base/Rendering/Composition/MatrixUtils.cs:24— //TODO: RotationAxis support — 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 src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionSurfaceVisual.cs:16— //TODO: add a way to always render the whole bitmap instead of just assuming 96 DPI — 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.
TooManyMethods: WindowImpl src/Windows/Avalonia.Win32/WindowImpl.cs— TooManyMethods — 1838 significant lines (blank, comment-only and punctuation-only lines excluded), 100 methods, declared across 4 files: Avalonia.Win32/WindowImpl.cs (64), Avalonia.Win32/WindowImpl.AppWndProc.cs (27), Avalonia.Win32/WindowImpl.CustomCaptionProc.cs (8), Avalonia.Win32/WindowImpl.WndProc.cs (1). The bar is 30 methods; this is 70 over it, 3.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PooledList src/Avalonia.Base/Collections/Pooled/PooledList.cs— TooManyMethods — 525 significant lines (blank, comment-only and punctuation-only lines excluded), 92 methods. The bar is 30 methods; this is 62 over it, 3.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NavigationPage src/Avalonia.Controls/Page/NavigationPage.cs— TooManyMethods — 1136 significant lines (blank, comment-only and punctuation-only lines excluded), 88 methods. The bar is 30 methods; this is 58 over it, 2.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GlInterface src/Avalonia.OpenGL/GlInterface.cs— TooManyMethods — 250 significant lines (blank, comment-only and punctuation-only lines excluded), 87 methods. The bar is 30 methods; this is 57 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: X11Window src/Avalonia.X11/X11Window.cs— TooManyMethods — 1263 significant lines (blank, comment-only and punctuation-only lines excluded), 84 methods, declared across 2 files: Avalonia.X11/X11Window.cs (70), Avalonia.X11/X11Window.Ime.cs (14). The bar is 30 methods; this is 54 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Dispatcher src/Avalonia.Base/Threading/Dispatcher.Invoke.cs— TooManyMethods — 661 significant lines (blank, comment-only and punctuation-only lines excluded), 75 methods, declared across 7 files: Threading/Dispatcher.Invoke.cs (29), Threading/Dispatcher.Queue.cs (16), Threading/Dispatcher.MainLoop.cs (8), Threading/Dispatcher.Timers.cs (7), +3 more file(s). The bar is 30 methods; this is 45 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AutomationPeer src/Avalonia.Controls/Automation/Peers/AutomationPeer.cs— TooManyMethods — 117 significant lines (blank, comment-only and punctuation-only lines excluded), 70 methods. The bar is 30 methods; this is 40 over it, 2.33× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: VirtualizingCarouselPanel src/Avalonia.Controls/VirtualizingCarouselPanel.cs— TooManyMethods — 975 significant lines (blank, comment-only and punctuation-only lines excluded), 69 methods. The bar is 30 methods; this is 39 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TextBox src/Avalonia.Controls/TextBox.cs— TooManyMethods — 1260 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AutomationNode src/Windows/Avalonia.Win32.Automation/AutomationNode.cs— TooManyMethods — 319 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods, declared across 7 files: Avalonia.Win32.Automation/AutomationNode.cs (33), Avalonia.Win32.Automation/AutomationNode.Scroll.cs (9), Avalonia.Win32.Automation/AutomationNode.Selection.cs (8), Avalonia.Win32.Automation/AutomationNode.RangeValue.cs (7), +3 more file(s). The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Calendar src/Avalonia.Controls/Calendar/Calendar.cs— TooManyMethods — 897 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SelectingItemsControl src/Avalonia.Controls/Primitives/SelectingItemsControl.cs— TooManyMethods — 691 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ThrowHelper src/Avalonia.Base/Collections/Pooled/ThrowHelper.cs— TooManyMethods — 368 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: ValueStore src/Avalonia.Base/PropertyStore/ValueStore.cs— TooManyMethods — 638 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AutoCompleteBox src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.cs— TooManyMethods — 572 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NumericUpDown src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs— TooManyMethods — 456 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AvaloniaObject src/Avalonia.Base/AvaloniaObject.cs— TooManyMethods — 302 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AvnAutomationPeer src/Avalonia.Native/AvnAutomationPeer.cs— TooManyMethods — 143 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: InputElement src/Avalonia.Base/Input/InputElement.cs— TooManyMethods — 518 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods, declared across 2 files: Input/InputElement.cs (47), Input/InputElement.Gestures.cs (5). The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ScrollViewer src/Avalonia.Controls/ScrollViewer.cs— TooManyMethods — 324 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: LineBreakEnumerator src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs— TooManyMethods — 610 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DrawingContextImpl src/Skia/Avalonia.Skia/DrawingContextImpl.cs— TooManyMethods — 727 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods, declared across 2 files: Avalonia.Skia/DrawingContextImpl.cs (47), Avalonia.Skia/DrawingContextImpl.Effects.cs (3). The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Window src/Avalonia.Controls/Window.cs— TooManyMethods — 657 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StyledElement src/Avalonia.Base/StyledElement.cs— TooManyMethods — 413 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HeadlessWindowImpl src/Headless/Avalonia.Headless/HeadlessWindowImpl.cs— TooManyMethods — 222 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
MethodTooLong: WindowImpl.AppWndProc src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:23— MethodTooLong — AppWndProc runs 538 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 438 over it, 5.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: XamlCompilerTaskExecutor.CompileCore src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs:104— MethodTooLong — CompileCore runs 377 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 277 over it, 3.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AvaloniaXamlIlLanguageParseIntrinsics.TryConvert src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlLanguageParseIntrinsics.cs:19— MethodTooLong — TryConvert runs 217 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 117 over it, 2.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: XamlIlBindingPathHelper.TransformBindingPath src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlBindingPathHelper.cs:140— MethodTooLong — TransformBindingPath runs 216 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 116 over it, 2.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TextBox.OnKeyDown src/Avalonia.Controls/TextBox.cs:1408— MethodTooLong — OnKeyDown runs 209 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 109 over it, 2.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Grid.SetFinalSizeMaxDiscrepancy src/Avalonia.Controls/Grid.cs:1797— MethodTooLong — SetFinalSizeMaxDiscrepancy runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GetProcAddressInitializationGenerator.Initialize src/tools/DevGenerators/GetProcAddressInitialization.cs:20— MethodTooLong — Initialize runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Generator.GenerateClass src/tools/DevGenerators/CompositionGenerator/Generator.cs:48— MethodTooLong — GenerateClass runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ConnectedAnimation.RunAnimationCoreAsync src/Avalonia.Controls/Animation/ConnectedAnimation.cs:256— MethodTooLong — RunAnimationCoreAsync runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BidiAlgorithm.ProcessIsolatedRunSequence src/Avalonia.Base/Media/TextFormatting/Unicode/BiDiAlgorithm.cs:856— MethodTooLong — ProcessIsolatedRunSequence runs 179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 79 over it, 1.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ExpressionVariant.GetProperty src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs:53— MethodTooLong — GetProperty runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TextPathSegmentEllipsis.Collapse src/Avalonia.Base/Media/TextPathSegmentEllipsis.cs:43— MethodTooLong — Collapse runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AvaloniaXamlIlWellKnownTypes.AvaloniaXamlIlWellKnownTypes(…) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlWellKnownTypes.cs:191— MethodTooLong — AvaloniaXamlIlWellKnownTypes(…) runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ColorPickerHelpers.CreateComponentBitmapAsync src/Avalonia.Controls.ColorPicker/Helpers/ColorPickerHelpers.cs:39— MethodTooLong — CreateComponentBitmapAsync runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BuiltInExpressionFfi.BuiltInExpressionFfi(…) src/Avalonia.Base/Rendering/Composition/Expressions/BuiltInExpressionFfi.cs:90— MethodTooLong — BuiltInExpressionFfi(…) runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AvaloniaXamlIlSelectorTransformer.Transform src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSelectorTransformer.cs:27— MethodTooLong — Transform runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: X11Window.X11Window(…) src/Avalonia.X11/X11Window.cs:96— MethodTooLong — X11Window(…) runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ColorSpectrum.FillPixelForRing src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1400— MethodTooLong — FillPixelForRing runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Grid.ResolveStarMaxDiscrepancy src/Avalonia.Controls/Grid.cs:1463— MethodTooLong — ResolveStarMaxDiscrepancy runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: X11Window.OnEvent src/Avalonia.X11/X11Window.cs:591— MethodTooLong — OnEvent runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GeometryBuilder.CalculateRoundedCornersRectangleWinUI src/Avalonia.Base/Media/GeometryBuilder.cs:206— MethodTooLong — CalculateRoundedCornersRectangleWinUI runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ColorSpectrum.FillPixelForBox src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1240— MethodTooLong — FillPixelForBox runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ColorSpectrum.UpdateEllipse src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:804— MethodTooLong — UpdateEllipse runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TransformParser.ParseFunction src/Avalonia.Base/Media/Transformation/TransformParser.cs:88— MethodTooLong — ParseFunction runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Graph.MeasureChild src/Avalonia.Controls/RelativePanel.cs:292— MethodTooLong — MeasureChild runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Sync-over-async blocking — 39 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Base/Input/AsyncToSyncDataTransferItem.cs:20— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Base/Media/MediaContext.Compositor.cs:108— `.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawingSurface.cs:40— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Base/Threading/Dispatcher.Invoke.cs:494— `operation.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Base/Threading/DispatcherOperation.cs:192— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Base/Threading/DispatcherOperation.cs:408— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Base/Threading/DispatcherPriorityAwaitable.cs:77— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Base/Threading/DispatcherPriorityAwaitable.cs:146— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Controls/TopLevel.cs:619— `.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Vulkan/Interop/VulkanCommandBuffer.cs:27— `_fence.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Android/Avalonia.Android/Platform/AndroidDragDrop.cs:161— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Headless/Avalonia.Headless.NUnit/AvaloniaTestMethodCommand.cs:78— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Headless/Avalonia.Headless.XUnit/AvaloniaDelayEnumeratedTheoryTestCase.cs:75— `.GetAwaiter() .GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Headless/Avalonia.Headless.XUnit/AvaloniaTestCase.cs:74— `.GetAwaiter() .GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Headless/Avalonia.Headless/AvaloniaHeadlessPlatform.cs:86— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Headless/Avalonia.Headless/HeadlessUnitTestSession.cs:134— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Headless/Avalonia.Headless/HeadlessUnitTestSession.cs:139— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Headless/Avalonia.Headless/HeadlessUnitTestSession.cs:333— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Headless/Avalonia.Headless/HeadlessUnitTestSession.cs:238— `_dispatchTask.Wait()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.FreeDesktop/DBusHelper.cs:40— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Wayland/Clipboard/WaylandDataTransfer.cs:77— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Wayland/Clipboard/WaylandDataTransfer.cs:176— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Wayland/WaylandPlatform.cs:63— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking src/Avalonia.Wayland/WindowImpl.Sink.cs:27— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
FileTooLong: Avalonia.X11/Keysyms.cs src/Avalonia.X11/Keysyms.cs— FileTooLong — 2101 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1601 over it, 4.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: Interop/UnmanagedMethods.cs src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs— FileTooLong — 2082 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1582 over it, 4.16× 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: Avalonia.X11/X11Structs.cs src/Avalonia.X11/X11Structs.cs— FileTooLong — 1648 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1148 over it, 3.30× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Avalonia.Controls/Grid.cs src/Avalonia.Controls/Grid.cs— FileTooLong — 1322 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 822 over it, 2.64× 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: Avalonia.Controls/TextBox.cs src/Avalonia.Controls/TextBox.cs— FileTooLong — 1303 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 803 over it, 2.61× 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: Page/NavigationPage.cs src/Avalonia.Controls/Page/NavigationPage.cs— FileTooLong — 1157 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 657 over it, 2.31× 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: Avalonia.X11/X11Window.cs src/Avalonia.X11/X11Window.cs— FileTooLong — 1103 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 603 over it, 2.21× 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: Utilities/FrugalList.cs src/Avalonia.Base/Utilities/FrugalList.cs— FileTooLong — 1091 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 591 over it, 2.18× 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: ColorSpectrum/ColorSpectrum.cs src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs— FileTooLong — 1032 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 532 over it, 2.06× 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: Avalonia.Controls/VirtualizingCarouselPanel.cs src/Avalonia.Controls/VirtualizingCarouselPanel.cs— FileTooLong — 997 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 497 over it, 1.99× 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: Calendar/Calendar.cs src/Avalonia.Controls/Calendar/Calendar.cs— FileTooLong — 930 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 430 over it, 1.86× 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: Avalonia.Win32/WindowImpl.cs src/Windows/Avalonia.Win32/WindowImpl.cs— FileTooLong — 892 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 392 over it, 1.78× 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: Avalonia.Remote.Protocol/MetsysBson.cs src/Avalonia.Remote.Protocol/MetsysBson.cs— FileTooLong — 886 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 386 over it, 1.77× 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: Avalonia.Skia/DrawingContextImpl.cs src/Skia/Avalonia.Skia/DrawingContextImpl.cs— FileTooLong — 826 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 326 over it, 1.65× 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: Avalonia.Win32/WindowImpl.AppWndProc.cs src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs— FileTooLong — 820 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 320 over it, 1.64× 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: Avalonia.Controls/VirtualizingStackPanel.cs src/Avalonia.Controls/VirtualizingStackPanel.cs— FileTooLong — 798 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 298 over it, 1.60× 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: Unicode/LineBreakEnumerator.cs src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs— FileTooLong — 760 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 260 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Primitives/SelectingItemsControl.cs src/Avalonia.Controls/Primitives/SelectingItemsControl.cs— FileTooLong — 713 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 213 over it, 1.43× 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: TextFormatting/TextLineImpl.cs src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs— FileTooLong — 706 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 206 over it, 1.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Avalonia.Controls/Window.cs src/Avalonia.Controls/Window.cs— FileTooLong — 689 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 189 over it, 1.38× 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: Unicode/BiDiAlgorithm.cs src/Avalonia.Base/Media/TextFormatting/Unicode/BiDiAlgorithm.cs— FileTooLong — 684 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 184 over it, 1.37× 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: CompilerExtensions/XamlIlBindingPathHelper.cs src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlBindingPathHelper.cs— FileTooLong — 678 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 178 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Media/FormattedText.cs src/Avalonia.Base/Media/FormattedText.cs— FileTooLong — 675 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 175 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: AutoCompleteBox/AutoCompleteBox.cs src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.cs— FileTooLong — 663 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 163 over it, 1.33× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: PropertyStore/ValueStore.cs src/Avalonia.Base/PropertyStore/ValueStore.cs— FileTooLong — 662 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 162 over it, 1.32× 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.
Unfinished stub — throws NotImplementedException src/Avalonia.Base/Media/DrawingGroup.cs:248— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Base/Media/DrawingGroup.cs:281— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Base/Styling/ValueStyleQuery.cs:22— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlOptionMarkupExtensionTransformer.cs:343— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:22— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:23— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:24— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:25— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:26— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:27— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:28— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:29— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:30— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:31— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:32— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:33— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:35— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:36— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:37— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:38— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:39— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:40— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:41— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Converters/CornerRadiusFilterConverter.cs:44— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Converters/CornerRadiusToDoubleConverter.cs:41— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
+ 13 more in this group — see findings.md.
X2 · Cancellation propagation· Async method without CancellationToken · ×37
Async method without CancellationToken: DownloadAndExtractPackagesAsync REDACTED:278— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: CreateNuGetDownloadContextAsync REDACTED:398— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: GetBaselineVersionAsync REDACTED:416— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: DownloadBaselinePackageAsync REDACTED:437— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: TryGetValuesAsync src/Avalonia.Base/Input/AsyncDataTransferExtensions.cs:98— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: TryGetValueAsync src/Avalonia.Base/Input/AsyncDataTransferItemExtensions.cs:38— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: TryGetInProcessDataAsync src/Avalonia.Base/Input/Platform/Clipboard.cs:38— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: GetDataFormatsAsync src/Avalonia.Base/Input/Platform/ClipboardExtensions.cs:17— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: TryGetValueAsync src/Avalonia.Base/Input/Platform/ClipboardExtensions.cs:33— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: TryGetValuesAsync src/Avalonia.Base/Input/Platform/ClipboardExtensions.cs:51— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: OpenFilePickerAsync src/Avalonia.Base/Platform/Storage/FallbackStorageProvider.cs:63— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: OpenFilePickerWithResultAsync src/Avalonia.Base/Platform/Storage/FallbackStorageProvider.cs:68— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: SaveFilePickerAsync src/Avalonia.Base/Platform/Storage/FallbackStorageProvider.cs:73— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: SaveFilePickerWithResultAsync src/Avalonia.Base/Platform/Storage/FallbackStorageProvider.cs:78— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: OpenFolderPickerAsync src/Avalonia.Base/Platform/Storage/FallbackStorageProvider.cs:83— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: OpenFilePickerAsync src/Avalonia.Base/Platform/Storage/FileIO/BclStorageProvider.cs:14— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: SaveFilePickerAsync src/Avalonia.Base/Platform/Storage/FileIO/BclStorageProvider.cs:23— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: TryGetRenderInterfaceFeature src/Avalonia.Base/Rendering/Composition/Compositor.cs:291— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: TryGetCompositionGpuInterop src/Avalonia.Base/Rendering/Composition/Compositor.cs:311— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: InvokeAsync src/Avalonia.Base/Threading/Dispatcher.Invoke.cs:554— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: InvokeAsync src/Avalonia.Base/Threading/Dispatcher.Invoke.cs:571— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: InvokeAsync src/Avalonia.Base/Threading/Dispatcher.Invoke.cs:587— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: InvokeAsync src/Avalonia.Base/Threading/Dispatcher.Invoke.cs:605— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: UpdateBackground src/Avalonia.Controls.ColorPicker/ColorSlider/ColorSlider.cs:91— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: CreateBitmapsAndColorMap src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1049— No CancellationToken parameter — this work can't be stopped early once started.
Swallowed exception (empty catch) nukebuild/BuildTasksPatcher.cs:52— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) nukebuild/BuildTasksPatcher.cs:142— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) nukebuild/Helpers.cs:18— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.Base/Data/Core/ExpressionNodes/LogicalNotNode.cs:61— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.Base/Data/Core/Plugins/AvaloniaPropertyAccessorPlugin.cs:127— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.Base/Data/Core/Plugins/InpcPropertyAccessorPlugin.cs:183— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.Base/Data/Core/Plugins/MethodAccessorPlugin.cs:60— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.Base/Data/Core/Plugins/ReflectionMethodAccessorPlugin.cs:205— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.Base/Platform/StandardAssetLoader.cs:265— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.Base/Platform/Storage/FileIO/BclStorageItem.cs:82— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.Base/Rendering/Composition/Server/ServerCompositor.cs:160— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.Controls.ColorPicker/ColorPreviewer/ColorPreviewer.cs:122— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.DesignerSupport/Remote/PreviewerWindowingPlatform.cs:35— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.DesignerSupport/Remote/RemoteDesignerEntryPoint.cs:234— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.Dialogs/Internal/ManagedFileChooserViewModel.cs:361— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.OpenGL/Composition/CompositionGlTexture.cs:88— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.OpenGL/Composition/CompositionGlTexture.cs:111— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else).
Swallowed exception (empty catch) src/Avalonia.OpenGL/Composition/CompositionGlTexture.cs:122— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else).
Swallowed exception (empty catch) src/Avalonia.OpenGL/Composition/CompositionGlTexture.cs:132— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else).
Swallowed exception (empty catch) src/Avalonia.OpenGL/Composition/CompositionGlTexture.cs:142— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else).
Swallowed exception (empty catch) src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs:146— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.OpenGL/Controls/OpenGlControlResources.cs:126— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else).
Swallowed exception (empty catch) src/Avalonia.OpenGL/Egl/EglGlPlatformImageSurfaceBase.cs:136— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/Avalonia.Remote.Protocol/TcpTransportBase.cs:35— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else).
Swallowed exception (empty catch) src/Avalonia.Remote.Protocol/TcpTransportBase.cs:59— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
BarePragmaDisable src/Android/Avalonia.Android/AndroidDispatcherImpl.cs:159— #pragma warning disable CA1416 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Browser/Avalonia.Browser/BrowserAppBuilder.cs:115— #pragma warning disable CA1416 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Browser/Avalonia.Browser/WindowingPlatform.cs:58— #pragma warning disable CA1416 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/iOS/Avalonia.iOS/InputHandler.cs:168— #pragma warning disable CA1416 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/iOS/Avalonia.iOS/InputHandler.cs:228— #pragma warning disable CA1416 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/iOS/Avalonia.iOS/InputHandler.cs:463— #pragma warning disable CA1416 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Avalonia.Base/Collections/Pooled/IReadOnlyPooledList.cs:16— #pragma warning disable CS0419 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Avalonia.Base/Collections/Pooled/PooledList.cs:502— #pragma warning disable CS0419 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Avalonia.Base/Data/Converters/MethodToCommandConverter.cs:78— #pragma warning disable 0067 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Avalonia.Base/Media/RenderOptions.cs:166— #pragma warning disable CS0618 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Avalonia.Base/Threading/DispatcherPriority.cs:120— #pragma warning disable CS0618 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Avalonia.Base/Threading/DispatcherPriority.cs:176— #pragma warning disable CS0618 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Skia/Avalonia.Skia/DrawingContextImpl.cs:626— #pragma warning disable CS0618 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable tests/Avalonia.Base.UnitTests/Rendering/SceneGraph/RenderDataWriterReaderTests.cs:123— #pragma warning disable CS0618 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionParser.cs:82— #pragma warning disable CS8509 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:304— #pragma warning disable CS8509 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:338— #pragma warning disable CS8509 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:493— #pragma warning disable CS8509 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs:116— #pragma warning disable AVP1013 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Avalonia.Controls/TextBlock.cs:1049— #pragma warning disable CA1815 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Avalonia.Wayland/WaylandPlatformOptions.cs:59— #pragma warning disable AVALONIA_WAYLAND_FORCE_CSD — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Avalonia.X11/X11Platform.cs:551— #pragma warning disable AVALONIA_X11_CSD — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/Avalonia.X11/X11Platform.cs:571— #pragma warning disable AVALONIA_X11_FORCE_CSD — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/iOS/Avalonia.iOS/Platform.cs:125— #pragma warning disable CA1422 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable src/iOS/Avalonia.iOS/Storage/IOSStorageProvider.cs:213— #pragma warning disable CA1422 — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
+ 5 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×30
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/inputQueue.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/dom.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/caretHelper.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/screens.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Avalonia.DesignerSupport/Remote/HtmlTransport/webapp/src/PreviewerServerConnection.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/storage/indexedDb.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/rendering/webRenderTargetRegistry.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/rendering/webGlRenderTarget.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/storage/storageProvider.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/rendering/resizeHandler.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/nativeControlHost.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/rendering/canvasSurface.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/singleThreadedDispatcher.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/rendering/softwareRenderTarget.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/stream.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/caniuse.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/jsExports.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Avalonia.DesignerSupport/Remote/HtmlTransport/webapp/build.js:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/generalHelpers.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/multiThreadedDispatcher.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/Browser/Avalonia.Browser/webapp/modules/avalonia/navigationHelper.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
Unfinished stub — throws NotImplementedException src/Avalonia.Base/Media/DrawingGroup.cs:248— `PushClipCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Base/Media/DrawingGroup.cs:281— `DrawBitmap` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Base/Styling/ValueStyleQuery.cs:22— `ToString` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:22— `BringIntoViewCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:23— `GetAcceleratorKeyCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:24— `GetAccessKeyCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:25— `GetAutomationControlTypeCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:26— `GetAutomationIdCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:27— `GetBoundingRectangleCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:28— `GetClassNameCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:29— `GetLabeledByCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:30— `GetNameCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:31— `GetHelpTextCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:32— `GetPlaceholderTextCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:33— `GetOrCreateChildrenCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:35— `HasKeyboardFocusCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:36— `IsContentElementCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:37— `IsControlElementCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:38— `IsEnabledCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:39— `IsKeyboardFocusableCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:40— `SetFocusCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:41— `ShowContextMenuCore` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Controls/ItemsSourceView.cs:258— `KeyFromIndex` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException src/Avalonia.Native/AvaloniaNativePlatform.cs:205— `CreateEmbeddableWindow` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Low cohesion: NavigationPageAppearancePage (LCOM4 10) samples/ControlCatalog/Pages/NavigationPage/NavigationPageAppearancePage.xaml.cs:9— NavigationPageAppearancePage's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: TextInputResponder (LCOM4 10) src/iOS/Avalonia.iOS/TextInputResponder.cs:20— TextInputResponder's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: EmbeddedView (LCOM4 9) samples/WinUIEmbedSample/EmbeddedView.axaml.cs:14— EmbeddedView's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ClipboardPage (LCOM4 8) samples/ControlCatalog/Pages/ClipboardPage.xaml.cs:18— ClipboardPage's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ShowWindowTest (LCOM4 7) samples/IntegrationTestApp/ShowWindowTest.axaml.cs:30— ShowWindowTest's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: PlatformRenderInterface (LCOM4 7) src/Skia/Avalonia.Skia/PlatformRenderInterface.cs:20— PlatformRenderInterface's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: GlyphTypeface (LCOM4 6) src/Avalonia.Base/Media/GlyphTypeface.cs:24— GlyphTypeface's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: WindowBaseImpl (LCOM4 6) src/Avalonia.Wayland/WindowImplBase.cs:28— WindowBaseImpl's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: App (LCOM4 5) samples/ControlCatalog/App.xaml.cs:15— App's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CarouselGalleryAppPage (LCOM4 5) samples/ControlCatalog/Pages/CarouselPage/CarouselGalleryAppPage.xaml.cs:9— CarouselGalleryAppPage's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: NavigationPerformanceMonitorHelper (LCOM4 5) samples/ControlCatalog/Pages/NavigationPerformanceMonitorHelper.cs:16— NavigationPerformanceMonitorHelper's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: InputElement (LCOM4 5) src/Avalonia.Base/Input/InputElement.cs:18— InputElement's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ServerCompositionVisual (LCOM4 5) src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual/ServerCompositionVisual.ComputedProperties.cs:7— ServerCompositionVisual's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Win32Platform (LCOM4 5) src/Windows/Avalonia.Win32/Win32Platform.cs:39— Win32Platform's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: TextBoxEditingPage (LCOM4 4) samples/ControlCatalog/Pages/TextBox/TextBoxEditingPage.xaml.cs:9— TextBoxEditingPage's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: DrawingContext (LCOM4 4) src/Avalonia.Base/Media/DrawingContext.cs:11— DrawingContext's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: GenericTextParagraphProperties (LCOM4 4) src/Avalonia.Base/Media/TextFormatting/GenericTextParagraphProperties.cs:6— GenericTextParagraphProperties's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ToggleSwitch (LCOM4 4) src/Avalonia.Controls/ToggleSwitch.cs:14— ToggleSwitch's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ManagedFileChooserViewModel (LCOM4 4) src/Avalonia.Dialogs/Internal/ManagedFileChooserViewModel.cs:16— ManagedFileChooserViewModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: DBusTextInputMethodBase (LCOM4 4) src/Avalonia.FreeDesktop/DBusIme/DBusTextInputMethodBase.cs:30— DBusTextInputMethodBase's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Win32DispatcherImpl (LCOM4 4) src/Windows/Avalonia.Win32/Win32DispatcherImpl.cs:10— Win32DispatcherImpl's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Duplicated block (7 lines × 2) src/Skia/Avalonia.Skia/StreamGeometryBuilder.cs:184— src/Skia/Avalonia.Skia/StreamGeometryBuilder.cs:184-190 | src/Skia/Avalonia.Skia/StreamGeometryBuilder.cs:201-207 — both copies are in the same file, so extract the 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 `src/Skia/Avalonia.Skia/StreamGeometryBuilder.cs:184` 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) src/tools/Avalonia.UnicodeTrieGenerator/UnicodeEnumsGenerator.cs:92— src/tools/Avalonia.UnicodeTrieGenerator/UnicodeEnumsGenerator.cs:92-98 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeEnumsGenerator.cs:294-300 — both copies are in the same file, so extract the 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, `src/tools/Avalonia.UnicodeTrieGenerator/UnicodeEnumsGenerator.cs:293` calls `WriteLine` and `src/tools/Avalonia.UnicodeTrieGenerator/UnicodeEnumsGenerator.cs:91` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) src/Avalonia.Base/Animation/Transitions/Rotate3DTransition.cs:151— src/Avalonia.Base/Animation/Transitions/Rotate3DTransition.cs:151-157 | src/Avalonia.Base/Animation/Transitions/Rotate3DTransition.cs:165-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSelectorTransformer.cs:478— src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSelectorTransformer.cs:478-484 | src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSelectorTransformer.cs:507-513 — both copies are in the same file, so extract the 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 `src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSelectorTransformer.cs:478` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/Avalonia.Wayland/Server/Interop/UnsafeNativeMethods.cs:70— src/Avalonia.Wayland/Server/Interop/UnsafeNativeMethods.cs:70-77 | src/Linux/Avalonia.LinuxFramebuffer/NativeUnsafeMethods.cs:22-28 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) src/Avalonia.X11/X11NativeControlHost.cs:182— src/Avalonia.X11/X11NativeControlHost.cs:182-189 | src/Windows/Avalonia.Win32/Win32NativeControlHost.cs:194-200 — 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 `src/Avalonia.X11/X11NativeControlHost.cs: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 (7 lines × 2) src/Avalonia.X11/X11Window.cs:527— src/Avalonia.X11/X11Window.cs:527-533 | src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs:64-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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 (7 lines × 2) src/Avalonia.Controls/Border.cs:167— src/Avalonia.Controls/Border.cs:167-173 | src/Avalonia.Controls/Presenters/ContentPresenter.cs:602-608 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs:38— src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs:38-44 | src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevel.cs:26-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) src/Avalonia.Controls/NativeMenuItem.cs:232— src/Avalonia.Controls/NativeMenuItem.cs:232-238 | src/Avalonia.Controls/Primitives/HeaderedContentControl.cs:91-97 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) src/Avalonia.Controls/Primitives/TabStrip.cs:35— src/Avalonia.Controls/Primitives/TabStrip.cs:35-41 | src/Avalonia.Controls/TabControl.cs:240-246 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) src/Avalonia.Themes.Fluent/FluentTheme.xaml.cs:37— src/Avalonia.Themes.Fluent/FluentTheme.xaml.cs:37-43 | src/Avalonia.Themes.Fluent2/Fluent2Theme.axaml.cs:37-43 — before extracting anything, compare `src/Avalonia.Themes.Fluent/FluentTheme.xaml.cs` and `src/Avalonia.Themes.Fluent2/Fluent2Theme.axaml.cs` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) src/Avalonia.Themes.Fluent/FluentTheme.xaml.cs:62— src/Avalonia.Themes.Fluent/FluentTheme.xaml.cs:62-68 | src/Avalonia.Themes.Fluent2/Fluent2Theme.axaml.cs:62-68 — before extracting anything, compare `src/Avalonia.Themes.Fluent/FluentTheme.xaml.cs` and `src/Avalonia.Themes.Fluent2/Fluent2Theme.axaml.cs` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) samples/ControlCatalog/Pages/Transitions/WaveRevealPageTransition.cs:320— samples/ControlCatalog/Pages/Transitions/WaveRevealPageTransition.cs:320-326 | samples/ControlCatalog/Pages/Transitions/WaveRevealPageTransition.cs:355-361 — both copies are in the same file, so extract the 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 `samples/ControlCatalog/Pages/Transitions/WaveRevealPageTransition.cs:320` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) samples/ControlCatalog/Pages/CarouselPage/CarouselPageEventsPage.xaml.cs:84— samples/ControlCatalog/Pages/CarouselPage/CarouselPageEventsPage.xaml.cs:84-90 | samples/ControlCatalog/Pages/TabbedPage/TabbedPageEventsPage.xaml.cs:74-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:712— src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:712-718 | src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:766-772 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:712` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:722— src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:722-728 | src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:776-782 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:722` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) samples/ControlCatalog/Pages/CompositionPage.axaml.cs:391— samples/ControlCatalog/Pages/CompositionPage.axaml.cs:391-397 | samples/ControlCatalog/Pages/CompositionPage.axaml.cs:424-430 — both copies are in the same file, so extract the 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) samples/ControlCatalog/Pages/TabbedPage/TabbedPageCollectionPage.xaml.cs:59— samples/ControlCatalog/Pages/TabbedPage/TabbedPageCollectionPage.xaml.cs:59-65 | samples/ControlCatalog/Pages/TabbedPage/TabbedPageFirstLookPage.xaml.cs:50-56 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
X18 · Disposal-pattern correctness· Disposes a dependency it does not own · ×18
Disposes a dependency it does not own src/Avalonia.Base/Input/AsyncToSyncDataTransfer.cs:44— `_asyncDataTransfer` is never created by `AsyncToSyncDataTransfer` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 44). Its declared type `IAsyncDataTransfer` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Base/Input/Cursor.cs:65— `PlatformImpl` is never created by `Cursor` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 65). Its declared type `ICursorImpl` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Base/Input/SyncToAsyncDataTransfer.cs:42— `dataTransfer` is never created by `SyncToAsyncDataTransfer` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 42). Its declared type `IDataTransfer` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Base/Media/GlyphTypeface.cs:1153— `PlatformTypeface` is never created by `GlyphTypeface` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 1153). Its declared type `IPlatformTypeface` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Base/Media/Imaging/RenderTargetBitmap.cs:88— `PlatformImpl` is never created by `RenderTargetBitmap` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 88). Its declared type `IRef` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Base/Media/ImmediateDrawingContext.cs:365— `PlatformImpl` is never created by `ImmediateDrawingContext` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 365). Its declared type `IDrawingContextImpl` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Base/Media/StreamGeometry.cs:118— `builder` is never created by `BuilderWrapper` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 118). Its declared type `IStreamGeometryBuilder` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Base/Media/StreamGeometryContext.cs:100— `_context` is never created by `StreamGeometryContext` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 100). Its declared type `IGeometryContext` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Base/Utilities/AsyncEnumerableHelper.cs:44— `_enumerator` is never created by `EnumeratorAsyncWrapper` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 44). Its declared type `IEnumerator` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.OpenGL/Composition/CompositionGlContext.cs:67— `GlContext` is never created by `CompositionGlContext` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 67). Its declared type `IGlContext` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.OpenGL/Controls/OpenGlControlResources.cs:135— `_compositionContext` is never created by `OpenGlControlBaseResources` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 135). Its declared type `ICompositionGlContext` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Remote.Protocol/TransportConnectionWrapper.cs:33— `_conn` is never created by `TransportConnectionWrapper` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 33). Its declared type `IAvaloniaRemoteTransportConnection` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Headless/Avalonia.Headless/HeadlessWindowImpl.cs:220— `_fb` is never created by `FramebufferProxy` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 220). Its declared type `ILockedFramebuffer` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Wayland/WindowImpl.cs:165— `_export` is never created by `XdgForeignPortalParentLease` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 165). Its declared type `IWaylandXdgTopLevelExport` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.X11/Selections/SelectionReadSession.cs:21— `eventWaiter` is never created by `SelectionReadSession` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 21). Its declared type `IXEventWaiter` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Native/AvaloniaNativeGlPlatformGraphics.cs:354— `inner` is never created by `MtlEventSemaphore` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 354). Its declared type `IAvnMTLSharedEvent` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Native/AvaloniaNativePlatform.cs:192— `_factory` is never created by `AvaloniaNativePlatform` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 192). Its declared type `IAvaloniaNativeFactory` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
Disposes a dependency it does not own src/Avalonia.Native/Metal.cs:146— `texture` is never created by `ImportedTexture` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 146). Its declared type `IAvnMetalTexture` is an interface, so the instance came from whoever resolved it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
No assertions: TwoWay_Binding_Should_Not_Fail_With_Null_DataContext tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Binding.cs:1101— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: TwoWay_Binding_Should_Not_Fail_With_Null_DataContext_Indexer tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Binding.cs:1110— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Can_Add_Null_Value tests/Avalonia.Base.UnitTests/Styling/ResourceDictionaryTests.cs:17— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Name_Can_Be_Set_While_Initializing tests/Avalonia.Base.UnitTests/Styling/StyledElementTests.cs:396— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Listeners_Can_Be_Added_By_Listener tests/Avalonia.Controls.UnitTests/ClassesTests.cs:173— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Listeners_Can_Be_Removed_By_Listener tests/Avalonia.Controls.UnitTests/ClassesTests.cs:184— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: In_First_Position_Doesnt_Throw_Exception tests/Avalonia.Controls.UnitTests/GridSplitterTests.cs:92— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Opening_Popup_Shouldnt_Throw_When_Not_In_Visual_Tree tests/Avalonia.Controls.UnitTests/Primitives/PopupTests.cs:57— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Opening_Popup_Shouldnt_Throw_When_In_Tree_Without_TopLevel tests/Avalonia.Controls.UnitTests/Primitives/PopupTests.cs:64— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Should_Not_Pass_Invalid_Arrange_Rect tests/Avalonia.Controls.UnitTests/Primitives/TrackTests.cs:143— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Can_Assign_ValueType_Collection_To_SelectionModel_Of_Object tests/Avalonia.Controls.UnitTests/Selection/SelectionModelTests_Single.cs:298— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Path_With_Null_Data_Does_Not_Throw_On_Measure tests/Avalonia.Controls.UnitTests/Shapes/PathTests.cs:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: AutomationId tests/Avalonia.IntegrationTests.Appium/AutomationTests.cs:13— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: MergeResourceInclude_Is_Allowed_After_ResourceInclude tests/Avalonia.Markup.Xaml.UnitTests/Xaml/MergeResourceIncludeTests.cs:89— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: Missing_ResourceKey_In_StyleInclude_Does_Not_Cause_StackOverflow tests/Avalonia.Markup.Xaml.UnitTests/Xaml/StyleIncludeTests.cs:233— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: DrawLine_With_Zero_Thickness_Pen_Does_Not_Throw tests/Avalonia.Skia.UnitTests/DrawingContextImplTests.cs:10— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: DrawRectangle_With_Zero_Thickness_Pen_Does_Not_Throw tests/Avalonia.Skia.UnitTests/DrawingContextImplTests.cs:17— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
Hotspot: src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:23— src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 182 in WindowImpl.AppWndProc at line 23. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Avalonia.X11/X11Window.cs src/Avalonia.X11/X11Window.cs:591— src/Avalonia.X11/X11Window.cs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in X11Window.OnEvent at line 591. 4 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Avalonia.X11/X11Window.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Avalonia.Controls/VirtualizingStackPanel.cs src/Avalonia.Controls/VirtualizingStackPanel.cs:242— src/Avalonia.Controls/VirtualizingStackPanel.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in VirtualizingStackPanel.ArrangeOverride at line 242. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Avalonia.Controls/VirtualizingStackPanel.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Avalonia.Controls/Primitives/Popup.cs src/Avalonia.Controls/Primitives/Popup.cs:429— src/Avalonia.Controls/Primitives/Popup.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in Popup.Open at line 429. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Avalonia.Controls/Primitives/Popup.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Avalonia.Base/Media/GlyphTypeface.cs src/Avalonia.Base/Media/GlyphTypeface.cs:833— src/Avalonia.Base/Media/GlyphTypeface.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in GlyphTypeface.TryGetGlyphMetrics at line 833. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Avalonia.Base/Media/GlyphTypeface.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:671— src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in TextLineImpl.GetTextBounds at line 671. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Skia/Avalonia.Skia/DrawingContextImpl.cs src/Skia/Avalonia.Skia/DrawingContextImpl.cs:934— src/Skia/Avalonia.Skia/DrawingContextImpl.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in DrawingContextImpl.ConfigureGradientBrush at line 934. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Skia/Avalonia.Skia/DrawingContextImpl.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs:141— src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in ServerCompositionTarget.Render at line 141. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Avalonia.Controls/WrapPanel.cs src/Avalonia.Controls/WrapPanel.cs:284— src/Avalonia.Controls/WrapPanel.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in WrapPanel.ArrangeOverride at line 284. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Avalonia.Controls/WrapPanel.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Android/Avalonia.Android/Platform/Input/AndroidInputMethod.cs src/Android/Avalonia.Android/Platform/Input/AndroidInputMethod.cs:164— src/Android/Avalonia.Android/Platform/Input/AndroidInputMethod.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in AndroidInputMethod.SetOptions at line 164. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Android/Avalonia.Android/Platform/Input/AndroidInputMethod.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/iOS/Avalonia.iOS/InputHandler.cs src/iOS/Avalonia.iOS/InputHandler.cs:50— src/iOS/Avalonia.iOS/InputHandler.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in InputHandler.Handle at line 50. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/iOS/Avalonia.iOS/InputHandler.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Avalonia.X11/X11Info.cs src/Avalonia.X11/X11Info.cs:48— src/Avalonia.X11/X11Info.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in X11Info.X11Info.ctor at line 48. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Avalonia.X11/X11Info.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:855— src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in FontCollectionBase.TryGetGlyphTypeface at line 855. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Windows/Avalonia.Win32/Win32Platform.cs src/Windows/Avalonia.Win32/Win32Platform.cs:143— src/Windows/Avalonia.Win32/Win32Platform.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in Win32Platform.WndProc at line 143. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Windows/Avalonia.Win32/Win32Platform.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs:294— src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in TextCharacters.TryGetShapeableLength at line 294. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
ClassTooLong: UnmanagedMethods src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs— ClassTooLong — 1579 significant lines (blank, comment-only and punctuation-only lines excluded), 216 methods. The bar is 400 significant lines; this is 1179 over it, 3.95× the bar. Its members are declarations rather than behaviour over shared data — the type holds no instance state — so there is nothing to group them by and nothing to delegate. To reduce it, split it by area instead: move each cohesive group of declarations onto its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: ColorSpectrum src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs— ClassTooLong — 1096 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 696 over it, 2.74× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TextLineImpl src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs— ClassTooLong — 700 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 300 over it, 1.75× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: BidiAlgorithm src/Avalonia.Base/Media/TextFormatting/Unicode/BiDiAlgorithm.cs— ClassTooLong — 651 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 251 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: XLib src/Avalonia.X11/XLib.cs— ClassTooLong — 597 significant lines (blank, comment-only and punctuation-only lines excluded), 212 methods, declared across 2 files: Avalonia.X11/XLib.cs (209), Avalonia.X11/XLib.Helpers.cs (3). The bar is 400 significant lines; this is 197 over it, 1.49× the bar. Its members are declarations rather than behaviour over shared data — the type holds no instance state — so there is nothing to group them by and nothing to delegate. To reduce it, split it by area instead: move each cohesive group of declarations onto its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: TextFormatterImpl src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs— ClassTooLong — 546 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 146 over it, 1.37× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: XkbKeyTransform src/Avalonia.Wayland/XkbKeyTransform.cs— ClassTooLong — 490 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 90 over it, 1.23× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: XamlCompilerTaskExecutor src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs— ClassTooLong — 479 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods, declared across 2 files: Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs (5), Avalonia.Build.Tasks/XamlCompilerTaskExecutor.Helpers.cs (2). The bar is 400 significant lines; this is 79 over it, 1.20× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: EllipticalArc src/Avalonia.Base/Media/PreciseEllipticArcHelper.cs— ClassTooLong — 470 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 70 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ConnectedAnimation src/Avalonia.Controls/Animation/ConnectedAnimation.cs— ClassTooLong — 449 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 49 over it, 1.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Handler src/Avalonia.X11/Selections/DragDrop/X11DragSource.cs— ClassTooLong — 427 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 27 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: GlyphTypeface src/Avalonia.Base/Media/GlyphTypeface.cs— ClassTooLong — 427 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 27 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: OleDataObjectHelper src/Windows/Avalonia.Win32/OleDataObjectHelper.cs— ClassTooLong — 409 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 9 over it, 1.02× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: CompileAnalyzer src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs— ClassTooLong — 409 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 9 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SbomGenerator nukebuild/SbomGenerator.cs— ClassTooLong — 405 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 5 over it, 1.01× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
async void method: UpdateBackground src/Avalonia.Controls.ColorPicker/ColorSlider/ColorSlider.cs:91— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: CreateBitmapsAndColorMap src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1049— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: StartContentTransition src/Avalonia.Controls/Expander.cs:221— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: OnKeyDown src/Avalonia.Controls/MaskedTextBox.cs:199— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: BackButton_Clicked src/Avalonia.Controls/Page/NavigationPage.cs:791— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: Copy src/Avalonia.Controls/SelectableTextBlock.cs:118— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: Cut src/Avalonia.Controls/TextBox.cs:1303— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: Copy src/Avalonia.Controls/TextBox.cs:1341— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: Paste src/Avalonia.Controls/TextBox.cs:1373— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: UpdaterThread src/Avalonia.DesignerSupport/Remote/FileWatcherTransport.cs:71— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: AcceptWorker REDACTED:87— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: Button_OnClick src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml.cs:24— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: OnSelectionChangedAsync src/Avalonia.Dialogs/Internal/ManagedFileChooserViewModel.cs:206— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: OnDataContextChanged src/Avalonia.Dialogs/ManagedFileChooser.cs:57— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: Worker src/Avalonia.Remote.Protocol/TransportConnectionWrapper.cs:35— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
Duplicated block (10 lines × 2) src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin`1.cs:21— src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin`1.cs:21-30 | src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/TaskStreamPlugin.cs:23-32 — before extracting anything, compare `src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin`1.cs` and `src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/TaskStreamPlugin.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin`1.cs:21` 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) src/Avalonia.Controls/RelativePanel.cs:418— src/Avalonia.Controls/RelativePanel.cs:418-427 | src/Avalonia.Controls/RelativePanel.cs:449-458 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls/RelativePanel.cs:418` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/Avalonia.Controls/RelativePanel.cs:434— src/Avalonia.Controls/RelativePanel.cs:434-443 | src/Avalonia.Controls/RelativePanel.cs:464-473 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls/RelativePanel.cs:434` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/Avalonia.Base/Styling/ScreenQueries.cs:21— src/Avalonia.Base/Styling/ScreenQueries.cs:21-30 | src/Avalonia.Base/Styling/ScreenQueries.cs:97-106 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Styling/ScreenQueries.cs:21` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:821— src/Avalonia.Controls/VirtualizingCarouselPanel.cs:821-830 | src/Avalonia.Controls/VirtualizingStackPanel.cs:1098-1107 — 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 `src/Avalonia.Controls/VirtualizingCarouselPanel.cs:821` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin`1.cs:39— src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin`1.cs:39-48 | src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/TaskStreamPlugin.cs:41-50 — before extracting anything, compare `src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin`1.cs` and `src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/TaskStreamPlugin.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) src/Avalonia.Base/PixelRect.cs:221— src/Avalonia.Base/PixelRect.cs:221-230 | src/Avalonia.Base/Rect.cs:347-356 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) src/tools/Avalonia.Generators/PropertyGenerator/PropertyGenEmitter.cs:123— src/tools/Avalonia.Generators/PropertyGenerator/PropertyGenEmitter.cs:123-132 | src/tools/Avalonia.Generators/PropertyGenerator/PropertyGenEmitter.cs:171-180 — both copies are in the same file, so extract the 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, `src/tools/Avalonia.Generators/PropertyGenerator/PropertyGenEmitter.cs:170` calls `Add` and `src/tools/Avalonia.Generators/PropertyGenerator/PropertyGenEmitter.cs:122` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1387— src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1387-1396 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1573-1582 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1387` 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 (10 lines × 2) src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:203— src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:203-213 | src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:231-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/Skia/Avalonia.Skia/DrawingContextImpl.cs:945— src/Skia/Avalonia.Skia/DrawingContextImpl.cs:945-954 | src/Skia/Avalonia.Skia/DrawingContextImpl.cs:1091-1100 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/Avalonia.Controls/TableViewCell.cs:24— src/Avalonia.Controls/TableViewCell.cs:24-33 | src/Avalonia.Controls/TableViewColumnHeader.cs:33-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:32— samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:32-41 | samples/ControlCatalog/Pages/NavigationPage/Transitions/ParallaxSlideTransition.cs:33-42 — before extracting anything, compare `samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs` and `samples/ControlCatalog/Pages/NavigationPage/Transitions/ParallaxSlideTransition.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 92 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) src/Avalonia.Base/Utilities/FrugalList.cs:1046— src/Avalonia.Base/Utilities/FrugalList.cs:1046-1050 | src/Avalonia.Base/Utilities/FrugalList.cs:1061-1065 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) src/tools/DevGenerators/CompositionGenerator/Generator.cs:203— src/tools/DevGenerators/CompositionGenerator/Generator.cs:203-207 | src/tools/DevGenerators/CompositionGenerator/Generator.cs:342-346 — both copies are in the same file, so extract the 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 `src/tools/DevGenerators/CompositionGenerator/Generator.cs:203` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/Avalonia.Base/Data/Core/ExpressionNodes/PropertyAccessorNode.cs:34— src/Avalonia.Base/Data/Core/ExpressionNodes/PropertyAccessorNode.cs:34-38 | src/Avalonia.Base/Data/Core/ExpressionNodes/Reflection/DynamicPluginPropertyAccessorNode.cs:34-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) src/Avalonia.Base/Data/Core/Parsers/BindingExpressionVisitor.cs:462— src/Avalonia.Base/Data/Core/Parsers/BindingExpressionVisitor.cs:462-466 | src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/PropertyInfoAccessorFactory.cs:180-184 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) src/Avalonia.Base/Data/Core/Parsers/BindingExpressionVisitor.cs:469— src/Avalonia.Base/Data/Core/Parsers/BindingExpressionVisitor.cs:469-473 | src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/PropertyInfoAccessorFactory.cs:187-191 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) src/Avalonia.Base/StyledElement.cs:241— src/Avalonia.Base/StyledElement.cs:241-245 | src/Avalonia.Controls/Application.cs:141-145 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:130— src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:130-134 | src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSelectorTransformer.cs:305-309 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:226— src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:226-230 | src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSelectorTransformer.cs:400-404 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) src/Windows/Avalonia.Win32/DComposition/DirectCompositedWindowSurface.cs:99— src/Windows/Avalonia.Win32/DComposition/DirectCompositedWindowSurface.cs:99-103 | src/Windows/Avalonia.Win32/WinRT/Composition/WinUiCompositedWindowSurface.cs:135-139 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) src/Windows/Avalonia.Win32/Input/Imm32InputMethod.cs:431— src/Windows/Avalonia.Win32/Input/Imm32InputMethod.cs:431-435 | src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:1397-1401 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) samples/ControlCatalog/Pages/DrawerPage/DrawerPageCompactPage.xaml.cs:55— samples/ControlCatalog/Pages/DrawerPage/DrawerPageCompactPage.xaml.cs:55-59 | samples/ControlCatalog/Pages/DrawerPage/DrawerPageCustomizationPage.xaml.cs:96-100 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) samples/ControlCatalog/Pages/NavigationPage/NavigationPageModalTransitionsPage.xaml.cs:64— samples/ControlCatalog/Pages/NavigationPage/NavigationPageModalTransitionsPage.xaml.cs:64-68 | samples/ControlCatalog/Pages/NavigationPage/NavigationPageTransitionsPage.xaml.cs:37-41 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) samples/ControlCatalog/Pages/CarouselPage/CarouselPagePerformancePage.xaml.cs:97— samples/ControlCatalog/Pages/CarouselPage/CarouselPagePerformancePage.xaml.cs:97-101 | samples/ControlCatalog/Pages/TabbedPage/TabbedPagePerformancePage.xaml.cs:87-91 — 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 `samples/ControlCatalog/Pages/CarouselPage/CarouselPagePerformancePage.xaml.cs:97` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/Avalonia.Base/Input/InputExtensions.cs:108— src/Avalonia.Base/Input/InputExtensions.cs:108-113 | src/Avalonia.Base/Input/InputExtensions.cs:135-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) src/Avalonia.Base/Media/Color.cs:234— src/Avalonia.Base/Media/Color.cs:234-239 | src/Avalonia.Base/Media/Color.cs:244-249 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Media/Color.cs:234` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) src/Avalonia.Base/Media/Imaging/PixelFormatReaders.cs:300— src/Avalonia.Base/Media/Imaging/PixelFormatReaders.cs:300-305 | src/Avalonia.Base/Media/Imaging/PixelFormatReaders.cs:324-329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) src/Avalonia.Controls/Animation/ConnectedAnimation.cs:308— src/Avalonia.Controls/Animation/ConnectedAnimation.cs:308-317 | src/Avalonia.Controls/Animation/ConnectedAnimation.cs:540-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) src/Avalonia.Controls/TextBox.cs:2751— src/Avalonia.Controls/TextBox.cs:2751-2756 | src/Avalonia.Controls/TextBox.cs:2767-2772 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls/TextBox.cs:2751` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/Avalonia.FreeDesktop.AtSpi/Handlers/AtSpiEditableTextHandler.cs:26— src/Avalonia.FreeDesktop.AtSpi/Handlers/AtSpiEditableTextHandler.cs:26-31 | src/Avalonia.FreeDesktop.AtSpi/Handlers/AtSpiEditableTextHandler.cs:51-56 — both copies are in the same file, so extract the 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 `src/Avalonia.FreeDesktop.AtSpi/Handlers/AtSpiEditableTextHandler.cs:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) src/Avalonia.Base/Collections/Pooled/PooledList.cs:377— src/Avalonia.Base/Collections/Pooled/PooledList.cs:377-382 | src/Avalonia.Base/Collections/Pooled/PooledStack.cs:238-243 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) src/Avalonia.Controls/Automation/Peers/EmbeddableControlRootAutomationPeer.cs:47— src/Avalonia.Controls/Automation/Peers/EmbeddableControlRootAutomationPeer.cs:47-52 | src/Avalonia.Controls/Automation/Peers/WindowBaseAutomationPeer.cs:55-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) src/Android/Avalonia.Android/PlatformIconLoader.cs:11— src/Android/Avalonia.Android/PlatformIconLoader.cs:11-16 | src/Android/Avalonia.Android/Stubs.cs:24-29 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs:62— src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs:62-67 | src/Avalonia.Themes.Fluent2/ColorPaletteResourcesCollection.cs:62-67 — `src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs` and `src/Avalonia.Themes.Fluent2/ColorPaletteResourcesCollection.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 50 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs:71— src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs:71-76 | src/Avalonia.Themes.Fluent2/ColorPaletteResourcesCollection.cs:71-76 — `src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs` and `src/Avalonia.Themes.Fluent2/ColorPaletteResourcesCollection.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 50 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) samples/IntegrationTestApp/Pages/ScreensPage.axaml.cs:50— samples/IntegrationTestApp/Pages/ScreensPage.axaml.cs:50-55 | samples/IntegrationTestApp/Pages/ScreensPage.axaml.cs:62-67 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:282— samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:282-287 | samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:623-628 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Sync-over-async (deadlock risk) src/Avalonia.Base/Input/AsyncToSyncDataTransferItem.cs:20— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) src/Avalonia.Base/Media/MediaContext.Compositor.cs:108— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawingSurface.cs:40— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) src/Avalonia.Base/Threading/DispatcherOperation.cs:192— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) src/Avalonia.Base/Threading/DispatcherPriorityAwaitable.cs:77— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) src/Avalonia.Base/Threading/DispatcherPriorityAwaitable.cs:146— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) src/Avalonia.Controls/TopLevel.cs:619— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) src/Android/Avalonia.Android/Platform/AndroidDragDrop.cs:161— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) src/Headless/Avalonia.Headless.NUnit/AvaloniaTestMethodCommand.cs:78— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) src/Headless/Avalonia.Headless.XUnit/AvaloniaDelayEnumeratedTheoryTestCase.cs:65— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) src/Headless/Avalonia.Headless.XUnit/AvaloniaTestCase.cs:64— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) src/Headless/Avalonia.Headless/AvaloniaHeadlessPlatform.cs:86— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
Sync-over-async (deadlock risk) src/Headless/Avalonia.Headless/HeadlessUnitTestSession.cs:134— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
DeadPreprocessorBranch nukebuild/BuildTasksPatcher.cs:123— #if ISNETFULLFRAMEWORK — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch src/Avalonia.Base/Collections/Pooled/ThrowHelper.cs:411— #if false // Reflection-based implementation does not work for CoreRT/ProjectN — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch src/Avalonia.Base/Collections/Pooled/ThrowHelper.cs:551— #if false // Reflection-based implementation does not work for CoreRT/ProjectN — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch src/Avalonia.Base/Media/FormattedText.cs:975— #if NEVER — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch src/Avalonia.Base/Rendering/Composition/Compositor.cs:143— #if DEBUG_COMPOSITOR_SERIALIZATION — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch src/Avalonia.Base/Rendering/Composition/Server/ServerCompositor.cs:114— #if DEBUG_COMPOSITOR_SERIALIZATION — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:959— #if USE_MANAGED_DRAG — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch src/Windows/Avalonia.Win32/WindowImpl.cs:70— #if USE_MANAGED_DRAG — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch src/Windows/Avalonia.Win32/WindowImpl.cs:129— #if USE_MANAGED_DRAG — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch src/Windows/Avalonia.Win32/WindowImpl.cs:789— #if USE_MANAGED_DRAG — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch src/Windows/Avalonia.Win32/WindowImpl.cs:1553— #if USE_MANAGED_DRAG — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
DeadPreprocessorBranch tests/Avalonia.IntegrationTests.Appium/TestBase.cs:42— #if DETECT_MISBEHAVING_TEST — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
Duplicated block (9 lines × 2) src/Windows/Avalonia.Win32/DComposition/DirectCompositedWindowSurface.cs:139— src/Windows/Avalonia.Win32/DComposition/DirectCompositedWindowSurface.cs:139-147 | src/Windows/Avalonia.Win32/WinRT/Composition/WinUiCompositedWindowSurface.cs:187-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Windows/Avalonia.Win32/DComposition/DirectCompositedWindowSurface.cs:139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/Avalonia.Controls/WrapPanel.cs:226— src/Avalonia.Controls/WrapPanel.cs:226-234 | src/Avalonia.Controls/WrapPanel.cs:298-306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/Avalonia.Base/Media/Color.cs:154— src/Avalonia.Base/Media/Color.cs:154-165 | src/Avalonia.Base/Media/Color.cs:166-174 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Media/Color.cs:154` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) src/Avalonia.Controls/DateTimePickers/DatePickerPresenter.cs:352— src/Avalonia.Controls/DateTimePickers/DatePickerPresenter.cs:352-360 | src/Avalonia.Controls/DateTimePickers/TimePickerPresenter.cs:245-253 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Avalonia.Controls/DateTimePickers/DatePickerPresenter.cs:361` calls `SetCurrentValue` and `src/Avalonia.Controls/DateTimePickers/TimePickerPresenter.cs:254` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) src/Avalonia.X11/X11Enums.cs:73— src/Avalonia.X11/X11Enums.cs:73-81 | src/Avalonia.X11/X11Structs.cs:1156-1164 — 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 `src/Avalonia.X11/X11Enums.cs:73` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/Avalonia.Themes.Fluent/ColorPaletteResources.Properties.cs:5— src/Avalonia.Themes.Fluent/ColorPaletteResources.Properties.cs:5-13 | src/Avalonia.Themes.Fluent2/ColorPaletteResources.Properties.cs:5-13 — `src/Avalonia.Themes.Fluent/ColorPaletteResources.Properties.cs` and `src/Avalonia.Themes.Fluent2/ColorPaletteResources.Properties.cs` 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 2 separate duplicated blocks between them, totalling at least 147 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Themes.Fluent/ColorPaletteResources.Properties.cs:5` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/Avalonia.Base/Data/Core/Parsers/BindingExpressionVisitor.cs:403— src/Avalonia.Base/Data/Core/Parsers/BindingExpressionVisitor.cs:403-411 | src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/PropertyInfoAccessorFactory.cs:108-119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) src/Avalonia.Base/Utilities/IdentifierParser.cs:14— src/Avalonia.Base/Utilities/IdentifierParser.cs:14-22 | src/Avalonia.Base/Utilities/StyleClassParser.cs:10-18 — before extracting anything, compare `src/Avalonia.Base/Utilities/IdentifierParser.cs` and `src/Avalonia.Base/Utilities/StyleClassParser.cs` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) src/Avalonia.Controls/DateTimePickers/DatePickerPresenter.cs:313— src/Avalonia.Controls/DateTimePickers/DatePickerPresenter.cs:313-321 | src/Avalonia.Controls/DateTimePickers/TimePickerPresenter.cs:211-219 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) src/Avalonia.X11/Dispatching/X11PlatformThreading.cs:188— src/Avalonia.X11/Dispatching/X11PlatformThreading.cs:188-196 | src/Linux/Avalonia.LinuxFramebuffer/EpollDispatcherImpl.cs:214-222 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) src/Avalonia.Themes.Fluent/FluentTheme.xaml.cs:72— src/Avalonia.Themes.Fluent/FluentTheme.xaml.cs:72-80 | src/Avalonia.Themes.Fluent2/Fluent2Theme.axaml.cs:72-80 — before extracting anything, compare `src/Avalonia.Themes.Fluent/FluentTheme.xaml.cs` and `src/Avalonia.Themes.Fluent2/Fluent2Theme.axaml.cs` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) samples/ControlCatalog/Pages/ContextFlyoutPage.xaml.cs:49— samples/ControlCatalog/Pages/ContextFlyoutPage.xaml.cs:49-57 | samples/ControlCatalog/Pages/ContextMenuPage.xaml.cs:40-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.
Duplicated block (12 lines × 2) src/Avalonia.Controls/StackPanel.cs:434— src/Avalonia.Controls/StackPanel.cs:434-445 | src/Avalonia.Controls/VirtualizingStackPanel.cs:1436-1447 — 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 `src/Avalonia.Controls/StackPanel.cs:434` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:802— src/Avalonia.Controls/VirtualizingCarouselPanel.cs:802-813 | src/Avalonia.Controls/VirtualizingStackPanel.cs:1079-1090 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (12 lines × 2) src/Avalonia.Controls/TextBox.cs:1976— src/Avalonia.Controls/TextBox.cs:1976-1987 | src/Avalonia.Controls/TextBox.cs:2017-2028 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:842— src/Avalonia.Controls/VirtualizingCarouselPanel.cs:842-853 | src/Avalonia.Controls/VirtualizingStackPanel.cs:1120-1131 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) src/Android/Avalonia.Android/Platform/Storage/AndroidStorageItem.cs:279— src/Android/Avalonia.Android/Platform/Storage/AndroidStorageItem.cs:279-290 | src/Android/Avalonia.Android/Platform/Storage/AndroidStorageItem.cs:570-581 — both copies are in the same file, so extract the 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 `src/Android/Avalonia.Android/Platform/Storage/AndroidStorageItem.cs:279` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:333— src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:333-344 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:407-418 — both copies are in the same file, so extract the 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 `src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:333` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) src/Avalonia.Base/Utilities/AvaloniaPropertyDictionary.cs:240— src/Avalonia.Base/Utilities/AvaloniaPropertyDictionary.cs:240-251 | src/Avalonia.Base/Utilities/AvaloniaPropertyDictionary.cs:280-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Base/Utilities/AvaloniaPropertyDictionary.cs:240` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/Avalonia.Base/Utilities/FrugalList.cs:574— src/Avalonia.Base/Utilities/FrugalList.cs:574-586 | src/Avalonia.Base/Utilities/FrugalList.cs:1031-1042 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Base/Utilities/FrugalList.cs:574` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/Windows/Avalonia.Win32/WinRT/Composition/WinUiCompositionUtils.cs:41— src/Windows/Avalonia.Win32/WinRT/Composition/WinUiCompositionUtils.cs:41-52 | src/Windows/Avalonia.Win32/WinRT/Composition/WinUiCompositionUtils.cs:55-66 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) src/Avalonia.Controls/PresentationSource/PresentationSource.cs:109— src/Avalonia.Controls/PresentationSource/PresentationSource.cs:109-120 | src/Avalonia.Controls/TopLevel.cs:832-843 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) samples/IntegrationTestApp/ViewModels/ViewModelBase.cs:12— samples/IntegrationTestApp/ViewModels/ViewModelBase.cs:12-23 | samples/MiniMvvm/ViewModelBase.cs:12-23 — before extracting anything, compare `samples/IntegrationTestApp/ViewModels/ViewModelBase.cs` and `samples/MiniMvvm/ViewModelBase.cs` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) src/Avalonia.Controls/Page/NavigationPage.cs:1059— src/Avalonia.Controls/Page/NavigationPage.cs:1059-1066 | src/Avalonia.Controls/Page/NavigationPage.cs:1168-1175 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls/Page/NavigationPage.cs:1059` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/Avalonia.Base/Styling/AndQuery.cs:56— src/Avalonia.Base/Styling/AndQuery.cs:56-63 | src/Avalonia.Base/Styling/OrQuery.cs:56-63 — 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 `src/Avalonia.Base/Styling/AndQuery.cs:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs:80— src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs:80-87 | src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs:91-98 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) src/tools/DevGenerators/EnumMemberDictionaryGenerator.cs:19— src/tools/DevGenerators/EnumMemberDictionaryGenerator.cs:19-26 | src/tools/DevGenerators/GetProcAddressInitialization.cs:22-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) src/Avalonia.Base/Utilities/MathUtilities.cs:429— src/Avalonia.Base/Utilities/MathUtilities.cs:429-436 | src/Avalonia.Base/Utilities/MathUtilities.cs:438-445 — both copies are in the same file, so extract the 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) src/Skia/Avalonia.Skia/DrawingContextImpl.cs:1502— src/Skia/Avalonia.Skia/DrawingContextImpl.cs:1502-1516 | src/Skia/Avalonia.Skia/Helpers/SKPathHelper.cs:52-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) src/Avalonia.Base/Media/Effects/Effect.cs:24— src/Avalonia.Base/Media/Effects/Effect.cs:24-31 | src/Avalonia.Base/Media/ExperimentalAcrylicMaterial.cs:280-287 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) src/Avalonia.Base/PixelSize.cs:131— src/Avalonia.Base/PixelSize.cs:131-138 | src/Avalonia.Base/Size.cs:244-251 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) samples/RenderDemo/Pages/GlyphRunPage.xaml.cs:25— samples/RenderDemo/Pages/GlyphRunPage.xaml.cs:25-32 | samples/RenderDemo/Pages/GlyphRunPage.xaml.cs:84-91 — both copies are in the same file, so extract the 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) samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:283— samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:283-290 | samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:455-462 — both copies are in the same file, so extract the 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) samples/ControlCatalog/Pages/ContextFlyoutPage.xaml.cs:21— samples/ControlCatalog/Pages/ContextFlyoutPage.xaml.cs:21-28 | samples/ControlCatalog/Pages/ContextMenuPage.xaml.cs:20-27 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) src/Avalonia.Base/Rendering/Composition/Expressions/TokenParser.cs:159— src/Avalonia.Base/Rendering/Composition/Expressions/TokenParser.cs:159-169 | src/Avalonia.Base/Rendering/Composition/Expressions/TokenParser.cs:183-193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Base/Rendering/Composition/Expressions/TokenParser.cs:159` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) src/Avalonia.Base/Media/PreciseEllipticArcHelper.cs:721— src/Avalonia.Base/Media/PreciseEllipticArcHelper.cs:721-731 | src/Avalonia.Base/Media/PreciseEllipticArcHelper.cs:733-743 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/Headless/Avalonia.Headless/HeadlessPlatformRenderInterface.cs:331— src/Headless/Avalonia.Headless/HeadlessPlatformRenderInterface.cs:331-341 | src/Headless/Avalonia.Headless/HeadlessPlatformRenderInterface.cs:491-501 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) src/Skia/Avalonia.Skia/ImmutableBitmap.cs:68— src/Skia/Avalonia.Skia/ImmutableBitmap.cs:68-78 | src/Skia/Avalonia.Skia/WriteableBitmapImpl.cs:46-56 — 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 `src/Skia/Avalonia.Skia/ImmutableBitmap.cs:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/Avalonia.Base/Input/FocusManager.cs:659— src/Avalonia.Base/Input/FocusManager.cs:659-669 | src/Avalonia.Base/Input/FocusManager.cs:760-770 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Input/FocusManager.cs:659` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/Avalonia.Controls/SplitView/SplitView.cs:527— src/Avalonia.Controls/SplitView/SplitView.cs:527-537 | src/Avalonia.Controls/SplitView/SplitView.cs:538-548 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:147— src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:147-157 | src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:239-251 — both copies are in the same file, so extract the 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 `src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:147` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:252` calls `DeleteObject` and `src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:158` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) src/Avalonia.Native/IAvnMenu.cs:52— src/Avalonia.Native/IAvnMenu.cs:52-62 | src/Avalonia.Native/IAvnMenuItem.cs:27-37 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) src/Windows/Avalonia.Win32/DComposition/DirectCompositedWindowSurface.cs:186— src/Windows/Avalonia.Win32/DComposition/DirectCompositedWindowSurface.cs:186-196 | src/Windows/Avalonia.Win32/WinRT/Composition/WinUiCompositedWindowSurface.cs:234-244 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) samples/SafeAreaDemo/App.xaml.cs:22— samples/SafeAreaDemo/App.xaml.cs:22-32 | samples/SingleProjectSandbox/App.axaml.cs:24-34 — 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 `samples/SafeAreaDemo/App.xaml.cs:22` 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) samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:179— samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:179-189 | samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:324-334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
HackComment samples/IntegrationTestApp/MainWindow.axaml.cs:62— // HACK: Toggling the window decorations can cause the window to be moved off screen, — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/Avalonia.Base/Animation/Animators/TransformAnimator.cs:32— // HACK: This animator cannot reasonably animate CSS transforms at the moment. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/Avalonia.Base/Input/IInputRoot.cs:32— // HACK: This is a temporary hack for "default focus" concept. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/Avalonia.Base/Input/KeyboardNavigationHandler.cs:81— // HACK: a window should always have some element focused, — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/Avalonia.Controls/LayoutTransformControl.cs:166— // HACK: In theory, this method and the UseRenderTransform shouldn't exist but — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/Avalonia.Controls/MenuItem.cs:155— // HACK: This nasty but it's all WPF's fault. Grid uses an inherited attached — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs:152— // HACK: #8179 needs to be addressed to correctly implement it in the PointerPressed method. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/Avalonia.Wayland/WindowImpl.cs:132— // HACK: relies on focus root being TopLevel which currently is true — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment src/Avalonia.X11/X11Window.cs:308— // HACK: this relies on focus root being TopLevel which currently is true — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
Duplicated block (15 lines × 2) src/Avalonia.Base/Media/PathMarkupParser.cs:320— src/Avalonia.Base/Media/PathMarkupParser.cs:320-334 | src/Avalonia.Base/Media/PathMarkupParser.cs:346-360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) src/Avalonia.Base/Reactive/AvaloniaPropertyBindingObservable.cs:28— src/Avalonia.Base/Reactive/AvaloniaPropertyBindingObservable.cs:28-42 | src/Avalonia.Base/Reactive/AvaloniaPropertyObservable.cs:28-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) src/Avalonia.Base/Styling/Activators/AndActivator.cs:27— src/Avalonia.Base/Styling/Activators/AndActivator.cs:27-41 | src/Avalonia.Base/Styling/Activators/AndQueryActivator.cs:31-45 — before extracting anything, compare `src/Avalonia.Base/Styling/Activators/AndActivator.cs` and `src/Avalonia.Base/Styling/Activators/AndQueryActivator.cs` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) src/Avalonia.Base/Media/Color.cs:183— src/Avalonia.Base/Media/Color.cs:183-197 | src/Avalonia.Base/Media/Color.cs:249-263 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Media/Color.cs:183` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) src/Avalonia.Base/Media/Fonts/Tables/Glyf/SimpleGlyph.cs:230— src/Avalonia.Base/Media/Fonts/Tables/Glyf/SimpleGlyph.cs:230-244 | src/Avalonia.Base/Media/Fonts/Tables/Glyf/SimpleGlyph.cs:274-288 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Media/Fonts/Tables/Glyf/SimpleGlyph.cs:230` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/Avalonia.Base/Data/Core/TypedBindingExpression.cs:93— src/Avalonia.Base/Data/Core/TypedBindingExpression.cs:93-107 | src/Avalonia.Base/Data/Core/UntypedBindingExpressionBase.cs:180-194 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) src/Avalonia.Controls/Flyouts/Flyout.cs:75— src/Avalonia.Controls/Flyouts/Flyout.cs:75-89 | src/Avalonia.Controls/Flyouts/MenuFlyout.cs:97-111 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) src/Avalonia.Themes.Fluent/ColorPaletteResources.cs:104— src/Avalonia.Themes.Fluent/ColorPaletteResources.cs:104-118 | src/Avalonia.Themes.Fluent2/ColorPaletteResources.cs:153-167 — `src/Avalonia.Themes.Fluent/ColorPaletteResources.cs` and `src/Avalonia.Themes.Fluent2/ColorPaletteResources.cs` 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 2 separate duplicated blocks between them, totalling at least 64 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) samples/ControlCatalog/Pages/CarouselPage/CarouselPageEventsPage.xaml.cs:26— samples/ControlCatalog/Pages/CarouselPage/CarouselPageEventsPage.xaml.cs:26-45 | samples/ControlCatalog/Pages/TabbedPage/TabbedPageEventsPage.xaml.cs:25-39 — 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.
BareSuppressMessage src/Avalonia.Controls/FlexPanel/FlexAlignItems.cs:8— SuppressMessage — the suppression records no reason: either it carries no justification argument at all, or one that states nothing a reader can weigh ("OK", "By design"). A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited. Write what makes this site legitimately different — the invariant that holds, the framework contract that forces the shape — or remove the suppression and fix what it hides.
BareSuppressMessage src/Avalonia.Controls/FlexPanel/FlexBasis.cs:65— SuppressMessage — the suppression records no reason: either it carries no justification argument at all, or one that states nothing a reader can weigh ("OK", "By design"). A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited. Write what makes this site legitimately different — the invariant that holds, the framework contract that forces the shape — or remove the suppression and fix what it hides.
BareSuppressMessage src/Avalonia.Controls/TableView.cs:117— SuppressMessage — the suppression records no reason: either it carries no justification argument at all, or one that states nothing a reader can weigh ("OK", "By design"). A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited. Write what makes this site legitimately different — the invariant that holds, the framework contract that forces the shape — or remove the suppression and fix what it hides.
BareSuppressMessage src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs:446— SuppressMessage — the suppression records no reason: either it carries no justification argument at all, or one that states nothing a reader can weigh ("OK", "By design"). A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited. Write what makes this site legitimately different — the invariant that holds, the framework contract that forces the shape — or remove the suppression and fix what it hides.
BareSuppressMessage src/iOS/Avalonia.iOS/AvaloniaView.cs:100— SuppressMessage — the suppression records no reason: either it carries no justification argument at all, or one that states nothing a reader can weigh ("OK", "By design"). A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited. Write what makes this site legitimately different — the invariant that holds, the framework contract that forces the shape — or remove the suppression and fix what it hides.
BareSuppressMessage src/tools/DevAnalyzers/GlobalSuppressions.cs:8— SuppressMessage — the suppression records no reason: either it carries no justification argument at all, or one that states nothing a reader can weigh ("OK", "By design"). A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited. Write what makes this site legitimately different — the invariant that holds, the framework contract that forces the shape — or remove the suppression and fix what it hides.
BareSuppressMessage tests/Avalonia.Controls.UnitTests/GridMocks.cs:33— SuppressMessage — the suppression records no reason: either it carries no justification argument at all, or one that states nothing a reader can weigh ("OK", "By design"). A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited. Write what makes this site legitimately different — the invariant that holds, the framework contract that forces the shape — or remove the suppression and fix what it hides.
BareSuppressMessage tests/Avalonia.Controls.UnitTests/GridMocks.cs:62— SuppressMessage — the suppression records no reason: either it carries no justification argument at all, or one that states nothing a reader can weigh ("OK", "By design"). A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited. Write what makes this site legitimately different — the invariant that holds, the framework contract that forces the shape — or remove the suppression and fix what it hides.
Duplicated block (14 lines × 2) src/Avalonia.Base/Data/CompiledBinding.cs:320— src/Avalonia.Base/Data/CompiledBinding.cs:320-333 | src/Avalonia.Base/Data/ReflectionBinding.cs:167-180 — 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 `src/Avalonia.Base/Data/CompiledBinding.cs:320` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) src/Avalonia.Base/Input/MouseDevice.cs:158— src/Avalonia.Base/Input/MouseDevice.cs:158-171 | src/Avalonia.Base/Input/PenDevice.cs:119-132 — 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 `src/Avalonia.Base/Input/MouseDevice.cs:158` 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 (14 lines × 2) src/Avalonia.Base/Media/GlyphTypeface.cs:213— src/Avalonia.Base/Media/GlyphTypeface.cs:213-226 | src/Avalonia.Base/Media/GlyphTypeface.cs:230-243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) src/iOS/Avalonia.iOS/AutomationPeerWrapper.cs:80— src/iOS/Avalonia.iOS/AutomationPeerWrapper.cs:80-93 | src/iOS/Avalonia.iOS/AutomationPeerWrapper.cs:100-113 — both copies are in the same file, so extract the 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 `src/iOS/Avalonia.iOS/AutomationPeerWrapper.cs:80` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/Avalonia.Base/Data/CompiledBinding.cs:344— src/Avalonia.Base/Data/CompiledBinding.cs:344-357 | src/Avalonia.Base/Data/ReflectionBinding.cs:213-226 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) src/Avalonia.Controls/LayoutTransformControl.cs:363— src/Avalonia.Controls/LayoutTransformControl.cs:363-376 | src/Avalonia.Controls/LayoutTransformControl.cs:390-403 — both copies are in the same file, so extract the 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) src/Avalonia.Controls/Border.cs:149— src/Avalonia.Controls/Border.cs:149-162 | src/Avalonia.Controls/Presenters/ContentPresenter.cs:584-597 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs:45— src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs:45-58 | src/Avalonia.Themes.Fluent2/ColorPaletteResourcesCollection.cs:45-58 — `src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs` and `src/Avalonia.Themes.Fluent2/ColorPaletteResourcesCollection.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 50 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) src/Windows/Avalonia.WinUI/Automation/AvaloniaSwapChainPanelAutomationPeer.cs:81— src/Windows/Avalonia.WinUI/Automation/AvaloniaSwapChainPanelAutomationPeer.cs:81-93 | src/Windows/Avalonia.WinUI/WinUITextInputMethod.cs:239-251 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13 lines × 2) src/Avalonia.Controls/Calendar/Calendar.cs:1339— src/Avalonia.Controls/Calendar/Calendar.cs:1339-1351 | src/Avalonia.Controls/Calendar/Calendar.cs:1387-1399 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls/Calendar/Calendar.cs:1339` 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 (13 lines × 2) samples/ControlCatalog/Pages/Transitions/CardStackPageTransition.cs:413— samples/ControlCatalog/Pages/Transitions/CardStackPageTransition.cs:413-425 | src/Avalonia.Base/Animation/Transitions/Rotate3DTransition.cs:222-234 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) src/Avalonia.Base/AvaloniaProperty.cs:263— src/Avalonia.Base/AvaloniaProperty.cs:263-275 | src/Avalonia.Base/AvaloniaProperty.cs:316-328 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/AvaloniaProperty.cs:263` 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) src/Avalonia.Base/Data/Core/UntypedBindingExpressionBase.cs:265— src/Avalonia.Base/Data/Core/UntypedBindingExpressionBase.cs:265-277 | src/Avalonia.Base/Data/Core/UntypedBindingExpressionBase.cs:307-319 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Data/Core/UntypedBindingExpressionBase.cs:265` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Avalonia.Base/Data/Core/UntypedBindingExpressionBase.cs:279` calls `InvalidCastException` and `src/Avalonia.Base/Data/Core/UntypedBindingExpressionBase.cs:321` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) src/Avalonia.Controls/Automation/Peers/EmbeddableControlRootAutomationPeer.cs:62— src/Avalonia.Controls/Automation/Peers/EmbeddableControlRootAutomationPeer.cs:62-74 | src/Avalonia.Controls/Automation/Peers/WindowBaseAutomationPeer.cs:70-82 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) src/Markup/Avalonia.Markup/Markup/Parsers/ContainerQueryGrammar.cs:39— src/Markup/Avalonia.Markup/Markup/Parsers/ContainerQueryGrammar.cs:39-51 | src/Markup/Avalonia.Markup/Markup/Parsers/SelectorGrammar.cs:39-51 — 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 `src/Markup/Avalonia.Markup/Markup/Parsers/ContainerQueryGrammar.cs:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) samples/ControlCatalog/Pages/NavigationPage/NavigationPageCurvedHeaderPage.xaml.cs:170— samples/ControlCatalog/Pages/NavigationPage/NavigationPageCurvedHeaderPage.xaml.cs:170-182 | samples/ControlCatalog/Pages/NavigationPage/NavigationPageCurvedHeaderPage.xaml.cs:265-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `samples/ControlCatalog/Pages/NavigationPage/NavigationPageCurvedHeaderPage.xaml.cs:168` calls `PushAsync`, `BuildProfilePage` and `samples/ControlCatalog/Pages/NavigationPage/NavigationPageCurvedHeaderPage.xaml.cs:263` 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.
X18 · Disposal-pattern correctness· Disposable created and abandoned in the method that made it · ×8
Disposable created and abandoned in the method that made it src/Avalonia.Base/Diagnostics/Diagnostic.Metrics.cs:21— `meter` is a `Meter`, which implements `IDisposable`, and it is created here (line 21). Every use of it in `InitMetrics` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var meter = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it src/Avalonia.Base/Threading/DispatcherOperation.cs:163— `cts` is a `CancellationTokenSource`, which implements `IDisposable`, and it is created here (line 163). Every use of it in `Wait` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var cts = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it src/Avalonia.Base/Threading/DispatcherOperation.cs:339— `cts` is a `CancellationTokenSource`, which implements `IDisposable`, and it is created here (line 339). Every use of it in `CreateCancelledToken` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var cts = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.Helpers.cs:45— `br` is a `BinaryReader`, which implements `IDisposable`, and it is created here (line 45). Every use of it in `AvaloniaResources` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var br = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it src/Avalonia.Controls/DesktopApplicationExtensions.cs:19— `cts` is a `CancellationTokenSource`, which implements `IDisposable`, and it is created here (line 19). Every use of it in `Run` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var cts = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it src/Avalonia.Controls/DesktopApplicationExtensions.cs:37— `cts` is a `CancellationTokenSource`, which implements `IDisposable`, and it is created here (line 37). Every use of it in `Run` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var cts = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it src/Avalonia.Controls/TextBox.cs:2756— `textLayout` is a `TextLayout`, which implements `IDisposable`, and it is created here (line 2756). Every use of it in `MeasureOverride` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var textLayout = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it src/Avalonia.Controls/TextBox.cs:2772— `textLayout` is a `TextLayout`, which implements `IDisposable`, and it is created here (line 2772). Every use of it in `MeasureOverride` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var textLayout = …;`), which releases it at the end of the scope on every path including a throw.
X18 · Disposal-pattern correctness· Owned disposable field is never released · ×8
Owned disposable field is never released src/Avalonia.Base/Rendering/Composition/CompositingRenderer.cs:22— `CompositingRenderer` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_recorder` itself (line 22), which makes that instance its own. But `_recorder` is named in none of the methods the disposal search covered: `Dispose` (line 304), `Stop` (line 294) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_recorder?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:22— `ClassicDesktopStyleApplicationLifetime` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_cts` itself (line 22), which makes that instance its own. But `_cts` is named in none of the methods the disposal search covered: `Dispose` (line 168) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_cts?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released REDACTED:27— `HtmlWebSocketTransport` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_wakeup` itself (line 27), which makes that instance its own. But `_wakeup` is named in none of the methods the disposal search covered: `Dispose` (line 210) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_wakeup?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:264— `SimpleWebSocket` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_receiveFrameStream` itself (line 264), which makes that instance its own. But `_receiveFrameStream` is named in none of the methods the disposal search covered: `Dispose` (line 283) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_receiveFrameStream?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:265— `SimpleWebSocket` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_receiveMessageStream` itself (line 265), which makes that instance its own. But `_receiveMessageStream` is named in none of the methods the disposal search covered: `Dispose` (line 283) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_receiveMessageStream?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released src/Avalonia.Remote.Protocol/BsonStreamTransport.cs:19— `BsonStreamTransportConnection` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_outputBlock` itself (line 19), which makes that instance its own. But `_outputBlock` is named in none of the methods the disposal search covered: `Dispose` (line 36) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_outputBlock?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released src/Avalonia.X11/Dispatching/GlibDispatcherImplBase.cs:229— `ManagedLoopFrame` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_internalTokenSource` itself (line 229), which makes that instance its own. But `_internalTokenSource` is named in none of the methods the disposal search covered: `Dispose` (line 278) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_internalTokenSource?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Owned disposable field is never released src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs:19— `FramebufferToplevelImpl` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_inputQueue` itself (line 19), which makes that instance its own. But `_inputQueue` is named in none of the methods the disposal search covered: `Dispose` (line 37) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`_inputQueue?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Swallowed exception (caught, then discarded) src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs:174— `catch (RenderTargetNotReadyException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs:179— `catch (RenderTargetCorruptedException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs:226— `catch (RenderTargetNotReadyException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs:231— `catch (RenderTargetCorruptedException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs:1108— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) src/Avalonia.Dialogs/Internal/BclMountedVolumeInfoProvider.cs:26— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) src/Avalonia.FreeDesktop/DBusMenuExporter.cs:118— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) src/Avalonia.FreeDesktop/DBusTrayIconImpl.cs:267— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Change coupling: MouseDevice.cs ↔ PenDevice.cs src/Avalonia.Base/Input/MouseDevice.cs:1— `src/Avalonia.Base/Input/MouseDevice.cs` and `src/Avalonia.Base/Input/PenDevice.cs` change together 76% of the time (13 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `e4452b5b` Require the same button for both clicks of a double tap (#22429); `a8738963` Fix pointer capture cancellation on Win32 (#22054); `8ad6a022` Allow attaching a platform-specific event cookie to platform events (… — run `git show` on any of them.
Change coupling: ServerCompositionDrawListVisual.cs ↔ ServerCompositionTarget.cs src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawListVisual.cs:1— `src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionDrawListVisual.cs` and `src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, 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 `e31fc59e` Use DrawingContextProxy as a staging area for Push/Pop/SetTransform o…; `5b59f6c0` Use separate LtrbRect type for renderer calculations (#15112); `3fc6a515` Remove Rect.Default — run `git show` on any of them.
Change coupling: TextEllipsisHelper.cs ↔ TextLeadingPrefixCharacterEllipsis.cs src/Avalonia.Base/Media/TextFormatting/TextEllipsisHelper.cs:1— `src/Avalonia.Base/Media/TextFormatting/TextEllipsisHelper.cs` and `src/Avalonia.Base/Media/TextFormatting/TextLeadingPrefixCharacterEllipsis.cs` change together 65% of the time (11 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `84e62d67` [TextTrimming] Fixed some text trimming bugs (#17998); `147db08f` Introduce GlyphRun.Bounds; `a24e48f1` Text layout: ensure RentedList are returned in case of exceptions — run `git show` on any of them.
Change coupling: TextLeadingPrefixCharacterEllipsis.cs ↔ TextLineImpl.cs src/Avalonia.Base/Media/TextFormatting/TextLeadingPrefixCharacterEllipsis.cs:1— `src/Avalonia.Base/Media/TextFormatting/TextLeadingPrefixCharacterEllipsis.cs` and `src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs` change together 65% of the time (11 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `aee3f685` TextCollapsingProperties bidirectional-text (BiDi) correctness fixes …; `147db08f` Introduce GlyphRun.Bounds; `91f89c51` Added FormattingObjectPool to reduce temp allocs during text layout — run `git show` on any of them.
Change coupling: TextEllipsisHelper.cs ↔ TextFormatterImpl.cs src/Avalonia.Base/Media/TextFormatting/TextEllipsisHelper.cs:1— `src/Avalonia.Base/Media/TextFormatting/TextEllipsisHelper.cs` and `src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `507e1679` [Text] Fixes double reorder of cached bidi runs (#21351); `a562c4e4` Improve TextTrimming customization experience (#16521); `a24e48f1` Text layout: ensure RentedList are returned in case of exceptions — run `git show` on any of them.
Change coupling: DBusPlatformSettings.cs ↔ DBusSystemDialog.cs src/Avalonia.FreeDesktop/DBusPlatformSettings.cs:1— `src/Avalonia.FreeDesktop/DBusPlatformSettings.cs` and `src/Avalonia.FreeDesktop/DBusSystemDialog.cs` change together 50% of the time (10 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, 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 `5ad8b754` Update to latest Tmds.DBus.Protocol. (#21472); `4ebc98f4` Bump Tmds.DBus.Protocol to version 0.90.3 (#20810); `b66471b3` Bump DBus stack (#18343) — run `git show` on any of them.
Change coupling: DBusMenuExporter.cs ↔ DBusPlatformSettings.cs src/Avalonia.FreeDesktop/DBusMenuExporter.cs:1— `src/Avalonia.FreeDesktop/DBusMenuExporter.cs` and `src/Avalonia.FreeDesktop/DBusPlatformSettings.cs` change together 50% of the time (10 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, 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 `5ad8b754` Update to latest Tmds.DBus.Protocol. (#21472); `4ebc98f4` Bump Tmds.DBus.Protocol to version 0.90.3 (#20810); `b66471b3` Bump DBus stack (#18343) — run `git show` on any of them.
Blocking `MemoryStream.Write` inside an `async` method src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:410— `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
Blocking `MemoryStream.Write` inside an `async` method src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:416— `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
Blocking `MemoryStream.Write` inside an `async` method src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:442— `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
Blocking `MemoryStream.Write` inside an `async` method src/Avalonia.Remote.Protocol/BsonStreamTransport.cs:107— `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
Blocking `MemoryStream.Write` inside an `async` method src/Avalonia.Remote.Protocol/BsonStreamTransport.cs:108— `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
Blocking `MemoryStream.Write` inside an `async` method src/Avalonia.Remote.Protocol/BsonStreamTransport.cs:110— `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
Blocking `MemoryStream.Write` inside an `async` method src/Avalonia.Remote.Protocol/BsonStreamTransport.cs:113— `MemoryStream.Write` blocks the thread on I/O while `MemoryStream.WriteAsync` exists to wait without one — inside a method that is already `async`, await the twin.
Duplicated block (27 lines × 2) src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:1098— src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:1098-1124 | src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:1128-1154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (27 lines × 2) src/Avalonia.Base/Styling/OrQuery.cs:62— src/Avalonia.Base/Styling/OrQuery.cs:62-88 | src/Avalonia.Base/Styling/OrSelector.cs:77-103 — 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 `src/Avalonia.Base/Styling/OrQuery.cs:62` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 2) src/Avalonia.Controls/Primitives/HeaderedItemsControl.cs:104— src/Avalonia.Controls/Primitives/HeaderedItemsControl.cs:104-130 | src/Avalonia.Controls/Primitives/HeaderedSelectingItemsControl.cs:102-128 — before extracting anything, compare `src/Avalonia.Controls/Primitives/HeaderedItemsControl.cs` and `src/Avalonia.Controls/Primitives/HeaderedSelectingItemsControl.cs` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (27 lines × 2) src/Avalonia.Base/Media/HslColor.cs:363— src/Avalonia.Base/Media/HslColor.cs:363-389 | src/Avalonia.Base/Media/HsvColor.cs:393-419 — before extracting anything, compare `src/Avalonia.Base/Media/HslColor.cs` and `src/Avalonia.Base/Media/HsvColor.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Base/Media/HslColor.cs:363` 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 (27 lines × 2) samples/GpuInterop/D3DDemo/D3D11DemoControl.cs:42— samples/GpuInterop/D3DDemo/D3D11DemoControl.cs:42-68 | samples/GpuInterop/VulkanDemo/D3DMemoryHelper.cs:22-48 — 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 (20 lines × 2) src/Android/Avalonia.Android/Platform/ClipDataToDataTransferWrapper.cs:22— src/Android/Avalonia.Android/Platform/ClipDataToDataTransferWrapper.cs:22-41 | src/Android/Avalonia.Android/Platform/ClipDescriptionToDataTransferWrapper.cs:20-39 — 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 `src/Android/Avalonia.Android/Platform/ClipDataToDataTransferWrapper.cs:22` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) src/Android/Avalonia.Android/Platform/Specific/Helpers/ClipDataHelper.cs:15— src/Android/Avalonia.Android/Platform/Specific/Helpers/ClipDataHelper.cs:15-34 | src/Android/Avalonia.Android/Platform/Specific/Helpers/ClipDataHelper.cs:54-73 — both copies are in the same file, so extract the 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 `src/Android/Avalonia.Android/Platform/Specific/Helpers/ClipDataHelper.cs:15` 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 (20 lines × 2) src/Avalonia.Base/PropertyStore/ValueStore.cs:85— src/Avalonia.Base/PropertyStore/ValueStore.cs:85-104 | src/Avalonia.Base/PropertyStore/ValueStore.cs:113-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Base/PropertyStore/ValueStore.cs:85` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) src/Avalonia.Base/Styling/ScreenQueries.cs:40— src/Avalonia.Base/Styling/ScreenQueries.cs:40-59 | src/Avalonia.Base/Styling/ScreenQueries.cs:116-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:111— src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:111-130 | src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:154-173 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:111` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) src/Avalonia.Native/AvnAutomationPeer.cs:121— src/Avalonia.Native/AvnAutomationPeer.cs:121-136 | src/Avalonia.Native/AvnAutomationPeer.cs:147-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 `src/Avalonia.Native/AvnAutomationPeer.cs:121` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) src/Avalonia.Base/Data/Core/ExpressionNodes/PropertyAccessorNode.cs:66— src/Avalonia.Base/Data/Core/ExpressionNodes/PropertyAccessorNode.cs:66-81 | src/Avalonia.Base/Data/Core/ExpressionNodes/Reflection/DynamicPluginPropertyAccessorNode.cs:61-76 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Base/Data/Core/ExpressionNodes/PropertyAccessorNode.cs:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) src/Avalonia.Controls/Presenters/TextPresenter.cs:414— src/Avalonia.Controls/Presenters/TextPresenter.cs:414-430 | src/Avalonia.Controls/TextBlock.cs:636-651 — 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 (16 lines × 2) src/Avalonia.Controls.ColorPicker/ColorPalettes/FluentColorPalette.cs:114— src/Avalonia.Controls.ColorPicker/ColorPalettes/FluentColorPalette.cs:114-134 | src/Avalonia.Controls.ColorPicker/ColorPalettes/SixteenColorPalette.cs:56-71 — 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 `src/Avalonia.Controls.ColorPicker/ColorPalettes/FluentColorPalette.cs:114` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16 lines × 2) samples/ControlCatalog/Pages/DrawerPage/DrawerPageTransitionsPage.xaml.cs:40— samples/ControlCatalog/Pages/DrawerPage/DrawerPageTransitionsPage.xaml.cs:40-55 | samples/ControlCatalog/Pages/TabbedPage/TabbedPageTransitionsPage.xaml.cs:18-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `samples/ControlCatalog/Pages/DrawerPage/DrawerPageTransitionsPage.xaml.cs:40` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Off the main sequence: Avalonia.HarfBuzz(net10.0) src/HarfBuzz/Avalonia.HarfBuzz/Avalonia.HarfBuzz.csproj:1— Avalonia.HarfBuzz(net10.0): abstractness 0.00, instability 0.10, distance 0.90 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Off the main sequence: Avalonia.Dialogs(net10.0) src/Avalonia.Dialogs/Avalonia.Dialogs.csproj:1— Avalonia.Dialogs(net10.0): abstractness 0.00, instability 0.13, distance 0.88 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
Off the main sequence: Avalonia.Remote.Protocol(net10.0) src/Avalonia.Remote.Protocol/Avalonia.Remote.Protocol.csproj:1— Avalonia.Remote.Protocol(net10.0): abstractness 0.15, instability 0.00, distance 0.85 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: Avalonia.Skia(net10.0) src/Skia/Avalonia.Skia/Avalonia.Skia.csproj:1— Avalonia.Skia(net10.0): abstractness 0.16, instability 0.09, distance 0.75 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
Off the main sequence: Avalonia.Base(net10.0) src/Avalonia.Base/Avalonia.Base.csproj:1— Avalonia.Base(net10.0): abstractness 0.26, instability 0.00, distance 0.74 — zone of pain — concrete and depended on by 15 project(s), so it's rigid to change.
IC1 · Incompleteness & stubs· Empty method body · ×5
Empty method body — does nothing with its inputs src/Avalonia.Controls/Platform/PlatformManager.cs:19— `SetDesignerScalingFactor` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs src/Avalonia.DesignerSupport/Remote/Stubs.cs:82— `Invalidate` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs src/Avalonia.DesignerSupport/Remote/Stubs.cs:135— `ShowDialog` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs src/Avalonia.X11/X11WindowModes/InputProxyWindowMode.cs:29— `OnFocusProxyEvent` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs src/Headless/Avalonia.Headless/HeadlessWindowImpl.cs:174— `SetSystemDecorations` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Duplicated block (23 lines × 2) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:287— src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:287-309 | src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:365-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (23 lines × 2) src/Avalonia.Themes.Fluent/Accents/SystemAccentColors.cs:131— src/Avalonia.Themes.Fluent/Accents/SystemAccentColors.cs:131-153 | src/Avalonia.Themes.Fluent2/Accents/SystemAccentColors.cs:155-177 — before extracting anything, compare `src/Avalonia.Themes.Fluent/Accents/SystemAccentColors.cs` and `src/Avalonia.Themes.Fluent2/Accents/SystemAccentColors.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (23 lines × 2) src/tools/Avalonia.Analyzers.CSharp/OnPropertyChangedOverrideAnalyzer.cs:33— src/tools/Avalonia.Analyzers.CSharp/OnPropertyChangedOverrideAnalyzer.cs:33-55 | src/tools/DevAnalyzers/OnPropertyChangedOverrideAnalyzer.cs:35-57 — `src/tools/Avalonia.Analyzers.CSharp/OnPropertyChangedOverrideAnalyzer.cs` and `src/tools/DevAnalyzers/OnPropertyChangedOverrideAnalyzer.cs` 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 1 separate duplicated blocks between them, totalling at least 23 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (23 lines × 2) src/Avalonia.Controls/Grid.cs:1483— src/Avalonia.Controls/Grid.cs:1483-1505 | src/Avalonia.Controls/Grid.cs:1818-1840 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls/Grid.cs:1483` 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) src/Avalonia.Base/Media/Fonts/Tables/Metrics/HorizontalMetricsTable.cs:122— src/Avalonia.Base/Media/Fonts/Tables/Metrics/HorizontalMetricsTable.cs:122-140 | src/Avalonia.Base/Media/Fonts/Tables/Metrics/VerticalMetricsTable.cs:122-140 — 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 `src/Avalonia.Base/Media/Fonts/Tables/Metrics/HorizontalMetricsTable.cs:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) src/Avalonia.Controls/DateTimePickers/DatePicker.cs:414— src/Avalonia.Controls/DateTimePickers/DatePicker.cs:414-432 | src/Avalonia.Controls/DateTimePickers/TimePicker.cs:389-407 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Controls/DateTimePickers/DatePicker.cs:414` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) src/Headless/Avalonia.Headless.XUnit/AvaloniaDelayEnumeratedTheoryTestCase.cs:61— src/Headless/Avalonia.Headless.XUnit/AvaloniaDelayEnumeratedTheoryTestCase.cs:61-79 | src/Headless/Avalonia.Headless.XUnit/AvaloniaTestCase.cs:60-78 — before extracting anything, compare `src/Headless/Avalonia.Headless.XUnit/AvaloniaDelayEnumeratedTheoryTestCase.cs` and `src/Headless/Avalonia.Headless.XUnit/AvaloniaTestCase.cs` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (19 lines × 2) samples/RenderDemo/Pages/GlyphRunPage.xaml.cs:58— samples/RenderDemo/Pages/GlyphRunPage.xaml.cs:58-76 | samples/RenderDemo/Pages/GlyphRunPage.xaml.cs:117-135 — both copies are in the same file, so extract the 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 × 4) src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:548— src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:548-554 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:610-616 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:648-654 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:686-692 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 4) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1369— src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1369-1375 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1381-1387 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1555-1561 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1567-1573 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 4) samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:101— samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:101-107 | samples/ControlCatalog/Pages/NavigationPage/Transitions/FadeThroughTransition.cs:116-122 | samples/ControlCatalog/Pages/NavigationPage/Transitions/PageSlideTransition.cs:62-84 | samples/ControlCatalog/Pages/NavigationPage/Transitions/ParallaxSlideTransition.cs:102-108 — before extracting anything, compare `samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs` and `samples/ControlCatalog/Pages/NavigationPage/Transitions/PageSlideTransition.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `samples/ControlCatalog/Pages/NavigationPage/Transitions/PageSlideTransition.cs:62` calls `Add`, `RunAsync` and `samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:101` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 4) samples/ControlCatalog/Pages/DrawerPage/DrawerPageCustomizationPage.xaml.cs:318— samples/ControlCatalog/Pages/DrawerPage/DrawerPageCustomizationPage.xaml.cs:318-324 | samples/ControlCatalog/Pages/DrawerPage/DrawerPageFirstLookPage.xaml.cs:70-76 | samples/ControlCatalog/Pages/NavigationPage/NavigationPageGesturePage.xaml.cs:58-64 | samples/ControlCatalog/Pages/TabbedPage/TabbedPageGesturePage.xaml.cs:35-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
X18 · Disposal-pattern correctness· Release token given back after an unprotected call · ×4
Release token given back after an unprotected call src/Avalonia.Controls/Primitives/Popup.cs:1137— `_cleanup` is declared `IDisposable` and nothing more, and every assignment to it takes a constructor parameter — so `PopupOpenState` can do exactly one thing with it, which is the release performed here (line 1137), and it is the only reference left that can perform it. That release is the tail of an unprotected sequence: `.Dispose()` runs first (line 1135), and nothing in `Dispose` catches it. A single throw from that call skips the release entirely — and because a bare `IDisposable` carries no state to inspect and no second holder to fall back on, whatever it represents (a lock taken for this instance, a semaphore lease, a scope) is then held for the remaining lifetime of the process, with nothing left that could ever give it back. Wrap the calls that precede it in a `try` and move the release into the `finally`, so the one statement that must happen is the one that always happens.
Release token given back after an unprotected call src/Avalonia.OpenGL/Egl/EglGlPlatformImageSurfaceBase.cs:176— `_restoreContext` is declared `IDisposable` and nothing more, and every assignment to it takes a constructor parameter — so `Session` can do exactly one thing with it, which is the release performed here (line 176), and it is the only reference left that can perform it. That release is the tail of an unprotected sequence: `_context.GlInterface.Flush()` runs first (line 175), and nothing in `Dispose` catches it. A single throw from that call skips the release entirely — and because a bare `IDisposable` carries no state to inspect and no second holder to fall back on, whatever it represents (a lock taken for this instance, a semaphore lease, a scope) is then held for the remaining lifetime of the process, with nothing left that could ever give it back. Wrap the calls that precede it in a `try` and move the release into the `finally`, so the one statement that must happen is the one that always happens.
Release token given back after an unprotected call src/Avalonia.OpenGL/Egl/EglGlPlatformSurfaceBase.cs:129— `_restoreContext` is declared `IDisposable` and nothing more, and every assignment to it takes a constructor parameter — so `Session` can do exactly one thing with it, which is the release performed here (line 129), and it is the only reference left that can perform it. That release is the tail of an unprotected sequence: `_display.EglInterface.WaitNative(EglConsts.EGL_CORE_NATIVE_ENGINE)` runs first (line 126), and nothing in `Dispose` catches it. A single throw from that call skips the release entirely — and because a bare `IDisposable` carries no state to inspect and no second holder to fall back on, whatever it represents (a lock taken for this instance, a semaphore lease, a scope) is then held for the remaining lifetime of the process, with nothing left that could ever give it back. Wrap the calls that precede it in a `try` and move the release into the `finally`, so the one statement that must happen is the one that always happens.
Release token given back after an unprotected call src/Avalonia.X11/Glx/GlxGlPlatformSurface.cs:93— `_clearContext` is declared `IDisposable` and nothing more, and every assignment to it takes a constructor parameter — so `Session` can do exactly one thing with it, which is the release performed here (line 93), and it is the only reference left that can perform it. That release is the tail of an unprotected sequence: `_context.Glx.WaitX()` runs first (line 92), and nothing in `Dispose` catches it. A single throw from that call skips the release entirely — and because a bare `IDisposable` carries no state to inspect and no second holder to fall back on, whatever it represents (a lock taken for this instance, a semaphore lease, a scope) is then held for the remaining lifetime of the process, with nothing left that could ever give it back. Wrap the calls that precede it in a `try` and move the release into the `finally`, so the one statement that must happen is the one that always happens.
Test cannot fail: DispatcherFrame_Uses_Current_Dispatcher tests/Avalonia.Base.UnitTests/DispatcherTests.cs:362— This test's act runs inside `RunOnDedicatedThread` at tests/Avalonia.UnitTests/ThreadRunHelper.cs:19, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 3 assertion(s) this test does make are inside that region, and an xUnit/NUnit assertion reports by THROWING — so they are caught and discarded too, which is why nothing else here flags this test. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
Test cannot fail: MoveSelection_Does_Not_Hang_When_All_Items_Are_Non_Focusable_And_We_Move_To_First_Item tests/Avalonia.Controls.UnitTests/Primitives/SelectingItemsControlTests.cs:2055— This test's act runs inside `RunOnDedicatedThread` at tests/Avalonia.UnitTests/ThreadRunHelper.cs:19, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 2 assertion(s) this test does make are inside that region, and an xUnit/NUnit assertion reports by THROWING — so they are caught and discarded too, which is why nothing else here flags this test. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
Test cannot fail: MoveSelection_Does_Not_Hang_When_All_Items_Are_Non_Focusable_And_We_Move_To_Last_Item tests/Avalonia.Controls.UnitTests/Primitives/SelectingItemsControlTests.cs:2081— This test's act runs inside `RunOnDedicatedThread` at tests/Avalonia.UnitTests/ThreadRunHelper.cs:19, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 2 assertion(s) this test does make are inside that region, and an xUnit/NUnit assertion reports by THROWING — so they are caught and discarded too, which is why nothing else here flags this test. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
Duplicated block (21 lines × 2) src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:976— src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:976-996 | src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:1069-1089 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:976` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21 lines × 2) src/Avalonia.Controls.ColorPicker/Converters/ColorToDisplayNameConverter.cs:23— src/Avalonia.Controls.ColorPicker/Converters/ColorToDisplayNameConverter.cs:23-43 | src/Avalonia.Controls.ColorPicker/Converters/ColorToHexConverter.cs:41-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21 lines × 2) src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:44— src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:44-71 | src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:97-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24 lines × 2) src/Avalonia.Base/Threading/DispatcherOperation.cs:296— src/Avalonia.Base/Threading/DispatcherOperation.cs:296-319 | src/Avalonia.Base/Threading/DispatcherOperation.cs:431-454 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Base/Threading/DispatcherOperation.cs:296` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24 lines × 2) src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs:17— src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs:17-40 | src/Avalonia.Themes.Fluent2/ColorPaletteResourcesCollection.cs:17-40 — `src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs` and `src/Avalonia.Themes.Fluent2/ColorPaletteResourcesCollection.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 50 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (24 lines × 2) samples/ControlCatalog/Pages/CarouselPage/CarouselPagePerformancePage.xaml.cs:37— samples/ControlCatalog/Pages/CarouselPage/CarouselPagePerformancePage.xaml.cs:37-60 | samples/ControlCatalog/Pages/TabbedPage/TabbedPagePerformancePage.xaml.cs:27-50 — 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 `samples/ControlCatalog/Pages/CarouselPage/CarouselPagePerformancePage.xaml.cs:37` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) src/Avalonia.Base/Input/FocusManager.cs:467— src/Avalonia.Base/Input/FocusManager.cs:467-484 | src/Avalonia.Base/Input/FocusManager.cs:523-540 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Input/FocusManager.cs:467` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1351— src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1351-1368 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1537-1554 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1351` 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 (18 lines × 2) src/Avalonia.Controls/Page/NavigationPage.cs:1432— src/Avalonia.Controls/Page/NavigationPage.cs:1432-1449 | src/Avalonia.Controls/Page/NavigationPage.cs:1541-1558 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls/Page/NavigationPage.cs:1432` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Avalonia.Controls/Page/NavigationPage.cs:1450` calls `SetCurrentValue` and `src/Avalonia.Controls/Page/NavigationPage.cs:1559` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17 lines × 2) src/Avalonia.Base/Data/Core/ExpressionNodes/LogicalAncestorElementNode.cs:24— src/Avalonia.Base/Data/Core/ExpressionNodes/LogicalAncestorElementNode.cs:24-40 | src/Avalonia.Base/Data/Core/ExpressionNodes/VisualAncestorElementNode.cs:24-40 — 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 `src/Avalonia.Base/Data/Core/ExpressionNodes/LogicalAncestorElementNode.cs:24` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) src/Android/Avalonia.Android/Platform/Specific/Helpers/ClipDataHelper.cs:121— src/Android/Avalonia.Android/Platform/Specific/Helpers/ClipDataHelper.cs:121-137 | src/Android/Avalonia.Android/Platform/Specific/Helpers/ClipDataHelper.cs:169-185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Android/Avalonia.Android/Platform/Specific/Helpers/ClipDataHelper.cs:121` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) src/Avalonia.Controls/Primitives/TextSelectionHandle.cs:163— src/Avalonia.Controls/Primitives/TextSelectionHandle.cs:163-179 | src/Avalonia.Controls/Primitives/Thumb.cs:89-105 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (18–19 lines × 2) src/Avalonia.Controls/TickBar.cs:311— src/Avalonia.Controls/TickBar.cs:311-329 | src/Avalonia.Controls/TickBar.cs:364-381 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls/TickBar.cs:311` 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 (18–19 lines × 2) src/Markup/Avalonia.Markup/Markup/Parsers/SelectorParser.cs:82— src/Markup/Avalonia.Markup/Markup/Parsers/SelectorParser.cs:82-99 | src/Markup/Avalonia.Markup/Markup/Parsers/SelectorParser.cs:124-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18–19 lines × 2) samples/ControlCatalog/Pages/FlyoutsPage.axaml.cs:75— samples/ControlCatalog/Pages/FlyoutsPage.axaml.cs:75-92 | samples/ControlCatalog/Pages/ToolTipPage.xaml.cs:22-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11–12 lines × 2) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/XNameTransformer.cs:17— src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/XNameTransformer.cs:17-28 | src/tools/Avalonia.Generators/Compiler/NameDirectiveTransformer.cs:14-24 — 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 (11–12 lines × 2) src/tools/Avalonia.Analyzers.CodeFixes.CSharp/AddCallbackStubCodeFixProvider.cs:39— src/tools/Avalonia.Analyzers.CodeFixes.CSharp/AddCallbackStubCodeFixProvider.cs:39-50 | src/tools/Avalonia.Analyzers.CodeFixes.CSharp/MakePartialCodeFixProvider.cs:37-47 — 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 `src/tools/Avalonia.Analyzers.CodeFixes.CSharp/AddCallbackStubCodeFixProvider.cs:39` 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. 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 (11–12 lines × 2) src/tools/Avalonia.UnicodeTrieGenerator/EastAsianWidthClassTrieGenerator.cs:62— src/tools/Avalonia.UnicodeTrieGenerator/EastAsianWidthClassTrieGenerator.cs:62-73 | src/tools/Avalonia.UnicodeTrieGenerator/SegmentationTrieGenerator.cs:218-228 — 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 `src/tools/Avalonia.UnicodeTrieGenerator/EastAsianWidthClassTrieGenerator.cs:62` 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 × 3) src/Avalonia.Base/Platform/LtrbRect.cs:189— src/Avalonia.Base/Platform/LtrbRect.cs:189-198 | src/Avalonia.Base/Platform/LtrbRect.cs:287-296 | src/Avalonia.Base/Thickness.cs:251-260 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 3) src/tools/DevGenerators/CrossThreadProxyGenerator.cs:77— src/tools/DevGenerators/CrossThreadProxyGenerator.cs:77-87 | src/tools/DevGenerators/CrossThreadProxyGenerator.cs:104-113 | src/tools/DevGenerators/CrossThreadProxyGenerator.cs:172-181 — 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 (10 lines × 3) samples/BindingDemo/App.xaml.cs:10— samples/BindingDemo/App.xaml.cs:10-31 | samples/TextTestApp/App.axaml.cs:10-19 | samples/VirtualizationDemo/App.axaml.cs:10-19 — `samples/TextTestApp/App.axaml.cs` and `samples/VirtualizationDemo/App.axaml.cs` 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 1 separate duplicated blocks between them, totalling at least 22 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. 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, `samples/BindingDemo/App.xaml.cs:31` calls `LogToTrace` and `samples/TextTestApp/App.axaml.cs:19` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) src/Avalonia.Base/Media/Color.cs:156— src/Avalonia.Base/Media/Color.cs:156-165 | src/Avalonia.Base/Media/Color.cs:168-174 | src/Avalonia.Base/Media/Color.cs:178-184 — 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 `src/Avalonia.Base/Media/Color.cs:156` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 3) src/Avalonia.Controls/Automation/Peers/CarouselPageAutomationPeer.cs:19— src/Avalonia.Controls/Automation/Peers/CarouselPageAutomationPeer.cs:19-25 | src/Avalonia.Controls/Automation/Peers/ContentPageAutomationPeer.cs:19-25 | src/Avalonia.Controls/Automation/Peers/DrawerPageAutomationPeer.cs:27-33 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 3) samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:177— samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:177-183 | samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:322-328 | samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:501-507 — 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.
Fake-async — async method never awaits src/Android/Avalonia.Android/Platform/Specific/Helpers/ClipDataHelper.cs:139— `TryCreateDataItemAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:43— `TryGetFileFromPathAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:96— `TryGetFolderFromPathAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Sync-over-async (deadlock risk) through `.Result` src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin`1.cs:42— Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
Sync-over-async (deadlock risk) through `.Result` src/Avalonia.Base/Threading/DispatcherOperation.cs:380— Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
Sync-over-async (deadlock risk) through `.Result` src/Avalonia.DesignerSupport/Remote/RemoteDesignerEntryPoint.cs:121— Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
Color.TryParse (cyclomatic 29) src/Avalonia.Base/Media/Color.cs:144— Color.TryParse has cyclomatic complexity 29 (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. This shape REPEATS in the file: one other method here (Color.TryParse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Color.TryParse (cyclomatic 29) src/Avalonia.Base/Media/Color.cs:208— Color.TryParse has cyclomatic complexity 29 (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. This shape REPEATS in the file: one other method here (Color.TryParse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ExpressionVariant.OperatorDeclaration (cyclomatic 16) src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs:368— ExpressionVariant.OperatorDeclaration 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. This shape REPEATS in the file: one other method here (ExpressionVariant.OperatorDeclaration) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: ExpressionVariant.TryCast (cyclomatic 21) 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 method is counted neither in this dimension's figures nor in its score.
ExpressionVariant.OperatorDeclaration (cyclomatic 16) src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs:416— ExpressionVariant.OperatorDeclaration 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. This shape REPEATS in the file: one other method here (ExpressionVariant.OperatorDeclaration) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: ExpressionVariant.TryCast (cyclomatic 21) 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 method is counted neither in this dimension's figures nor in its score.
Repeated repair: src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs:2087— src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is UnmanagedMethods.ImmGetCompositionString at line 2087), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Win32: fix GetDpiForMonitor P/Invoke return type (x86 ignored DPI scaling) (#22419)”; “Fix pointer capture cancellation on Win32 (#22054)”; “Fix missing Win32 system menu on title bar right-click when ExtendClientAreaToDecorationsHint is enabled (#21630)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/Avalonia.Base/Media/StreamGeometry.cs src/Avalonia.Base/Media/StreamGeometry.cs:72— src/Avalonia.Base/Media/StreamGeometry.cs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is StreamGeometry.CreateDefiningGeometry at line 72), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix StreamGeometry Clone and Open when a Transform is set (#22303)”; “Revert "Fix StreamGeometry Clone and Open when a Transform is set (#22213)" (#22294)”; “Fix StreamGeometry Clone and Open when a Transform is set (#22213)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-24..2026-10-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-24 21:29:15 +00:00' --until='2026-10-22 21:29:15 +00:00' --full-history --no-merges -- src/Avalonia.Base/Media/StreamGeometry.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Color.TryParse (cognitive 19) src/Avalonia.Base/Media/Color.cs:144— Color.TryParse has cognitive complexity 19 (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. This shape REPEATS in the file: one other method here (Color.TryParse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Color.TryParse (cognitive 19) src/Avalonia.Base/Media/Color.cs:208— Color.TryParse has cognitive complexity 19 (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. This shape REPEATS in the file: one other method here (Color.TryParse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ClipDataHelper.TryCreateDataItemAsync (cognitive 16) src/Android/Avalonia.Android/Platform/Specific/Helpers/ClipDataHelper.cs:91— ClipDataHelper.TryCreateDataItemAsync has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ClipDataHelper.TryCreateDataItemAsync) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
ClipDataHelper.TryCreateDataItemAsync (cognitive 16) src/Android/Avalonia.Android/Platform/Specific/Helpers/ClipDataHelper.cs:139— ClipDataHelper.TryCreateDataItemAsync has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ClipDataHelper.TryCreateDataItemAsync) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
OnPropertyChangedOverrideAnalyzer.AnalyzeMethod (cognitive 16) src/tools/Avalonia.Analyzers.CSharp/OnPropertyChangedOverrideAnalyzer.cs:31— OnPropertyChangedOverrideAnalyzer.AnalyzeMethod has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
OnPropertyChangedOverrideAnalyzer.AnalyzeMethod (cognitive 16) src/tools/DevAnalyzers/OnPropertyChangedOverrideAnalyzer.cs:33— OnPropertyChangedOverrideAnalyzer.AnalyzeMethod has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Change-coupling hub: IBusX11TextInputMethod.cs → DBusMenuExporter.cs, DBusPlatformSettings.cs, DBusSystemDialog.cs, DBusTrayIconImpl.cs src/Avalonia.FreeDesktop/DBusIme/IBus/IBusX11TextInputMethod.cs— `src/Avalonia.FreeDesktop/DBusIme/IBus/IBusX11TextInputMethod.cs` changes together with 4 other files — `src/Avalonia.FreeDesktop/DBusMenuExporter.cs`, `src/Avalonia.FreeDesktop/DBusPlatformSettings.cs`, `src/Avalonia.FreeDesktop/DBusSystemDialog.cs`, `src/Avalonia.FreeDesktop/DBusTrayIconImpl.cs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Change-coupling hub: FcitxX11TextInputMethod.cs → DBusMenuExporter.cs, DBusPlatformSettings.cs, DBusSystemDialog.cs, DBusTrayIconImpl.cs src/Avalonia.FreeDesktop/DBusIme/Fcitx/FcitxX11TextInputMethod.cs— `src/Avalonia.FreeDesktop/DBusIme/Fcitx/FcitxX11TextInputMethod.cs` changes together with 4 other files — `src/Avalonia.FreeDesktop/DBusMenuExporter.cs`, `src/Avalonia.FreeDesktop/DBusPlatformSettings.cs`, `src/Avalonia.FreeDesktop/DBusSystemDialog.cs`, `src/Avalonia.FreeDesktop/DBusTrayIconImpl.cs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Duplicated block (52 lines × 2) src/Avalonia.Base/Utilities/FrugalList.cs:1135— src/Avalonia.Base/Utilities/FrugalList.cs:1135-1186 | src/Avalonia.Base/Utilities/FrugalList.cs:1486-1537 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (52 lines × 2) samples/IntegrationTestApp/Embedding/WinApi.cs:19— samples/IntegrationTestApp/Embedding/WinApi.cs:19-70 | src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs:484-535 — 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 `samples/IntegrationTestApp/Embedding/WinApi.cs:19` 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 (49 lines × 2) src/Avalonia.Themes.Fluent/ColorPaletteResources.cs:25— src/Avalonia.Themes.Fluent/ColorPaletteResources.cs:25-73 | src/Avalonia.Themes.Fluent2/ColorPaletteResources.cs:50-98 — `src/Avalonia.Themes.Fluent/ColorPaletteResources.cs` and `src/Avalonia.Themes.Fluent2/ColorPaletteResources.cs` 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 2 separate duplicated blocks between them, totalling at least 64 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Themes.Fluent/ColorPaletteResources.cs:25` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (49 lines × 2) src/Avalonia.Controls/CommandBar/CommandBarButton.cs:49— src/Avalonia.Controls/CommandBar/CommandBarButton.cs:49-97 | src/Avalonia.Controls/CommandBar/CommandBarToggleButton.cs:51-99 — before extracting anything, compare `src/Avalonia.Controls/CommandBar/CommandBarButton.cs` and `src/Avalonia.Controls/CommandBar/CommandBarToggleButton.cs` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Controls/CommandBar/CommandBarButton.cs:49` 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 lines × 2) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:854— src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:854-885 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:932-963 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (32 lines × 2) src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:629— src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:629-660 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:667-698 — both copies are in the same file, so extract the 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 `src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:629` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (25 lines × 2) src/Avalonia.Base/Media/Fonts/Tables/Glyf/GlyfTable.cs:442— src/Avalonia.Base/Media/Fonts/Tables/Glyf/GlyfTable.cs:442-466 | src/Avalonia.Base/Media/Fonts/Tables/Glyf/GlyfTable.cs:700-724 — both copies are in the same file, so extract the 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 (25 lines × 2) src/Avalonia.Controls/Utils/VirtualizingSnapPointsList.cs:66— src/Avalonia.Controls/Utils/VirtualizingSnapPointsList.cs:66-90 | src/Avalonia.Controls/Utils/VirtualizingSnapPointsList.cs:110-134 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls/Utils/VirtualizingSnapPointsList.cs:66` 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 (22 lines × 2) src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:998— src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:998-1019 | src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:1053-1074 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:998` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (22 lines × 2) src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:592— src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:592-613 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:630-651 — both copies are in the same file, so extract the 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 `src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:592` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 3) src/tools/Avalonia.UnicodeTrieGenerator/EastAsianWidthClassTrieGenerator.cs:67— src/tools/Avalonia.UnicodeTrieGenerator/EastAsianWidthClassTrieGenerator.cs:67-83 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:592-608 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:630-646 — 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 `src/tools/Avalonia.UnicodeTrieGenerator/EastAsianWidthClassTrieGenerator.cs:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 3) src/Avalonia.Base/Media/Color.cs:417— src/Avalonia.Base/Media/Color.cs:417-433 | src/Avalonia.Base/Media/HslColor.cs:399-415 | src/Avalonia.Base/Media/HsvColor.cs:429-445 — before extracting anything, compare `src/Avalonia.Base/Media/HslColor.cs` and `src/Avalonia.Base/Media/HsvColor.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (19–20 lines × 2) src/Avalonia.Controls/Utils/StringUtils.cs:42— src/Avalonia.Controls/Utils/StringUtils.cs:42-60 | src/Avalonia.Controls/Utils/StringUtils.cs:98-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Controls/Utils/StringUtils.cs:42` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19–20 lines × 2) src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs:437— src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs:437-456 | src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs:467-485 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs:437` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:541— src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:541-553 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:603-615 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:641-653 — 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 `src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:541` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:610— src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:610-622 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:648-660 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:686-698 — 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 `src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:610` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 3) src/tools/Avalonia.UnicodeTrieGenerator/EastAsianWidthClassTrieGenerator.cs:66— src/tools/Avalonia.UnicodeTrieGenerator/EastAsianWidthClassTrieGenerator.cs:66-76 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:629-639 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:667-677 — 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 `src/tools/Avalonia.UnicodeTrieGenerator/EastAsianWidthClassTrieGenerator.cs:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) samples/GpuInterop/VulkanDemo/VulkanBufferHelper.cs:69— samples/GpuInterop/VulkanDemo/VulkanBufferHelper.cs:69-79 | samples/GpuInterop/VulkanDemo/VulkanContent.cs:743-753 | samples/GpuInterop/VulkanDemo/VulkanMemoryHelper.cs:10-20 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15–16 lines × 2) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:1374— src/Avalonia.Controls/VirtualizingCarouselPanel.cs:1374-1389 | src/Avalonia.Controls/VirtualizingCarouselPanel.cs:1539-1553 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15–16 lines × 2) src/Avalonia.X11/Dispatching/X11PlatformThreading.cs:43— src/Avalonia.X11/Dispatching/X11PlatformThreading.cs:43-57 | src/Linux/Avalonia.LinuxFramebuffer/EpollDispatcherImpl.cs:40-55 — 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 (14 lines × 3) src/Avalonia.Base/PropertyStore/ValueStore.cs:83— src/Avalonia.Base/PropertyStore/ValueStore.cs:83-96 | src/Avalonia.Base/PropertyStore/ValueStore.cs:111-124 | src/Avalonia.Base/PropertyStore/ValueStore.cs:139-152 — 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 `src/Avalonia.Base/PropertyStore/ValueStore.cs:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin.cs:45— src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin.cs:45-58 | src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin`1.cs:21-34 | src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/TaskStreamPlugin.cs:23-36 — before extracting anything, compare `src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin`1.cs` and `src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/TaskStreamPlugin.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin`1.cs:21` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) src/Avalonia.Controls/PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter.cs:174— src/Avalonia.Controls/PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter.cs:174-187 | src/Avalonia.Controls/PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter.cs:191-205 — both copies are in the same file, so extract the 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–15 lines × 2) src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:511— src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:511-525 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:529-542 — both copies are in the same file, so extract the 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 `src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:511` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 4) src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:333— src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:333-340 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:371-378 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:407-414 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:547-554 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 4) src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:477— src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:477-484 | src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:488-495 | src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:499-506 | src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:510-517 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 4) src/Avalonia.Base/Utilities/FrugalList.cs:587— src/Avalonia.Base/Utilities/FrugalList.cs:587-591 | src/Avalonia.Base/Utilities/FrugalList.cs:1046-1050 | src/Avalonia.Base/Utilities/FrugalList.cs:1054-1058 | src/Avalonia.Base/Utilities/FrugalList.cs:1067-1071 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Avalonia.Base/Utilities/FrugalList.cs:1051` calls `SetAt`, `EntryAt` and `src/Avalonia.Base/Utilities/FrugalList.cs:592` 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 (5 lines × 4) samples/ControlCatalog/Pages/CarouselPage/CarouselPageCustomizationPage.xaml.cs:57— samples/ControlCatalog/Pages/CarouselPage/CarouselPageCustomizationPage.xaml.cs:57-61 | samples/ControlCatalog/Pages/CarouselPage/CarouselPageFirstLookPage.xaml.cs:21-25 | samples/ControlCatalog/Pages/CarouselPage/CarouselPageSelectionPage.xaml.cs:29-33 | samples/ControlCatalog/Pages/CarouselPage/CarouselPageTransitionsPage.xaml.cs:43-47 — 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 4 call sites, so a change lands once.
Duplicated block (5 lines × 6) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1358— src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1358-1362 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1368-1372 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1374-1378 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1380-1384 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1386-1390 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1393-1397 — all 6 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 (5 lines × 6) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1544— src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1544-1548 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1554-1558 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1560-1564 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1566-1570 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1572-1576 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1579-1583 — all 6 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 (9 lines × 3) src/Avalonia.Native/NativePlatformSettings.cs:57— src/Avalonia.Native/NativePlatformSettings.cs:57-65 | src/Windows/Avalonia.Win32/Win32PlatformSettings.cs:96-104 | src/iOS/Avalonia.iOS/PlatformSettings.cs:67-75 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 3) samples/ControlCatalog/Pages/TabbedPage/TabbedPageCustomizationPage.xaml.cs:56— samples/ControlCatalog/Pages/TabbedPage/TabbedPageCustomizationPage.xaml.cs:56-64 | samples/ControlCatalog/Pages/TabbedPage/TabbedPageFirstLookPage.xaml.cs:60-68 | samples/ControlCatalog/Pages/TabbedPage/TabbedPageGesturePage.xaml.cs:23-31 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
IC1 · Incompleteness & stubs· Dead `#if false` region · ×2
Dead `#if false` region src/Avalonia.Base/Collections/Pooled/ThrowHelper.cs:411— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Dead `#if false` region src/Avalonia.Base/Collections/Pooled/ThrowHelper.cs:551— Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
Condition was already decided — an earlier guard makes this test constant src/Avalonia.Base/Input/FocusManager.cs:901— Control only reaches here when `child == current` is false, because the guard on line 892 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test.
Condition was already decided — an earlier guard makes this test constant src/Avalonia.FreeDesktop.AtSpi/Handlers/AtSpiCollectionHandler.cs:105— Control only reaches here when `count > 0 && results.Count >= count` is false, because the guard on line 99 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test.
Weak hash algorithm src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:163— MD5/SHA1 is constructed 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+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses.
Weak hash algorithm src/Avalonia.Remote.Protocol/MetsysBson.cs:474— MD5/SHA1 is constructed 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+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses.
X18 · Disposal-pattern correctness· Finalizer on a type that owns no unmanaged resource · ×2
Finalizer on a type that owns no unmanaged resource src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamArrayPool.cs:162— `BatchStreamPoolBase` declares a finalizer (line 162), but nothing in the type is unmanaged: no `IntPtr`/`UIntPtr` or pointer field, no `SafeHandle`, no `HandleRef`, no `extern`/`DllImport` member and no `Marshal`/`GCHandle`/`NativeMemory` use. A finalizer can only release what the garbage collector cannot, so on a purely-managed type it releases nothing and costs something: every instance is put on the finalizer queue, survives at least one extra collection, and is then finalized on a thread that is NOT the disposing one — where the managed objects it touches may already have been finalized themselves. Delete the finalizer (and the `GC.SuppressFinalize` that exists to defuse it); if a handle is added later, wrap it in a `SafeHandle`, which brings its own correct finalization.
Finalizer on a type that owns no unmanaged resource src/Avalonia.Base/Utilities/Ref.cs:141— `Ref` declares a finalizer (line 141), but nothing in the type is unmanaged: no `IntPtr`/`UIntPtr` or pointer field, no `SafeHandle`, no `HandleRef`, no `extern`/`DllImport` member and no `Marshal`/`GCHandle`/`NativeMemory` use. A finalizer can only release what the garbage collector cannot, so on a purely-managed type it releases nothing and costs something: every instance is put on the finalizer queue, survives at least one extra collection, and is then finalized on a thread that is NOT the disposing one — where the managed objects it touches may already have been finalized themselves. Delete the finalizer (and the `GC.SuppressFinalize` that exists to defuse it); if a handle is added later, wrap it in a `SafeHandle`, which brings its own correct finalization.
X20 · Mistyped argument guard· Argument guard throws the exception its own condition disproves · ×2
Argument guard throws the exception its own condition disproves src/Avalonia.Base/Media/FontFamily.cs:36— The guard on line 34 rejects `name` and line 36 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(name)` is true of a value that is NOT null: it is satisfied by an EMPTY `name`, and on that path `name` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
Argument guard throws the exception its own condition disproves src/Avalonia.Base/Media/FormattedText.cs:1113— The guard on line 1111 rejects `maxTextWidths` and line 1113 reports that rejection as `ArgumentNullException` — but the condition's own test `maxTextWidths.Length <= 0` is true of a value that is NOT null: it is satisfied by an EMPTY `maxTextWidths`, and on that path `maxTextWidths` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
PhysicalKeyExtensions.ToQwertyKeySymbol (cyclomatic 215) src/Avalonia.Base/Input/PhysicalKeyExtensions.cs:207— PhysicalKeyExtensions.ToQwertyKeySymbol has cyclomatic complexity 215 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
WindowImpl.AppWndProc (cyclomatic 182) src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:23— WindowImpl.AppWndProc has cyclomatic complexity 182 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XamlCompilerTaskExecutor.CompileCore (cyclomatic 97) src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs:104— XamlCompilerTaskExecutor.CompileCore has cyclomatic complexity 97 (threshold 15). Of this number, 78 points are the body's own statements and 19 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionVariant.GetProperty (cyclomatic 83) src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs:53— ExpressionVariant.GetProperty has cyclomatic complexity 83 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BidiAlgorithm.ProcessIsolatedRunSequence (cyclomatic 80) src/Avalonia.Base/Media/TextFormatting/Unicode/BiDiAlgorithm.cs:856— BidiAlgorithm.ProcessIsolatedRunSequence has cyclomatic complexity 80 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
X11Window.OnEvent (cyclomatic 70) src/Avalonia.X11/X11Window.cs:591— X11Window.OnEvent has cyclomatic complexity 70 (threshold 15). Of this number, 64 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XamlIlBindingPathHelper.TransformBindingPath (cyclomatic 68) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlBindingPathHelper.cs:140— XamlIlBindingPathHelper.TransformBindingPath has cyclomatic complexity 68 (threshold 15). Of this number, 54 points are the body's own statements and 14 belong to 7 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AvaloniaXamlIlLanguageParseIntrinsics.TryConvert (cyclomatic 66) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlLanguageParseIntrinsics.cs:19— AvaloniaXamlIlLanguageParseIntrinsics.TryConvert has cyclomatic complexity 66 (threshold 15). Of this number, 65 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextBox.OnKeyDown (cyclomatic 63) src/Avalonia.Controls/TextBox.cs:1408— TextBox.OnKeyDown has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Grid.SetFinalSizeMaxDiscrepancy (cyclomatic 60) src/Avalonia.Controls/Grid.cs:1797— Grid.SetFinalSizeMaxDiscrepancy has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Graph.MeasureChild (cyclomatic 55) src/Avalonia.Controls/RelativePanel.cs:292— Graph.MeasureChild has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WordBreakEnumerator.IsBoundary (cyclomatic 53) src/Avalonia.Base/Media/TextFormatting/Unicode/WordBreakEnumerator.cs:76— WordBreakEnumerator.IsBoundary has cyclomatic complexity 53 (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.
ExpressionVariant.OperatorDeclaration (cyclomatic 53) src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs:506— ExpressionVariant.OperatorDeclaration has cyclomatic complexity 53 (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.
XI2Manager.OnDeviceEvent (cyclomatic 53) src/Avalonia.X11/XI2Manager.cs:330— XI2Manager.OnDeviceEvent has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BidiAlgorithm.ResolveExplicitEmbeddingLevels (cyclomatic 48) src/Avalonia.Base/Media/TextFormatting/Unicode/BiDiAlgorithm.cs:410— BidiAlgorithm.ResolveExplicitEmbeddingLevels has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextPathSegmentEllipsis.Collapse (cyclomatic 48) src/Avalonia.Base/Media/TextPathSegmentEllipsis.cs:43— TextPathSegmentEllipsis.Collapse has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LineBreakEnumerator.LB25 (cyclomatic 46) src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:949— LineBreakEnumerator.LB25 has cyclomatic complexity 46 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DialogsPage.DialogsPage.ctor (cyclomatic 46) samples/ControlCatalog/Pages/DialogsPage.xaml.cs:17— DialogsPage.DialogsPage.ctor has cyclomatic complexity 46 (threshold 15). Of this number, 27 points are the body's own statements and 19 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LineBreakEnumerator.ExecuteRules (cyclomatic 45) src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:160— LineBreakEnumerator.ExecuteRules has cyclomatic complexity 45 (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.
AvaloniaXamlIlSelectorTransformer.Transform (cyclomatic 43) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSelectorTransformer.cs:27— AvaloniaXamlIlSelectorTransformer.Transform has cyclomatic complexity 43 (threshold 15). Of this number, 40 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Grid.ResolveStarMaxDiscrepancy (cyclomatic 43) src/Avalonia.Controls/Grid.cs:1463— Grid.ResolveStarMaxDiscrepancy has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CrossThreadProxyGenerator.Extract (cyclomatic 43) src/tools/DevGenerators/CrossThreadProxyGenerator.cs:62— CrossThreadProxyGenerator.Extract has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KeyInterop.KeyFromDomKey (cyclomatic 41) src/Browser/Avalonia.Browser/KeyInterop.cs:385— KeyInterop.KeyFromDomKey has cyclomatic complexity 41 (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.
GraphemeEnumerator.MoveNext (cyclomatic 39) src/Avalonia.Base/Media/TextFormatting/Unicode/GraphemeEnumerator.cs:38— GraphemeEnumerator.MoveNext has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransformParser.ParseFunction (cyclomatic 39) src/Avalonia.Base/Media/Transformation/TransformParser.cs:88— TransformParser.ParseFunction has cyclomatic complexity 39 (threshold 15). Of this number, 29 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Bcp47ScriptResolver.GetScriptSubtag (cyclomatic 38) src/Avalonia.Base/Media/Fonts/Bcp47ScriptResolver.cs:25— Bcp47ScriptResolver.GetScriptSubtag has cyclomatic complexity 38 (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.
VirtualizingStackPanel.UpdateSpecialElementsOnItemsChanged (cyclomatic 38) src/Avalonia.Controls/VirtualizingStackPanel.cs:387— VirtualizingStackPanel.UpdateSpecialElementsOnItemsChanged has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextFormatterImpl.PerformTextWrapping (cyclomatic 37) src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs:897— TextFormatterImpl.PerformTextWrapping has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExpressionVariant.OperatorDeclaration (cyclomatic 37) src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs:591— ExpressionVariant.OperatorDeclaration has cyclomatic complexity 37 (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.
ServerCompositionTarget.Render (cyclomatic 37) src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs:141— ServerCompositionTarget.Render has cyclomatic complexity 37 (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.
AvaloniaXamlIlBindingPathTransformer.Transform (cyclomatic 37) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlBindingPathTransformer.cs:13— AvaloniaXamlIlBindingPathTransformer.Transform has cyclomatic complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ColorSpectrum.OnPropertyChanged (cyclomatic 37) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:402— ColorSpectrum.OnPropertyChanged has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VulkanContext.TryCreate (cyclomatic 37) samples/GpuInterop/VulkanDemo/VulkanContext.cs:37— VulkanContext.TryCreate has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
JSONParser.ParseValue (cyclomatic 37) REDACTED:136— JSONParser.ParseValue has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GetProcAddressInitializationGenerator.Initialize (cyclomatic 37) src/tools/DevGenerators/GetProcAddressInitialization.cs:20— GetProcAddressInitializationGenerator.Initialize has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 35, 24). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
GlyphTypeface.GlyphTypeface.ctor (cyclomatic 36) src/Avalonia.Base/Media/GlyphTypeface.cs:72— GlyphTypeface.GlyphTypeface.ctor has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XamlMergeResourceGroupTransformer.Transform (cyclomatic 35) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/GroupTransformers/XamlMergeResourceGroupTransformer.cs:13— XamlMergeResourceGroupTransformer.Transform has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AvaloniaXamlIlOptionMarkupExtensionTransformer.Transform (cyclomatic 35) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlOptionMarkupExtensionTransformer.cs:17— AvaloniaXamlIlOptionMarkupExtensionTransformer.Transform has cyclomatic complexity 35 (threshold 15). Of this number, 31 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ColorSpectrum.OnKeyDown (cyclomatic 35) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:228— ColorSpectrum.OnKeyDown has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
VirtualizingCarouselPanel.OnSwipeGesture (cyclomatic 35) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:1059— VirtualizingCarouselPanel.OnSwipeGesture has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FocusManager.GetNextTabStop (cyclomatic 34) src/Avalonia.Base/Input/FocusManager.cs:642— FocusManager.GetNextTabStop has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FocusManager.GetPreviousTabStop (cyclomatic 34) src/Avalonia.Base/Input/FocusManager.cs:750— FocusManager.GetPreviousTabStop has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ColorPickerHelpers.CreateComponentBitmapAsync (cyclomatic 34) src/Avalonia.Controls.ColorPicker/Helpers/ColorPickerHelpers.cs:39— ColorPickerHelpers.CreateComponentBitmapAsync has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 55). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
ConnectedAnimation.RunAnimationCoreAsync (cyclomatic 34) src/Avalonia.Controls/Animation/ConnectedAnimation.cs:256— ConnectedAnimation.RunAnimationCoreAsync has cyclomatic complexity 34 (threshold 15). Of this number, 22 points are the body's own statements and 12 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AvaloniaNameIncrementalGenerator.Initialize (cyclomatic 34) src/tools/Avalonia.Generators/NameGenerator/AvaloniaNameIncrementalGenerator.cs:21— AvaloniaNameIncrementalGenerator.Initialize has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 194, 136, 31, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
WindowImpl.CustomCaptionProc (cyclomatic 34) src/Windows/Avalonia.Win32/WindowImpl.CustomCaptionProc.cs:91— WindowImpl.CustomCaptionProc has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AvaloniaXamlIlBindingPathParser.ConvertLongFormPropertiesToBindingExpressionNode (cyclomatic 32) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlBindingPathParser.cs:93— AvaloniaXamlIlBindingPathParser.ConvertLongFormPropertiesToBindingExpressionNode has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextCharacters.CreateShapeableRun (cyclomatic 31) src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs:109— TextCharacters.CreateShapeableRun has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ManagedPopupPositioner.Calculate (cyclomatic 31) src/Avalonia.Controls/Primitives/PopupPositioning/ManagedPopupPositioner.cs:104— ManagedPopupPositioner.Calculate has cyclomatic complexity 31 (threshold 15). Of this number, 30 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AndroidMotionEventsHelper.GetActionType (cyclomatic 31) src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidMotionEventsHelper.cs:157— AndroidMotionEventsHelper.GetActionType has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TransformOperation.TryInterpolate (cyclomatic 30) src/Avalonia.Base/Media/Transformation/TransformOperation.cs:81— TransformOperation.TryInterpolate has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ColorSpectrum.UpdateEllipse (cyclomatic 30) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:804— ColorSpectrum.UpdateEllipse has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ScrollContentPresenter.SnapOffset (cyclomatic 30) src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs:1029— ScrollContentPresenter.SnapOffset has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WrapPanel.ArrangeOverride (cyclomatic 30) src/Avalonia.Controls/WrapPanel.cs:284— WrapPanel.ArrangeOverride has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WindowImpl.UpdateWindowProperties (cyclomatic 30) src/Windows/Avalonia.Win32/WindowImpl.cs:1402— WindowImpl.UpdateWindowProperties has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ColorSpectrum.UpdateBitmapSources (cyclomatic 29) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1586— ColorSpectrum.UpdateBitmapSources has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
CommandBar.UpdateDynamicOverflow (cyclomatic 29) src/Avalonia.Controls/CommandBar/CommandBar.cs:643— CommandBar.UpdateDynamicOverflow has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DefaultMenuInteractionHandler.KeyDown (cyclomatic 29) src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs:416— DefaultMenuInteractionHandler.KeyDown has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TickBar.Render (cyclomatic 29) src/Avalonia.Controls/TickBar.cs:213— TickBar.Render has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DBusMenuExporterImpl.GetProperty (cyclomatic 29) src/Avalonia.FreeDesktop/DBusMenuExporter.cs:223— DBusMenuExporterImpl.GetProperty has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextLayout.CreateTextLines (cyclomatic 28) src/Avalonia.Base/Media/TextFormatting/TextLayout.cs:565— TextLayout.CreateTextLines has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DrawerPage.OnSwipeGesture (cyclomatic 28) src/Avalonia.Controls/Page/DrawerPage.cs:803— DrawerPage.OnSwipeGesture has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextPresenter.OnPropertyChanged (cyclomatic 28) src/Avalonia.Controls/Presenters/TextPresenter.cs:1092— TextPresenter.OnPropertyChanged has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
VirtualizingStackPanel.OnEffectiveViewportChanged (cyclomatic 28) src/Avalonia.Controls/VirtualizingStackPanel.cs:1284— VirtualizingStackPanel.OnEffectiveViewportChanged has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CodeBlock.TokenizeXaml (cyclomatic 28) samples/ControlCatalog/Controls/CodeBlock.cs:288— CodeBlock.TokenizeXaml has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Win32Icon.LoadIconFromData (cyclomatic 28) src/Windows/Avalonia.Win32/Interop/Win32Icon.cs:183— Win32Icon.LoadIconFromData has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FocusManager.GetNextOrPreviousTabStopInternal (cyclomatic 27) src/Avalonia.Base/Input/FocusManager.cs:873— FocusManager.GetNextOrPreviousTabStopInternal has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SpanVector.Set (cyclomatic 27) src/Avalonia.Base/Utilities/Span.cs:213— SpanVector.Set has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Grid.EnsureMinSizeInDefinitionRange (cyclomatic 27) src/Avalonia.Controls/Grid.cs:1244— Grid.EnsureMinSizeInDefinitionRange has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
DrawerPage.OnPropertyChanged (cyclomatic 27) src/Avalonia.Controls/Page/DrawerPage.cs:619— DrawerPage.OnPropertyChanged has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DrawerPage.UpdateContentSafeAreaPadding (cyclomatic 27) src/Avalonia.Controls/Page/DrawerPage.cs:878— DrawerPage.UpdateContentSafeAreaPadding has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SelectionModel.CommitOperation (cyclomatic 27) src/Avalonia.Controls/Selection/SelectionModel.cs:658— SelectionModel.CommitOperation has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AndroidInputMethod.SetOptions (cyclomatic 27) src/Android/Avalonia.Android/Platform/Input/AndroidInputMethod.cs:164— AndroidInputMethod.SetOptions has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to one function literal inside it that branches (line 166). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
SelectorParser.Create (cyclomatic 27) src/Markup/Avalonia.Markup/Markup/Parsers/SelectorParser.cs:43— SelectorParser.Create has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SimpleGlyph.Create (cyclomatic 26) src/Avalonia.Base/Media/Fonts/Tables/Glyf/SimpleGlyph.cs:107— SimpleGlyph.Create has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GlyphTypeface.TryGetGlyphMetrics (cyclomatic 26) src/Avalonia.Base/Media/GlyphTypeface.cs:833— GlyphTypeface.TryGetGlyphMetrics has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SentenceBreakEnumerator.IsBoundary (cyclomatic 26) src/Avalonia.Base/Media/TextFormatting/Unicode/SentenceBreakEnumerator.cs:111— SentenceBreakEnumerator.IsBoundary has cyclomatic complexity 26 (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.
AvaloniaXamlIlDataContextTypeTransformer.Transform (cyclomatic 26) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlDataContextTypeTransformer.cs:23— AvaloniaXamlIlDataContextTypeTransformer.Transform has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ColorPickerHelpers.FindNextNamedColor (cyclomatic 26) src/Avalonia.Controls.ColorPicker/Helpers/ColorPickerHelpers.cs:409— ColorPickerHelpers.FindNextNamedColor has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ComboBox.OnKeyDown (cyclomatic 26) src/Avalonia.Controls/ComboBox.cs:254— ComboBox.OnKeyDown has cyclomatic complexity 26 (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.
LayoutTransformControl.ComputeLargestTransformedSize (cyclomatic 26) src/Avalonia.Controls/LayoutTransformControl.cs:299— LayoutTransformControl.ComputeLargestTransformedSize has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InputHandler.Handle (cyclomatic 26) src/iOS/Avalonia.iOS/InputHandler.cs:195— InputHandler.Handle has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
GtkSystemDialog.ShowDialog (cyclomatic 26) src/Avalonia.X11/NativeDialogs/GtkNativeFileDialogs.cs:92— GtkSystemDialog.ShowDialog has cyclomatic complexity 26 (threshold 15). Of this number, 20 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
X11Window.X11Window.ctor (cyclomatic 26) src/Avalonia.X11/X11Window.cs:96— X11Window.X11Window.ctor has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TextLineImpl.GetTextBounds (cyclomatic 25) src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:671— TextLineImpl.GetTextBounds 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.
ExpressionParser.ParseTillTerminator (cyclomatic 25) src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionParser.cs:192— ExpressionParser.ParseTillTerminator 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.
AvaloniaXamlIlSetterTransformer.Transform (cyclomatic 25) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSetterTransformer.cs:23— AvaloniaXamlIlSetterTransformer.Transform 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.
PopupPositionerExtensions.Update (cyclomatic 25) src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs:459— PopupPositionerExtensions.Update has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TabControl.UpdateSelectedContent (cyclomatic 25) src/Avalonia.Controls/TabControl.cs:248— TabControl.UpdateSelectedContent has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 291, 332, 326). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
DrawingContextImpl.ConfigureGradientBrush (cyclomatic 25) src/Skia/Avalonia.Skia/DrawingContextImpl.cs:934— DrawingContextImpl.ConfigureGradientBrush 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.
TabNavigation.GetPrevTab (cyclomatic 24) src/Avalonia.Base/Input/Navigation/TabNavigation.cs:89— TabNavigation.GetPrevTab has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Visual.SynchronizeCompositionChildVisuals (cyclomatic 24) src/Avalonia.Base/Visual.Composition.cs:43— Visual.SynchronizeCompositionChildVisuals has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ColorSpectrum.CreateBitmapsAndColorMap (cyclomatic 24) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1049— ColorSpectrum.CreateBitmapsAndColorMap has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
MaskedTextBox.OnPropertyChanged (cyclomatic 24) src/Avalonia.Controls/MaskedTextBox.cs:300— MaskedTextBox.OnPropertyChanged has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DrawingContextImpl.DrawRectangle (cyclomatic 24) src/Skia/Avalonia.Skia/DrawingContextImpl.cs:416— DrawingContextImpl.DrawRectangle has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WindowImpl.HitTestVisual (cyclomatic 24) src/Windows/Avalonia.Win32/WindowImpl.CustomCaptionProc.cs:232— WindowImpl.HitTestVisual has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Color.TryParseCssFormat (cyclomatic 23) src/Avalonia.Base/Media/Color.cs:328— Color.TryParseCssFormat has cyclomatic complexity 23 (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.
TextLeadingPrefixCharacterEllipsis.Collapse (cyclomatic 23) src/Avalonia.Base/Media/TextFormatting/TextLeadingPrefixCharacterEllipsis.cs:51— TextLeadingPrefixCharacterEllipsis.Collapse has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ConnectedAnimation.RunFallbackAnimationAsync (cyclomatic 23) src/Avalonia.Controls/Animation/ConnectedAnimation.cs:535— ConnectedAnimation.RunFallbackAnimationAsync has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CalendarDatePicker.OnPropertyChanged (cyclomatic 23) src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs:209— CalendarDatePicker.OnPropertyChanged has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VirtualizingSnapPointsList.this[].get (cyclomatic 23) src/Avalonia.Controls/Utils/VirtualizingSnapPointsList.cs:39— VirtualizingSnapPointsList.this[].get has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CompileAnalyzer.RegisterAvaloniaPropertySymbols (cyclomatic 23) src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs:115— CompileAnalyzer.RegisterAvaloniaPropertySymbols has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 147, 239, 189, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
CompileAnalyzer.RegisterInitializer_Invocation (cyclomatic 23) src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs:294— CompileAnalyzer.RegisterInitializer_Invocation has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CompileAnalyzer.AnalyzeMethodInvocation (cyclomatic 23) src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs:582— CompileAnalyzer.AnalyzeMethodInvocation has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Generator.GenerateClass (cyclomatic 23) src/tools/DevGenerators/CompositionGenerator/Generator.cs:48— Generator.GenerateClass has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RefAssemblyGenerator.ProcessType (cyclomatic 22) nukebuild/RefAssemblyGenerator.cs:71— RefAssemblyGenerator.ProcessType 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.
FontCollectionBase.TryAddFontSource (cyclomatic 22) src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:697— FontCollectionBase.TryAddFontSource 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.
HslColor.TryParse (cyclomatic 22) src/Avalonia.Base/Media/HslColor.cs:328— HslColor.TryParse 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.
HsvColor.TryParse (cyclomatic 22) src/Avalonia.Base/Media/HsvColor.cs:358— HsvColor.TryParse 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.
MediaExtensions.CalculateScaling (cyclomatic 22) src/Avalonia.Base/Media/MediaExtensions.cs:19— MediaExtensions.CalculateScaling 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.
UnicodeTrieBuilder.SetRange (cyclomatic 22) src/Avalonia.Base/Media/TextFormatting/Unicode/UnicodeTrieBuilder.cs:170— UnicodeTrieBuilder.SetRange 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.
TypeUtilities.TryConvert (cyclomatic 22) src/Avalonia.Base/Utilities/TypeUtilities.cs:129— TypeUtilities.TryConvert 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.
AvaloniaXamlIlQueryTransformer.Transform (cyclomatic 22) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:21— AvaloniaXamlIlQueryTransformer.Transform 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.
Calendar.ProcessSelection (cyclomatic 22) src/Avalonia.Controls/Calendar/Calendar.cs:1616— Calendar.ProcessSelection 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.
FlexPanel.ArrangeOverride (cyclomatic 22) src/Avalonia.Controls/FlexPanel/FlexPanel.cs:287— FlexPanel.ArrangeOverride 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.
MultiPage.NotifyCollection_CollectionChanged (cyclomatic 22) src/Avalonia.Controls/Page/MultiPage.cs:164— MultiPage.NotifyCollection_CollectionChanged 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.
ScrollContentPresenter.OnScrollGesture (cyclomatic 22) src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs:585— ScrollContentPresenter.OnScrollGesture 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.
InputHandler.Handle (cyclomatic 22) src/iOS/Avalonia.iOS/InputHandler.cs:50— InputHandler.Handle has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AtSpiNode.ComputeStatesCore (cyclomatic 22) src/Avalonia.FreeDesktop.AtSpi/AtSpiNode.StateMapping.cs:16— AtSpiNode.ComputeStatesCore 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.
X11Window.Cleanup (cyclomatic 22) src/Avalonia.X11/X11Window.cs:1185— X11Window.Cleanup 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.
InteractiveLineControl.Render (cyclomatic 22) samples/TextTestApp/InteractiveLineControl.cs:474— InteractiveLineControl.Render 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.
SbomGenerator.AddPackageContentComponents (cyclomatic 21) nukebuild/SbomGenerator.cs:551— SbomGenerator.AddPackageContentComponents has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ScrollGestureRecognizer.PointerMoved (cyclomatic 21) src/Avalonia.Base/Input/GestureRecognizers/ScrollGestureRecognizer.cs:174— ScrollGestureRecognizer.PointerMoved has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Pointer.CaptureCore (cyclomatic 21) src/Avalonia.Base/Input/Pointer.cs:83— Pointer.CaptureCore has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FontCollectionBase.TryMatchCharacter (cyclomatic 21) src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:59— FontCollectionBase.TryMatchCharacter has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FontCollectionBase.TryFindWeightFallback (cyclomatic 21) src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:1191— FontCollectionBase.TryFindWeightFallback has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PropertyParser.Parse (cyclomatic 21) src/Markup/Avalonia.Markup.Xaml/Parsers/PropertyParser.cs:15— PropertyParser.Parse has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Grid.MeasureOverride (cyclomatic 21) src/Avalonia.Controls/Grid.cs:246— Grid.MeasureOverride has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Slider.MoveToNextTick (cyclomatic 21) src/Avalonia.Controls/Slider.cs:288— Slider.MoveToNextTick has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StackPanel.GetControlInDirection (cyclomatic 21) src/Avalonia.Controls/StackPanel.cs:180— StackPanel.GetControlInDirection has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ToolTipService.InputManager_OnProcess (cyclomatic 21) src/Avalonia.Controls/ToolTipService.cs:38— ToolTipService.InputManager_OnProcess has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TreeViewItem.OnKeyDown (cyclomatic 21) src/Avalonia.Controls/TreeViewItem.cs:220— TreeViewItem.OnKeyDown has cyclomatic complexity 21 (threshold 15). Of this number, 12 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VirtualizingStackPanel.GetControl (cyclomatic 21) src/Avalonia.Controls/VirtualizingStackPanel.cs:541— VirtualizingStackPanel.GetControl has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
X11Info.X11Info.ctor (cyclomatic 21) src/Avalonia.X11/X11Info.cs:48— X11Info.X11Info.ctor has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ComVariant.Create (cyclomatic 21) src/Windows/Avalonia.Win32.Automation/Marshalling/ComVariant.cs:140— ComVariant.Create 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. This is NOT this file's highest cyclomatic complexity: ComVariant.AsObject (cyclomatic 39) 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 method is counted neither in this dimension's figures nor in its score.
Animatable.OnPropertyChangedCore (cyclomatic 20) src/Avalonia.Base/Animation/Animatable.cs:105— Animatable.OnPropertyChangedCore has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BindingExpression.BindingExpression.ctor (cyclomatic 20) src/Avalonia.Base/Data/Core/BindingExpression.cs:59— BindingExpression.BindingExpression.ctor has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
FontManager.TryMatchCharacter (cyclomatic 20) src/Avalonia.Base/Media/FontManager.cs:302— FontManager.TryMatchCharacter has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextLineImpl.GetCharacterHitFromDistance (cyclomatic 20) src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:234— TextLineImpl.GetCharacterHitFromDistance has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextLineImpl.CreateLineMetrics (cyclomatic 20) src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:1340— TextLineImpl.CreateLineMetrics has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AvaloniaXamlIlTransformInstanceAttachedProperties.Transform (cyclomatic 20) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlTransformInstanceAttachedProperties.cs:16— AvaloniaXamlIlTransformInstanceAttachedProperties.Transform has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SelectorGrammar.ParseNthChildArguments (cyclomatic 20) src/Markup/Avalonia.Markup/Markup/Parsers/SelectorGrammar.cs:396— SelectorGrammar.ParseNthChildArguments has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CalendarItem.SetCalendarDayButtons (cyclomatic 20) src/Avalonia.Controls/Calendar/CalendarItem.cs:510— CalendarItem.SetCalendarDayButtons has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MaskedTextBox.OnKeyDown (cyclomatic 20) src/Avalonia.Controls/MaskedTextBox.cs:199— MaskedTextBox.OnKeyDown has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Popup.Open (cyclomatic 20) src/Avalonia.Controls/Primitives/Popup.cs:429— Popup.Open has cyclomatic complexity 20 (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.
Popup.OnPropertyChanged (cyclomatic 20) src/Avalonia.Controls/Primitives/Popup.cs:658— Popup.OnPropertyChanged has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextSelectionHandleCanvas.DragSelectionHandle (cyclomatic 20) src/Avalonia.Controls/Primitives/TextSelectionCanvas.cs:274— TextSelectionHandleCanvas.DragSelectionHandle has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextBox.OnPointerMoved (cyclomatic 20) src/Avalonia.Controls/TextBox.cs:1962— TextBox.OnPointerMoved has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TreeView.SelectedItemsCollectionChanged (cyclomatic 20) src/Avalonia.Controls/TreeView.cs:371— TreeView.SelectedItemsCollectionChanged has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AndroidDragDrop.OnDrag (cyclomatic 20) src/Android/Avalonia.Android/Platform/AndroidDragDrop.cs:40— AndroidDragDrop.OnDrag has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HeadlessVncFramebufferSource.HeadlessVncFramebufferSource.ctor (cyclomatic 20) src/Headless/Avalonia.Headless.Vnc/HeadlessVncFramebufferSource.cs:20— HeadlessVncFramebufferSource.HeadlessVncFramebufferSource.ctor has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 40, 62, 23, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest. This is NOT this file's highest cyclomatic complexity: HeadlessVncFramebufferSource.TranslateKey (cyclomatic 187) 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 method is counted neither in this dimension's figures nor in its score.
SeatListener.Done (cyclomatic 20) src/Avalonia.Wayland/Server/Transient/WaylandTextInputV3.cs:448— SeatListener.Done has cyclomatic complexity 20 (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.
AvaloniaXamlIlRuntimeCompiler.LoadGroupSreCore (cyclomatic 20) src/Markup/Avalonia.Markup.Xaml.Loader/AvaloniaXamlIlRuntimeCompiler.cs:208— AvaloniaXamlIlRuntimeCompiler.LoadGroupSreCore has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 239, 317). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Program.Main (cyclomatic 20) samples/ControlCatalog.Desktop/Program.cs:24— Program.Main has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CompileAnalyzer.AnalyzePropertyMethods (cyclomatic 20) src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs:737— CompileAnalyzer.AnalyzePropertyMethods has cyclomatic complexity 20 (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.
Win32StorageProvider.ShowFilePickerAsync (cyclomatic 20) src/Windows/Avalonia.Win32/Win32StorageProvider.cs:95— Win32StorageProvider.ShowFilePickerAsync has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 115). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
LeastSquaresSolver.Solve (cyclomatic 19) src/Avalonia.Base/Input/GestureRecognizers/VelocityTracker.cs:234— LeastSquaresSolver.Solve has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Gestures.PointerPressed (cyclomatic 19) src/Avalonia.Base/Input/Gestures.cs:47— Gestures.PointerPressed has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Layoutable.MeasureCore (cyclomatic 19) src/Avalonia.Base/Layout/Layoutable.cs:544— Layoutable.MeasureCore has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GlyphRun.FindGlyphIndex (cyclomatic 19) src/Avalonia.Base/Media/GlyphRun.cs:482— GlyphRun.FindGlyphIndex has cyclomatic complexity 19 (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.
TextFormatterImpl.SplitTextRuns (cyclomatic 19) src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs:198— TextFormatterImpl.SplitTextRuns has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StringSplitter.SplitRespectingBrackets (cyclomatic 19) src/Avalonia.Base/Utilities/StringSplitter.cs:39— StringSplitter.SplitRespectingBrackets has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NavigationPage.PopModalAsync (cyclomatic 19) src/Avalonia.Controls/Page/NavigationPage.cs:1347— NavigationPage.PopModalAsync has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TabbedPage.OnKeyDown (cyclomatic 19) src/Avalonia.Controls/Page/TabbedPage.cs:701— TabbedPage.OnKeyDown has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VirtualizingCarouselPanel.OnViewportFractionSwipeGesture (cyclomatic 19) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:1192— VirtualizingCarouselPanel.OnViewportFractionSwipeGesture has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VirtualizingStackPanel.ArrangeOverride (cyclomatic 19) src/Avalonia.Controls/VirtualizingStackPanel.cs:242— VirtualizingStackPanel.ArrangeOverride has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Deserializer.DeserializeValue (cyclomatic 19) src/Avalonia.Remote.Protocol/MetsysBson.cs:1109— Deserializer.DeserializeValue has cyclomatic complexity 19 (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.
BrowserDataTransferHelper.TryGetValue (cyclomatic 19) src/Browser/Avalonia.Browser/BrowserDataTransferHelper.cs:32— BrowserDataTransferHelper.TryGetValue has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DBusTrayIconImpl.CreateTrayIcon (cyclomatic 19) src/Avalonia.FreeDesktop/DBusTrayIconImpl.cs:145— DBusTrayIconImpl.CreateTrayIcon has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SafeArrayRef.ToArray (cyclomatic 19) src/Windows/Avalonia.Win32.Automation/Marshalling/SafeArrayRef.cs:99— SafeArrayRef.ToArray has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 103). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This is NOT this file's highest cyclomatic complexity: SafeArrayRef.TryCreate (cyclomatic 23) 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 method is counted neither in this dimension's figures nor in its score.
AnimationInstance.InternalStep (cyclomatic 18) src/Avalonia.Base/Animation/AnimationInstance`1.cs:366— AnimationInstance.InternalStep has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CompiledBinding.CanUseTypedBindingExpression (cyclomatic 18) src/Avalonia.Base/Data/CompiledBinding.cs:210— CompiledBinding.CanUseTypedBindingExpression has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FocusManager.GetFirstFocusableElementInternal (cyclomatic 18) src/Avalonia.Base/Input/FocusManager.cs:446— FocusManager.GetFirstFocusableElementInternal 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. This shape REPEATS in the file: one other method here (FocusManager.GetLastFocusableElementInternal) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
FocusManager.GetLastFocusableElementInternal (cyclomatic 18) src/Avalonia.Base/Input/FocusManager.cs:502— FocusManager.GetLastFocusableElementInternal 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. This shape REPEATS in the file: one other method here (FocusManager.GetFirstFocusableElementInternal) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
XYFocusAlgorithms.CalculatePrimaryAxisDistance (cyclomatic 18) src/Avalonia.Base/Input/Navigation/XYFocusAlgorithms.cs:285— XYFocusAlgorithms.CalculatePrimaryAxisDistance has cyclomatic complexity 18 (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.
Effect.Parse (cyclomatic 18) src/Avalonia.Base/Media/Effects/Effect.cs:44— Effect.Parse 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.
CmapTable.Load::TryFindFormat12Or13Entry (cyclomatic 18) src/Avalonia.Base/Media/Fonts/Tables/Cmap/CmapTable.cs:73— CmapTable.Load::TryFindFormat12Or13Entry has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
PathMarkupParser.Parse (cyclomatic 18) src/Avalonia.Base/Media/PathMarkupParser.cs:100— PathMarkupParser.Parse has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ShapedBuffer.EnsureClusterCache (cyclomatic 18) src/Avalonia.Base/Media/TextFormatting/ShapedBuffer.cs:377— ShapedBuffer.EnsureClusterCache 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.
TextLayout.GetHitTestResult (cyclomatic 18) src/Avalonia.Base/Media/TextFormatting/TextLayout.cs:486— TextLayout.GetHitTestResult 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.
ImmediateRenderer.Render (cyclomatic 18) src/Avalonia.Base/Rendering/ImmediateRenderer.cs:32— ImmediateRenderer.Render has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DispatcherPriority.ToString (cyclomatic 18) src/Avalonia.Base/Threading/DispatcherPriority.cs:177— DispatcherPriority.ToString has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AvaloniaXamlIncludeTransformer.Transform (cyclomatic 18) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/GroupTransformers/XamlIncludeGroupTransformer.cs:21— AvaloniaXamlIncludeTransformer.Transform has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ColorPickerHelpers.IncrementColorComponent (cyclomatic 18) src/Avalonia.Controls.ColorPicker/Helpers/ColorPickerHelpers.cs:323— ColorPickerHelpers.IncrementColorComponent 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.
AutoCompleteBox.ItemsCollectionChanged (cyclomatic 18) src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.cs:1448— AutoCompleteBox.ItemsCollectionChanged has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
Button.OnPropertyChanged (cyclomatic 18) src/Avalonia.Controls/Button.cs:483— Button.OnPropertyChanged 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.
CalendarItem.Cell_MouseLeftButtonDown (cyclomatic 18) src/Avalonia.Controls/Calendar/CalendarItem.cs:977— CalendarItem.Cell_MouseLeftButtonDown 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.
CalendarItem.Cell_MouseLeftButtonUp (cyclomatic 18) src/Avalonia.Controls/Calendar/CalendarItem.cs:1103— CalendarItem.Cell_MouseLeftButtonUp 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.
RadioButtonGroupManager.OnCheckedChanged (cyclomatic 18) src/Avalonia.Controls/RadioButtonGroupManager.cs:88— RadioButtonGroupManager.OnCheckedChanged 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.
GraphNode.GetBoundingSize (cyclomatic 18) src/Avalonia.Controls/RelativePanel.cs:158— GraphNode.GetBoundingSize 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.
Slider.OnKeyDown (cyclomatic 18) src/Avalonia.Controls/Slider.cs:232— Slider.OnKeyDown has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TextBox.OnPointerReleased (cyclomatic 18) src/Avalonia.Controls/TextBox.cs:2099— TextBox.OnPointerReleased 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.
VirtualizingCarouselPanel.OnItemsChanged (cyclomatic 18) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:686— VirtualizingCarouselPanel.OnItemsChanged 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.
Window.ShowCore (cyclomatic 18) src/Avalonia.Controls/Window.cs:975— Window.ShowCore has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AndroidScreen.Refresh (cyclomatic 18) src/Android/Avalonia.Android/Platform/AndroidScreens.cs:19— AndroidScreen.Refresh 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.
X11Window.ScheduleInput (cyclomatic 18) src/Avalonia.X11/X11Window.cs:1018— X11Window.ScheduleInput 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.
StaticResourceExtension.ProvideValue (cyclomatic 18) src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StaticResourceExtension.cs:31— StaticResourceExtension.ProvideValue 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.
AngleWin32EglDisplay.CreateD3D11Display (cyclomatic 18) src/Windows/Avalonia.Win32/OpenGl/Angle/AngleWin32EglDisplay.cs:53— AngleWin32EglDisplay.CreateD3D11Display 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.
Rotate3DTransition.Start (cyclomatic 17) src/Avalonia.Base/Animation/Transitions/Rotate3DTransition.cs:39— Rotate3DTransition.Start 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.
DefaultConverter.TryConvert (cyclomatic 17) src/Avalonia.Base/Data/Core/TargetTypeConverter.cs:28— DefaultConverter.TryConvert 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.
FocusManager.CanProcessTabStop (cyclomatic 17) src/Avalonia.Base/Input/FocusManager.cs:989— FocusManager.CanProcessTabStop 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.
FontCollectionBase.TryGetGlyphTypeface (cyclomatic 17) src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:855— FontCollectionBase.TryGetGlyphTypeface 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.
GlyphRun.FindNearestCharacterHit (cyclomatic 17) src/Avalonia.Base/Media/GlyphRun.cs:571— GlyphRun.FindNearestCharacterHit 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.
GlyphTypeface.TryGetGlyphMetrics (cyclomatic 17) src/Avalonia.Base/Media/GlyphTypeface.cs:773— GlyphTypeface.TryGetGlyphMetrics 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. This is NOT this file's highest cyclomatic complexity: GlyphTypeface.GetFontWeight (cyclomatic 19) 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 method is counted neither in this dimension's figures nor in its score.
PathMarkupParser.ReadArgument (cyclomatic 17) src/Avalonia.Base/Media/PathMarkupParser.cs:462— PathMarkupParser.ReadArgument 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.
TextDecoration.Draw (cyclomatic 17) src/Avalonia.Base/Media/TextDecoration.cs:161— TextDecoration.Draw has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
LineBreakEnumerator.LB28a (cyclomatic 17) src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:1292— LineBreakEnumerator.LB28a has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
UnicodeTrieBuilder.CompactData (cyclomatic 17) src/Avalonia.Base/Media/TextFormatting/Unicode/UnicodeTrieBuilder.cs:696— UnicodeTrieBuilder.CompactData has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ExpressionVariant.EqualsTo (cyclomatic 17) src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs:653— ExpressionVariant.EqualsTo 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. This is NOT this file's highest cyclomatic complexity: ExpressionVariant.TryCast (cyclomatic 21) 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 method is counted neither in this dimension's figures nor in its score.
TokenParser.TryParseCall (cyclomatic 17) src/Avalonia.Base/Rendering/Composition/Expressions/TokenParser.cs:181— TokenParser.TryParseCall has cyclomatic complexity 17 (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.
Calendar.ProcessTapRangeSelection (cyclomatic 17) src/Avalonia.Controls/Calendar/Calendar.cs:1534— Calendar.ProcessTapRangeSelection 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.
CarouselPage.OnKeyDown (cyclomatic 17) src/Avalonia.Controls/Page/CarouselPage.cs:249— CarouselPage.OnKeyDown 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.
TableViewLayoutHelper.UpdateActualWidths (cyclomatic 17) src/Avalonia.Controls/Presenters/TableViewLayoutHelper.cs:14— TableViewLayoutHelper.UpdateActualWidths 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.
TextSelectionHandleCanvas.EnsureVisible (cyclomatic 17) src/Avalonia.Controls/Primitives/TextSelectionCanvas.cs:222— TextSelectionHandleCanvas.EnsureVisible has cyclomatic complexity 17 (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.
RefreshVisualizer.UpdateContent (cyclomatic 17) src/Avalonia.Controls/PullToRefresh/RefreshVisualizer.cs:196— RefreshVisualizer.UpdateContent 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.
TreeView.GetContainerInDirection (cyclomatic 17) src/Avalonia.Controls/TreeView.cs:653— TreeView.GetContainerInDirection 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.
StringUtils.IsEndOfWord (cyclomatic 17) src/Avalonia.Controls/Utils/StringUtils.cs:71— StringUtils.IsEndOfWord has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
VirtualizingCarouselPanel.OnSwipeGestureEnded (cyclomatic 17) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:1400— VirtualizingCarouselPanel.OnSwipeGestureEnded 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.
VirtualizingStackPanel.RealizeElements (cyclomatic 17) src/Avalonia.Controls/VirtualizingStackPanel.cs:942— VirtualizingStackPanel.RealizeElements 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.
AtSpiNode.OnPeerPropertyChanged (cyclomatic 17) src/Avalonia.FreeDesktop.AtSpi/AtSpiNode.cs:456— AtSpiNode.OnPeerPropertyChanged 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.
GlxDisplay.GlxDisplay.ctor (cyclomatic 17) src/Avalonia.X11/Glx/GlxDisplay.cs:23— GlxDisplay.GlxDisplay.ctor 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.
ConvertToGeneratedPropertyAnalyzer.OwnerMatches (cyclomatic 17) src/tools/Avalonia.Analyzers.CSharp/GeneratedProperties/ConvertToGeneratedPropertyAnalyzer.cs:115— ConvertToGeneratedPropertyAnalyzer.OwnerMatches has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WindowImpl.Resize (cyclomatic 17) src/Windows/Avalonia.Win32/WindowImpl.cs:561— WindowImpl.Resize 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.
WindowImpl.HitTestNCA (cyclomatic 17) src/Windows/Avalonia.Win32/WindowImpl.CustomCaptionProc.cs:13— WindowImpl.HitTestNCA 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.
CaretHelper.getCaretCoordinates (cyclomatic 17) src/Browser/Avalonia.Browser/webapp/modules/avalonia/caretHelper.ts:3— CaretHelper.getCaretCoordinates has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, 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.
Animation.InterpretKeyframes (cyclomatic 16) src/Avalonia.Base/Animation/Animation.cs:218— Animation.InterpretKeyframes has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PageSlide.Update (cyclomatic 16) src/Avalonia.Base/Animation/PageSlide.cs:165— PageSlide.Update 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.
BindingExpression.OnNodeValueChanged (cyclomatic 16) src/Avalonia.Base/Data/Core/BindingExpression.cs:193— BindingExpression.OnNodeValueChanged 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.
BindingExpressionVisitor.VisitMethodCall (cyclomatic 16) src/Avalonia.Base/Data/Core/Parsers/BindingExpressionVisitor.cs:120— BindingExpressionVisitor.VisitMethodCall 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.
KeyboardDevice.ProcessRawEvent (cyclomatic 16) src/Avalonia.Base/Input/KeyboardDevice.cs:233— KeyboardDevice.ProcessRawEvent 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.
FontManager.TryGetGlyphTypeface (cyclomatic 16) src/Avalonia.Base/Media/FontManager.cs:129— FontManager.TryGetGlyphTypeface 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.
FontCollectionBase.TryCreateSyntheticGlyphTypeface (cyclomatic 16) src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:469— FontCollectionBase.TryCreateSyntheticGlyphTypeface 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.
HsvColor.ToRgb (cyclomatic 16) src/Avalonia.Base/Media/HsvColor.cs:491— HsvColor.ToRgb has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
TextCharacters.TryGetShapeableLength (cyclomatic 16) src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs:294— TextCharacters.TryGetShapeableLength 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.
TextEllipsisHelper.Collapse (cyclomatic 16) src/Avalonia.Base/Media/TextFormatting/TextEllipsisHelper.cs:7— TextEllipsisHelper.Collapse 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.
TextLineImpl.GetPreviousCharacterHit (cyclomatic 16) src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:866— TextLineImpl.GetPreviousCharacterHit 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.
LineBreakEnumerator.LB19 (cyclomatic 16) src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:676— LineBreakEnumerator.LB19 has cyclomatic complexity 16 (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.
RenderContext.PostSubgraph (cyclomatic 16) src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual/ServerCompositionVisual.Render.cs:170— RenderContext.PostSubgraph 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.
AvaloniaXamlIlBindingPathParser.Transform (cyclomatic 16) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlBindingPathParser.cs:17— AvaloniaXamlIlBindingPathParser.Transform 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.
AvaloniaXamlIlDataTemplateWarningsTransformer.Transform (cyclomatic 16) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlDataTemplateWarningsTransformer.cs:18— AvaloniaXamlIlDataTemplateWarningsTransformer.Transform has cyclomatic complexity 16 (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.
ColorSpectrum.UpdateColor (cyclomatic 16) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:620— ColorSpectrum.UpdateColor has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
CommandBar.OnPropertyChanged (cyclomatic 16) src/Avalonia.Controls/CommandBar/CommandBar.cs:407— CommandBar.OnPropertyChanged 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.
TimePicker.SetGrid (cyclomatic 16) src/Avalonia.Controls/DateTimePickers/TimePicker.cs:271— TimePicker.SetGrid 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.
InProcessDragSource.ProcessMouseEvents (cyclomatic 16) src/Avalonia.Controls/Platform/InProcessDragSource.cs:155— InProcessDragSource.ProcessMouseEvents 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.
PanelContainerGenerator.OnItemsChanged (cyclomatic 16) src/Avalonia.Controls/Presenters/PanelContainerGenerator.cs:43— PanelContainerGenerator.OnItemsChanged 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.
SelectingItemsControl.UpdateSelection (cyclomatic 16) src/Avalonia.Controls/Primitives/SelectingItemsControl.cs:793— SelectingItemsControl.UpdateSelection 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.
StackPanel.GetControl (cyclomatic 16) src/Avalonia.Controls/StackPanel.cs:131— StackPanel.GetControl has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Window.MeasureOverride (cyclomatic 16) src/Avalonia.Controls/Window.cs:1374— Window.MeasureOverride 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.
Window.HandleResized (cyclomatic 16) src/Avalonia.Controls/Window.cs:1464— Window.HandleResized 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.
WrapPanel.GetControl (cyclomatic 16) src/Avalonia.Controls/WrapPanel.cs:171— WrapPanel.GetControl 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.
EglDisplayUtils.InitializeAndGetConfig (cyclomatic 16) src/Avalonia.OpenGL/Egl/EglDisplayUtils.cs:52— EglDisplayUtils.InitializeAndGetConfig has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Serializer.SerializeMember (cyclomatic 16) src/Avalonia.Remote.Protocol/MetsysBson.cs:197— Serializer.SerializeMember has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
AndroidStorageProvider.TryGetFolderFromPathAsync (cyclomatic 16) src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:96— AndroidStorageProvider.TryGetFolderFromPathAsync 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.
WindowImpl.ApplyConfigureBatch (cyclomatic 16) src/Avalonia.Wayland/WindowImpl.cs:47— WindowImpl.ApplyConfigureBatch 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.
GlxDisplay.CreateContext (cyclomatic 16) src/Avalonia.X11/Glx/GlxDisplay.cs:122— GlxDisplay.CreateContext 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.
JSONParser.ParseAnonymousValue (cyclomatic 16) REDACTED:272— JSONParser.ParseAnonymousValue 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.
Win32Platform.WndProc (cyclomatic 16) src/Windows/Avalonia.Win32/Win32Platform.cs:143— Win32Platform.WndProc 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.
D10 · Test Quality· Fixed-sleep synchronisation · ×1
Fixed-sleep synchronisation: Designer_In_Win32_Mode_Should_Provide_Valid_Hwnd tests/Avalonia.DesignerSupport.Tests/DesignerSupportTests.cs:29— This test starts a spawned process and then orders itself against it with `Task.Delay(10000)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D17 · Explicit Debt· BareSuppressMessage repeated 10 times in 3 files · ×1
BareSuppressMessage repeated 10 times in 3 files src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin.cs:84— The identical BareSuppressMessage (`UnconditionalSuppressMessage`) appears 10 times in 3 files — one decision applied repeatedly (e.g. the same rule silenced on every overload of a fluent API), not 10 independent debts. Decide it once — at the type or project level, or by fixing the underlying pattern — rather than occurrence-by-occurrence. (Every occurrence still counts toward the score and metrics.)
CoverageExclusion src/Shared/IsExternalInit.cs:10— class IsExternalInit — this shipped code is lifted out of the coverage measurement, so it is not that the code is reported as untested: it is not reported at all. The excluded lines leave the denominator, which means the percentage the team publishes goes UP when code stops being covered, and the gap is invisible in the artefact that would otherwise disclose it. Nothing here is written by a compiler or a build — the attribute is only ever typed by an author — so it is a standing decision, and the only record of it is this line. Test what it covers and delete the attribute; where the code genuinely cannot be exercised (a debugger display, a platform branch this build cannot reach), narrow the exclusion to the smallest declaration that is really untestable rather than the type around it, so members added later are not silently excluded too. If it is correct as it stands, say why — in the attribute's own Justification, or in a comment above it: that is what turns it from unexplained debt into a recorded decision, and it clears this row.
XamlCompilerTaskExecutor.CompileCore (cognitive 185) src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs:104— XamlCompilerTaskExecutor.CompileCore has cognitive complexity 185 (threshold 15). Of this number, 169 points are the body's own statements and 16 belong to 7 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
WindowImpl.AppWndProc (cognitive 176) src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:23— WindowImpl.AppWndProc has cognitive complexity 176 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExpressionVariant.GetProperty (cognitive 152) src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs:53— ExpressionVariant.GetProperty has cognitive complexity 152 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BidiAlgorithm.ProcessIsolatedRunSequence (cognitive 148) src/Avalonia.Base/Media/TextFormatting/Unicode/BiDiAlgorithm.cs:856— BidiAlgorithm.ProcessIsolatedRunSequence has cognitive complexity 148 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Grid.SetFinalSizeMaxDiscrepancy (cognitive 148) src/Avalonia.Controls/Grid.cs:1797— Grid.SetFinalSizeMaxDiscrepancy has cognitive complexity 148 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XamlIlBindingPathHelper.TransformBindingPath (cognitive 139) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlBindingPathHelper.cs:140— XamlIlBindingPathHelper.TransformBindingPath has cognitive complexity 139 (threshold 15). Of this number, 118 points are the body's own statements and 21 belong to 7 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextFormatterImpl.PerformTextWrapping (cognitive 121) src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs:897— TextFormatterImpl.PerformTextWrapping has cognitive complexity 121 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
GetProcAddressInitializationGenerator.Initialize (cognitive 120) src/tools/DevGenerators/GetProcAddressInitialization.cs:20— GetProcAddressInitializationGenerator.Initialize has cognitive complexity 120 (threshold 15). None of this is in the body itself: all 120 points belong to 2 function literals inside it that branch (lines 35, 24). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
TextPathSegmentEllipsis.Collapse (cognitive 119) src/Avalonia.Base/Media/TextPathSegmentEllipsis.cs:43— TextPathSegmentEllipsis.Collapse has cognitive complexity 119 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
AvaloniaXamlIlLanguageParseIntrinsics.TryConvert (cognitive 118) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/AvaloniaXamlIlLanguageParseIntrinsics.cs:19— AvaloniaXamlIlLanguageParseIntrinsics.TryConvert has cognitive complexity 118 (threshold 15). Of this number, 117 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TextBox.OnKeyDown (cognitive 110) src/Avalonia.Controls/TextBox.cs:1408— TextBox.OnKeyDown has cognitive complexity 110 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Grid.ResolveStarMaxDiscrepancy (cognitive 102) src/Avalonia.Controls/Grid.cs:1463— Grid.ResolveStarMaxDiscrepancy has cognitive complexity 102 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
X11Window.OnEvent (cognitive 90) src/Avalonia.X11/X11Window.cs:591— X11Window.OnEvent has cognitive complexity 90 (threshold 15). Of this number, 79 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XI2Manager.OnDeviceEvent (cognitive 89) src/Avalonia.X11/XI2Manager.cs:330— XI2Manager.OnDeviceEvent has cognitive complexity 89 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TextLeadingPrefixCharacterEllipsis.Collapse (cognitive 87) src/Avalonia.Base/Media/TextFormatting/TextLeadingPrefixCharacterEllipsis.cs:51— TextLeadingPrefixCharacterEllipsis.Collapse has cognitive complexity 87 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
FocusManager.GetPreviousTabStop (cognitive 84) src/Avalonia.Base/Input/FocusManager.cs:750— FocusManager.GetPreviousTabStop has cognitive complexity 84 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
AvaloniaXamlIlOptionMarkupExtensionTransformer.Transform (cognitive 84) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlOptionMarkupExtensionTransformer.cs:17— AvaloniaXamlIlOptionMarkupExtensionTransformer.Transform has cognitive complexity 84 (threshold 15). Of this number, 81 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Graph.MeasureChild (cognitive 84) src/Avalonia.Controls/RelativePanel.cs:292— Graph.MeasureChild has cognitive complexity 84 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CrossThreadProxyGenerator.Extract (cognitive 82) src/tools/DevGenerators/CrossThreadProxyGenerator.cs:62— CrossThreadProxyGenerator.Extract has cognitive complexity 82 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
FocusManager.GetNextOrPreviousTabStopInternal (cognitive 80) src/Avalonia.Base/Input/FocusManager.cs:873— FocusManager.GetNextOrPreviousTabStopInternal has cognitive complexity 80 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DrawerPage.UpdateContentSafeAreaPadding (cognitive 74) src/Avalonia.Controls/Page/DrawerPage.cs:878— DrawerPage.UpdateContentSafeAreaPadding has cognitive complexity 74 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
AvaloniaXamlIlBindingPathTransformer.Transform (cognitive 73) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlBindingPathTransformer.cs:13— AvaloniaXamlIlBindingPathTransformer.Transform has cognitive complexity 73 (threshold 15). Of this number, 70 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BidiAlgorithm.ResolveExplicitEmbeddingLevels (cognitive 72) src/Avalonia.Base/Media/TextFormatting/Unicode/BiDiAlgorithm.cs:410— BidiAlgorithm.ResolveExplicitEmbeddingLevels has cognitive complexity 72 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SpanVector.Set (cognitive 69) src/Avalonia.Base/Utilities/Span.cs:213— SpanVector.Set has cognitive complexity 69 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
FocusManager.GetNextTabStop (cognitive 68) src/Avalonia.Base/Input/FocusManager.cs:642— FocusManager.GetNextTabStop has cognitive complexity 68 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TextSelectionHandleCanvas.DragSelectionHandle (cognitive 67) src/Avalonia.Controls/Primitives/TextSelectionCanvas.cs:274— TextSelectionHandleCanvas.DragSelectionHandle has cognitive complexity 67 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
VirtualizingStackPanel.UpdateSpecialElementsOnItemsChanged (cognitive 67) src/Avalonia.Controls/VirtualizingStackPanel.cs:387— VirtualizingStackPanel.UpdateSpecialElementsOnItemsChanged has cognitive complexity 67 (threshold 15). 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.
DBusMenuExporterImpl.GetProperty (cognitive 67) src/Avalonia.FreeDesktop/DBusMenuExporter.cs:223— DBusMenuExporterImpl.GetProperty has cognitive complexity 67 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Calendar.ProcessSelection (cognitive 66) src/Avalonia.Controls/Calendar/Calendar.cs:1616— Calendar.ProcessSelection has cognitive complexity 66 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DialogsPage.DialogsPage.ctor (cognitive 66) samples/ControlCatalog/Pages/DialogsPage.xaml.cs:17— DialogsPage.DialogsPage.ctor has cognitive complexity 66 (threshold 15). Of this number, 38 points are the body's own statements and 28 belong to 7 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VulkanContext.TryCreate (cognitive 66) samples/GpuInterop/VulkanDemo/VulkanContext.cs:37— VulkanContext.TryCreate has cognitive complexity 66 (threshold 15). Of this number, 58 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColorPickerHelpers.CreateComponentBitmapAsync (cognitive 65) src/Avalonia.Controls.ColorPicker/Helpers/ColorPickerHelpers.cs:39— ColorPickerHelpers.CreateComponentBitmapAsync has cognitive complexity 65 (threshold 15). Most of this is not in the body itself: 2 of the 65 points are its own statements and the rest belongs to one function literal inside it that branches (line 55). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
JSONParser.ParseValue (cognitive 62) REDACTED:136— JSONParser.ParseValue has cognitive complexity 62 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
LineBreakEnumerator.LB25 (cognitive 60) src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:949— LineBreakEnumerator.LB25 has cognitive complexity 60 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Grid.MeasureOverride (cognitive 60) src/Avalonia.Controls/Grid.cs:246— Grid.MeasureOverride has cognitive complexity 60 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
GlyphTypeface.GlyphTypeface.ctor (cognitive 59) src/Avalonia.Base/Media/GlyphTypeface.cs:72— GlyphTypeface.GlyphTypeface.ctor has cognitive complexity 59 (threshold 15). Of this number, 57 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CalendarItem.Cell_MouseLeftButtonDown (cognitive 59) src/Avalonia.Controls/Calendar/CalendarItem.cs:977— CalendarItem.Cell_MouseLeftButtonDown has cognitive complexity 59 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CommandBar.UpdateDynamicOverflow (cognitive 58) src/Avalonia.Controls/CommandBar/CommandBar.cs:643— CommandBar.UpdateDynamicOverflow has cognitive complexity 58 (threshold 15). Of this number, 55 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
MultiPage.NotifyCollection_CollectionChanged (cognitive 58) src/Avalonia.Controls/Page/MultiPage.cs:164— MultiPage.NotifyCollection_CollectionChanged has cognitive complexity 58 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ExpressionParser.ParseTillTerminator (cognitive 57) src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionParser.cs:192— ExpressionParser.ParseTillTerminator has cognitive complexity 57 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowImpl.UpdateWindowProperties (cognitive 57) src/Windows/Avalonia.Win32/WindowImpl.cs:1402— WindowImpl.UpdateWindowProperties has cognitive complexity 57 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SimpleGlyph.Create (cognitive 56) src/Avalonia.Base/Media/Fonts/Tables/Glyf/SimpleGlyph.cs:107— SimpleGlyph.Create has cognitive complexity 56 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Grid.EnsureMinSizeInDefinitionRange (cognitive 56) src/Avalonia.Controls/Grid.cs:1244— Grid.EnsureMinSizeInDefinitionRange has cognitive complexity 56 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DrawingContextImpl.ConfigureGradientBrush (cognitive 56) src/Skia/Avalonia.Skia/DrawingContextImpl.cs:934— DrawingContextImpl.ConfigureGradientBrush has cognitive complexity 56 (threshold 15). 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.
GtkSystemDialog.ShowDialog (cognitive 55) src/Avalonia.X11/NativeDialogs/GtkNativeFileDialogs.cs:92— GtkSystemDialog.ShowDialog has cognitive complexity 55 (threshold 15). Of this number, 43 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CalendarDatePicker.OnPropertyChanged (cognitive 54) src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs:209— CalendarDatePicker.OnPropertyChanged has cognitive complexity 54 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TickBar.Render (cognitive 52) src/Avalonia.Controls/TickBar.cs:213— TickBar.Render has cognitive complexity 52 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VirtualizingCarouselPanel.OnSwipeGesture (cognitive 52) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:1059— VirtualizingCarouselPanel.OnSwipeGesture has cognitive complexity 52 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaXamlIlBindingPathParser.ConvertLongFormPropertiesToBindingExpressionNode (cognitive 51) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlBindingPathParser.cs:93— AvaloniaXamlIlBindingPathParser.ConvertLongFormPropertiesToBindingExpressionNode has cognitive complexity 51 (threshold 15). Of this number, 48 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ExpressionVariant.OperatorDeclaration (cognitive 50) src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs:506— ExpressionVariant.OperatorDeclaration has cognitive complexity 50 (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.
TabNavigation.GetPrevTab (cognitive 49) src/Avalonia.Base/Input/Navigation/TabNavigation.cs:89— TabNavigation.GetPrevTab has cognitive complexity 49 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TextEllipsisHelper.Collapse (cognitive 49) src/Avalonia.Base/Media/TextFormatting/TextEllipsisHelper.cs:7— TextEllipsisHelper.Collapse has cognitive complexity 49 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ScrollGestureRecognizer.PointerMoved (cognitive 48) src/Avalonia.Base/Input/GestureRecognizers/ScrollGestureRecognizer.cs:174— ScrollGestureRecognizer.PointerMoved has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PhysicalKeyExtensions.ToQwertyKeySymbol (cognitive 48) src/Avalonia.Base/Input/PhysicalKeyExtensions.cs:207— PhysicalKeyExtensions.ToQwertyKeySymbol has cognitive complexity 48 (threshold 15). 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.
XamlMergeResourceGroupTransformer.Transform (cognitive 48) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/GroupTransformers/XamlMergeResourceGroupTransformer.cs:13— XamlMergeResourceGroupTransformer.Transform has cognitive complexity 48 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaXamlIlDataContextTypeTransformer.Transform (cognitive 48) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlDataContextTypeTransformer.cs:23— AvaloniaXamlIlDataContextTypeTransformer.Transform has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TextFormatterImpl.SplitTextRuns (cognitive 47) src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs:198— TextFormatterImpl.SplitTextRuns has cognitive complexity 47 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaXamlIlSelectorTransformer.Transform (cognitive 47) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSelectorTransformer.cs:27— AvaloniaXamlIlSelectorTransformer.Transform has cognitive complexity 47 (threshold 15). Of this number, 46 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodeBlock.TokenizeXaml (cognitive 47) samples/ControlCatalog/Controls/CodeBlock.cs:288— CodeBlock.TokenizeXaml has cognitive complexity 47 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextCharacters.CreateShapeableRun (cognitive 46) src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs:109— TextCharacters.CreateShapeableRun has cognitive complexity 46 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Visual.SynchronizeCompositionChildVisuals (cognitive 46) src/Avalonia.Base/Visual.Composition.cs:43— Visual.SynchronizeCompositionChildVisuals has cognitive complexity 46 (threshold 15). Of this number, 44 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScrollContentPresenter.OnScrollGesture (cognitive 46) src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs:585— ScrollContentPresenter.OnScrollGesture has cognitive complexity 46 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
KeyboardDevice.ProcessRawEvent (cognitive 45) src/Avalonia.Base/Input/KeyboardDevice.cs:233— KeyboardDevice.ProcessRawEvent has cognitive complexity 45 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
FontCollectionBase.TryAddFontSource (cognitive 44) src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:697— FontCollectionBase.TryAddFontSource has cognitive complexity 44 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaXamlIlTransformInstanceAttachedProperties.Transform (cognitive 44) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlTransformInstanceAttachedProperties.cs:16— AvaloniaXamlIlTransformInstanceAttachedProperties.Transform has cognitive complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DefaultMenuInteractionHandler.KeyDown (cognitive 44) src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs:416— DefaultMenuInteractionHandler.KeyDown has cognitive complexity 44 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VirtualizingStackPanel.OnEffectiveViewportChanged (cognitive 43) src/Avalonia.Controls/VirtualizingStackPanel.cs:1284— VirtualizingStackPanel.OnEffectiveViewportChanged has cognitive complexity 43 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
AvaloniaList.InsertRange (cognitive 42) src/Avalonia.Base/Collections/AvaloniaList.cs:362— AvaloniaList.InsertRange has cognitive complexity 42 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
GraphemeEnumerator.MoveNext (cognitive 42) src/Avalonia.Base/Media/TextFormatting/Unicode/GraphemeEnumerator.cs:38— GraphemeEnumerator.MoveNext has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LineBreakEnumerator.ExecuteRules (cognitive 42) src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:160— LineBreakEnumerator.ExecuteRules has cognitive complexity 42 (threshold 15). 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.
DrawerPage.OnSwipeGesture (cognitive 42) src/Avalonia.Controls/Page/DrawerPage.cs:803— DrawerPage.OnSwipeGesture has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DrawingContextImpl.DrawRectangle (cognitive 42) src/Skia/Avalonia.Skia/DrawingContextImpl.cs:416— DrawingContextImpl.DrawRectangle has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FormattedText.CombineGeometryRecursive (cognitive 41) src/Avalonia.Base/Media/FormattedText.cs:1501— FormattedText.CombineGeometryRecursive has cognitive complexity 41 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
GlyphTypeface.TryGetGlyphMetrics (cognitive 41) src/Avalonia.Base/Media/GlyphTypeface.cs:833— GlyphTypeface.TryGetGlyphMetrics has cognitive complexity 41 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextLayout.CreateTextLines (cognitive 41) src/Avalonia.Base/Media/TextFormatting/TextLayout.cs:565— TextLayout.CreateTextLines has cognitive complexity 41 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransformOperation.TryInterpolate (cognitive 41) src/Avalonia.Base/Media/Transformation/TransformOperation.cs:81— TransformOperation.TryInterpolate has cognitive complexity 41 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransformParser.ParseFunction (cognitive 41) src/Avalonia.Base/Media/Transformation/TransformParser.cs:88— TransformParser.ParseFunction has cognitive complexity 41 (threshold 15). Of this number, 27 points are the body's own statements and 14 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColorPickerHelpers.FindNextNamedColor (cognitive 41) src/Avalonia.Controls.ColorPicker/Helpers/ColorPickerHelpers.cs:409— ColorPickerHelpers.FindNextNamedColor has cognitive complexity 41 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectionModel.CommitOperation (cognitive 41) src/Avalonia.Controls/Selection/SelectionModel.cs:658— SelectionModel.CommitOperation has cognitive complexity 41 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextBox.OnPointerMoved (cognitive 41) src/Avalonia.Controls/TextBox.cs:1962— TextBox.OnPointerMoved has cognitive complexity 41 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
VirtualizingSnapPointsList.this[].get (cognitive 41) src/Avalonia.Controls/Utils/VirtualizingSnapPointsList.cs:39— VirtualizingSnapPointsList.this[].get has cognitive complexity 41 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FontCollectionBase.TryFindWeightFallback (cognitive 40) src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:1191— FontCollectionBase.TryFindWeightFallback has cognitive complexity 40 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextLineImpl.GetCharacterHitFromDistance (cognitive 40) src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:234— TextLineImpl.GetCharacterHitFromDistance has cognitive complexity 40 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColorSpectrum.OnPropertyChanged (cognitive 40) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:402— ColorSpectrum.OnPropertyChanged has cognitive complexity 40 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConnectedAnimation.RunAnimationCoreAsync (cognitive 40) src/Avalonia.Controls/Animation/ConnectedAnimation.cs:256— ConnectedAnimation.RunAnimationCoreAsync has cognitive complexity 40 (threshold 15). Of this number, 22 points are the body's own statements and 18 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DrawerPage.OnPropertyChanged (cognitive 40) src/Avalonia.Controls/Page/DrawerPage.cs:619— DrawerPage.OnPropertyChanged has cognitive complexity 40 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
NavigationPage.PopModalAsync (cognitive 40) src/Avalonia.Controls/Page/NavigationPage.cs:1347— NavigationPage.PopModalAsync has cognitive complexity 40 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TabControl.UpdateSelectedContent (cognitive 40) src/Avalonia.Controls/TabControl.cs:248— TabControl.UpdateSelectedContent has cognitive complexity 40 (threshold 15). Most of this is not in the body itself: 11 of the 40 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 291, 332, 326). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Win32Icon.LoadIconFromData (cognitive 40) src/Windows/Avalonia.Win32/Interop/Win32Icon.cs:183— Win32Icon.LoadIconFromData has cognitive complexity 40 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FocusManager.GetFirstFocusableElementInternal (cognitive 39) src/Avalonia.Base/Input/FocusManager.cs:446— FocusManager.GetFirstFocusableElementInternal has cognitive complexity 39 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: one other method here (FocusManager.GetLastFocusableElementInternal) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
FocusManager.GetLastFocusableElementInternal (cognitive 39) src/Avalonia.Base/Input/FocusManager.cs:502— FocusManager.GetLastFocusableElementInternal has cognitive complexity 39 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: one other method here (FocusManager.GetFirstFocusableElementInternal) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
FontManager.TryMatchCharacter (cognitive 39) src/Avalonia.Base/Media/FontManager.cs:302— FontManager.TryMatchCharacter has cognitive complexity 39 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
UnicodeTrieBuilder.FindHighStart (cognitive 39) src/Avalonia.Base/Media/TextFormatting/Unicode/UnicodeTrieBuilder.cs:579— UnicodeTrieBuilder.FindHighStart has cognitive complexity 39 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WordBreakEnumerator.IsBoundary (cognitive 39) src/Avalonia.Base/Media/TextFormatting/Unicode/WordBreakEnumerator.cs:76— WordBreakEnumerator.IsBoundary has cognitive complexity 39 (threshold 15). 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.
TableViewLayoutHelper.UpdateActualWidths (cognitive 39) src/Avalonia.Controls/Presenters/TableViewLayoutHelper.cs:14— TableViewLayoutHelper.UpdateActualWidths has cognitive complexity 39 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WrapPanel.ArrangeOverride (cognitive 39) src/Avalonia.Controls/WrapPanel.cs:284— WrapPanel.ArrangeOverride has cognitive complexity 39 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Layoutable.MeasureCore (cognitive 38) src/Avalonia.Base/Layout/Layoutable.cs:544— Layoutable.MeasureCore has cognitive complexity 38 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CalendarItem.Cell_MouseLeftButtonUp (cognitive 38) src/Avalonia.Controls/Calendar/CalendarItem.cs:1103— CalendarItem.Cell_MouseLeftButtonUp has cognitive complexity 38 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ManagedPopupPositioner.Calculate (cognitive 38) src/Avalonia.Controls/Primitives/PopupPositioning/ManagedPopupPositioner.cs:104— ManagedPopupPositioner.Calculate has cognitive complexity 38 (threshold 15). Of this number, 37 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InteractiveLineControl.Render (cognitive 38) samples/TextTestApp/InteractiveLineControl.cs:474— InteractiveLineControl.Render has cognitive complexity 38 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaNameIncrementalGenerator.Initialize (cognitive 38) src/tools/Avalonia.Generators/NameGenerator/AvaloniaNameIncrementalGenerator.cs:21— AvaloniaNameIncrementalGenerator.Initialize has cognitive complexity 38 (threshold 15). None of this is in the body itself: all 38 points belong to 4 function literals inside it that branch (lines 136, 69, 31, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
FontManager.TryGetGlyphTypeface (cognitive 37) src/Avalonia.Base/Media/FontManager.cs:129— FontManager.TryGetGlyphTypeface has cognitive complexity 37 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
GlyphRun.FindNearestCharacterHit (cognitive 37) src/Avalonia.Base/Media/GlyphRun.cs:571— GlyphRun.FindNearestCharacterHit has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaExtensions.CalculateScaling (cognitive 37) src/Avalonia.Base/Media/MediaExtensions.cs:19— MediaExtensions.CalculateScaling has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextLineImpl.CreateLineMetrics (cognitive 37) src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:1340— TextLineImpl.CreateLineMetrics has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectorGrammar.ParseNthChildArguments (cognitive 37) src/Markup/Avalonia.Markup/Markup/Parsers/SelectorGrammar.cs:396— SelectorGrammar.ParseNthChildArguments has cognitive complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ScrollContentPresenter.SnapOffset (cognitive 37) src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs:1029— ScrollContentPresenter.SnapOffset has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextLineImpl.GetTextBounds (cognitive 36) src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:671— TextLineImpl.GetTextBounds has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextLineImpl.GetRunAtCharacterIndex (cognitive 36) src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:1256— TextLineImpl.GetRunAtCharacterIndex has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaXamlIlSetterTransformer.Transform (cognitive 36) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSetterTransformer.cs:23— AvaloniaXamlIlSetterTransformer.Transform has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerCompositionTarget.Render (cognitive 35) src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionTarget.cs:141— ServerCompositionTarget.Render has cognitive complexity 35 (threshold 15). 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.
Calendar.UnHighlightDays (cognitive 35) src/Avalonia.Controls/Calendar/Calendar.cs:1273— Calendar.UnHighlightDays has cognitive complexity 35 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
RadioButtonGroupManager.OnCheckedChanged (cognitive 35) src/Avalonia.Controls/RadioButtonGroupManager.cs:88— RadioButtonGroupManager.OnCheckedChanged has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GraphNode.GetBoundingSize (cognitive 35) src/Avalonia.Controls/RelativePanel.cs:158— GraphNode.GetBoundingSize has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectorParser.Create (cognitive 35) src/Markup/Avalonia.Markup/Markup/Parsers/SelectorParser.cs:43— SelectorParser.Create has cognitive complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Animatable.OnPropertyChangedCore (cognitive 34) src/Avalonia.Base/Animation/Animatable.cs:105— Animatable.OnPropertyChangedCore has cognitive complexity 34 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
FontCollectionBase.TryGetGlyphTypeface (cognitive 34) src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:855— FontCollectionBase.TryGetGlyphTypeface has cognitive complexity 34 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ExpressionVariant.OperatorDeclaration (cognitive 34) src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs:591— ExpressionVariant.OperatorDeclaration has cognitive complexity 34 (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.
CalendarItem.SetCalendarDayButtons (cognitive 34) src/Avalonia.Controls/Calendar/CalendarItem.cs:510— CalendarItem.SetCalendarDayButtons has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompileAnalyzer.RegisterInitializer_Invocation (cognitive 34) src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs:294— CompileAnalyzer.RegisterInitializer_Invocation has cognitive complexity 34 (threshold 15). Of this number, 28 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaXamlIlBindingPathParser.Transform (cognitive 33) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlBindingPathParser.cs:17— AvaloniaXamlIlBindingPathParser.Transform has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Calendar.ProcessTapRangeSelection (cognitive 33) src/Avalonia.Controls/Calendar/Calendar.cs:1534— Calendar.ProcessTapRangeSelection has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexPanel.ArrangeOverride (cognitive 33) src/Avalonia.Controls/FlexPanel/FlexPanel.cs:287— FlexPanel.ArrangeOverride has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VirtualizingStackPanel.ArrangeOverride (cognitive 33) src/Avalonia.Controls/VirtualizingStackPanel.cs:242— VirtualizingStackPanel.ArrangeOverride has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AndroidDragDrop.OnDrag (cognitive 33) src/Android/Avalonia.Android/Platform/AndroidDragDrop.cs:40— AndroidDragDrop.OnDrag has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompileAnalyzer.RegisterAvaloniaPropertySymbols (cognitive 33) src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs:115— CompileAnalyzer.RegisterAvaloniaPropertySymbols has cognitive complexity 33 (threshold 15). Most of this is not in the body itself: 4 of the 33 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 147, 239, 189, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AngleWin32EglDisplay.CreateD3D11Display (cognitive 33) src/Windows/Avalonia.Win32/OpenGl/Angle/AngleWin32EglDisplay.cs:53— AngleWin32EglDisplay.CreateD3D11Display has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
FocusManager.CanProcessTabStop (cognitive 32) src/Avalonia.Base/Input/FocusManager.cs:989— FocusManager.CanProcessTabStop has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
UnicodeTrieBuilder.SetRange (cognitive 32) src/Avalonia.Base/Media/TextFormatting/Unicode/UnicodeTrieBuilder.cs:170— UnicodeTrieBuilder.SetRange has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColorSpectrum.UpdateEllipse (cognitive 32) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:804— ColorSpectrum.UpdateEllipse has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Button.OnPropertyChanged (cognitive 32) src/Avalonia.Controls/Button.cs:483— Button.OnPropertyChanged has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LayoutTransformControl.ComputeLargestTransformedSize (cognitive 32) src/Avalonia.Controls/LayoutTransformControl.cs:299— LayoutTransformControl.ComputeLargestTransformedSize has cognitive complexity 32 (threshold 15). 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.
AdornerHelper.CalculateAdornerClip (cognitive 32) src/Avalonia.Controls/Primitives/AdornerHelper.cs:119— AdornerHelper.CalculateAdornerClip has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Generator.GenerateClass (cognitive 32) src/tools/DevGenerators/CompositionGenerator/Generator.cs:48— Generator.GenerateClass has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SbomGenerator.AddPackageContentComponents (cognitive 31) nukebuild/SbomGenerator.cs:551— SbomGenerator.AddPackageContentComponents has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Effect.Parse (cognitive 31) src/Avalonia.Base/Media/Effects/Effect.cs:44— Effect.Parse has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
UnicodeTrieBuilder.CompactData (cognitive 31) src/Avalonia.Base/Media/TextFormatting/Unicode/UnicodeTrieBuilder.cs:696— UnicodeTrieBuilder.CompactData has cognitive complexity 31 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CDirtyRegion2.GetUninflatedDirtyRegions (cognitive 31) src/Avalonia.Base/Rendering/Composition/Server/DirtyRects/MultiDirtyRectTracker.CDirtyRegion.cs:255— CDirtyRegion2.GetUninflatedDirtyRegions has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SixItemList.IndexOf (cognitive 31) src/Avalonia.Base/Utilities/FrugalList.cs:775— SixItemList.IndexOf has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PropertyParser.Parse (cognitive 31) src/Markup/Avalonia.Markup.Xaml/Parsers/PropertyParser.cs:15— PropertyParser.Parse has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColorPickerHelpers.IncrementColorComponent (cognitive 31) src/Avalonia.Controls.ColorPicker/Helpers/ColorPickerHelpers.cs:323— ColorPickerHelpers.IncrementColorComponent has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CalendarItem.SetButtonState (cognitive 31) src/Avalonia.Controls/Calendar/CalendarItem.cs:442— CalendarItem.SetButtonState has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
MaskedTextBox.OnKeyDown (cognitive 31) src/Avalonia.Controls/MaskedTextBox.cs:199— MaskedTextBox.OnKeyDown has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MaskedTextBox.OnPropertyChanged (cognitive 31) src/Avalonia.Controls/MaskedTextBox.cs:300— MaskedTextBox.OnPropertyChanged has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextSelectionHandleCanvas.ShowFlyout (cognitive 31) src/Avalonia.Controls/Primitives/TextSelectionCanvas.cs:538— TextSelectionHandleCanvas.ShowFlyout has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
RefreshVisualizer.InteractionRatioObserver (cognitive 31) src/Avalonia.Controls/PullToRefresh/RefreshVisualizer.cs:467— RefreshVisualizer.InteractionRatioObserver has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SelectableTextBlock.OnPointerPressed (cognitive 31) src/Avalonia.Controls/SelectableTextBlock.cs:377— SelectableTextBlock.OnPointerPressed has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
EnumMemberDictionaryGenerator.Initialize (cognitive 31) src/tools/DevGenerators/EnumMemberDictionaryGenerator.cs:17— EnumMemberDictionaryGenerator.Initialize has cognitive complexity 31 (threshold 15). None of this is in the body itself: all 31 points belong to 3 function literals inside it that branch (lines 33, 21, 29). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
WindowImpl.CustomCaptionProc (cognitive 31) src/Windows/Avalonia.Win32/WindowImpl.CustomCaptionProc.cs:91— WindowImpl.CustomCaptionProc has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Animation.InterpretKeyframes (cognitive 30) src/Avalonia.Base/Animation/Animation.cs:218— Animation.InterpretKeyframes has cognitive complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PageSlide.Update (cognitive 30) src/Avalonia.Base/Animation/PageSlide.cs:165— PageSlide.Update has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LeastSquaresSolver.Solve (cognitive 30) src/Avalonia.Base/Input/GestureRecognizers/VelocityTracker.cs:234— LeastSquaresSolver.Solve has cognitive complexity 30 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
GlyphRun.GetDistanceFromCharacterHit (cognitive 30) src/Avalonia.Base/Media/GlyphRun.cs:250— GlyphRun.GetDistanceFromCharacterHit has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextBox.MoveHorizontal (cognitive 30) src/Avalonia.Controls/TextBox.cs:2222— TextBox.MoveHorizontal has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ManagedFileChooserViewModel.Navigate (cognitive 30) src/Avalonia.Dialogs/Internal/ManagedFileChooserViewModel.cs:290— ManagedFileChooserViewModel.Navigate has cognitive complexity 30 (threshold 15). Of this number, 17 points are the body's own statements and 13 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EglDisplayUtils.InitializeAndGetConfig (cognitive 30) src/Avalonia.OpenGL/Egl/EglDisplayUtils.cs:52— EglDisplayUtils.InitializeAndGetConfig has cognitive complexity 30 (threshold 15). Of this number, 19 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WaylandEglDmaBufPlatformGraphics.NegotiateFormats (cognitive 30) src/Avalonia.Wayland/Server/Transient/Rendering/WaylandEglDmaBufPlatformGraphics.cs:151— WaylandEglDmaBufPlatformGraphics.NegotiateFormats has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SynchronousXEventWaiter.WaitForEvent (cognitive 30) src/Avalonia.X11/Selections/DragDrop/SynchronousXEventWaiter.cs:18— SynchronousXEventWaiter.WaitForEvent has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
X11Window.OnPropertyChange (cognitive 30) src/Avalonia.X11/X11Window.cs:908— X11Window.OnPropertyChange has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
UnicodeDataGenerator.GenerateScriptExtensionsDataFile (cognitive 30) src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:251— UnicodeDataGenerator.GenerateScriptExtensionsDataFile has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RefAssemblyGenerator.ProcessType (cognitive 29) nukebuild/RefAssemblyGenerator.cs:71— RefAssemblyGenerator.ProcessType has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InlineDictionary.SetCore (cognitive 29) src/Avalonia.Base/Utilities/SmallDictionary.cs:29— InlineDictionary.SetCore has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Calendar.OnSelectedDateChanged (cognitive 29) src/Avalonia.Controls/Calendar/Calendar.cs:602— Calendar.OnSelectedDateChanged has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TreeView.SelectedItemsCollectionChanged (cognitive 29) src/Avalonia.Controls/TreeView.cs:371— TreeView.SelectedItemsCollectionChanged has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlxDisplay.GlxDisplay.ctor (cognitive 29) src/Avalonia.X11/Glx/GlxDisplay.cs:23— GlxDisplay.GlxDisplay.ctor has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodeBlock.TokenizeCSharp (cognitive 29) samples/ControlCatalog/Controls/CodeBlock.cs:389— CodeBlock.TokenizeCSharp has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OleDataObjectHelper.ReadDataFromHGlobal (cognitive 29) src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:176— OleDataObjectHelper.ReadDataFromHGlobal has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pointer.CaptureCore (cognitive 28) src/Avalonia.Base/Input/Pointer.cs:83— Pointer.CaptureCore has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LineEnumerator.MoveNext (cognitive 28) src/Avalonia.Base/Media/FormattedText.cs:791— LineEnumerator.MoveNext has cognitive complexity 28 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ConnectedAnimation.RunFallbackAnimationAsync (cognitive 28) src/Avalonia.Controls/Animation/ConnectedAnimation.cs:535— ConnectedAnimation.RunFallbackAnimationAsync has cognitive complexity 28 (threshold 15). Of this number, 17 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CalendarItem.PopulateGrids (cognitive 28) src/Avalonia.Controls/Calendar/CalendarItem.cs:173— CalendarItem.PopulateGrids has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectedDatesCollection.InsertItem (cognitive 28) src/Avalonia.Controls/Calendar/SelectedDatesCollection.cs:170— SelectedDatesCollection.InsertItem has cognitive complexity 28 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
NativeControlHost.UpdateHost (cognitive 28) src/Avalonia.Controls/NativeControlHost.cs:84— NativeControlHost.UpdateHost has cognitive complexity 28 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TextSelectionHandleCanvas.MoveHandlesToSelection (cognitive 28) src/Avalonia.Controls/Primitives/TextSelectionCanvas.cs:372— TextSelectionHandleCanvas.MoveHandlesToSelection has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaX11Platform.GetWindowsZOrder (cognitive 28) src/Avalonia.X11/X11Platform.cs:301— AvaloniaX11Platform.GetWindowsZOrder has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BidiAlgorithm.LocatePairedBrackets (cognitive 27) src/Avalonia.Base/Media/TextFormatting/Unicode/BiDiAlgorithm.cs:1265— BidiAlgorithm.LocatePairedBrackets has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Dispatcher.ExecuteJobsCore (cognitive 27) src/Avalonia.Base/Threading/Dispatcher.Queue.cs:159— Dispatcher.ExecuteJobsCore has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeUtilities.TryConvert (cognitive 27) src/Avalonia.Base/Utilities/TypeUtilities.cs:129— TypeUtilities.TryConvert has cognitive complexity 27 (threshold 15). 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.
AutoCompleteBox.UpdateTextCompletion (cognitive 27) src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.cs:1553— AutoCompleteBox.UpdateTextCompletion has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
NumericUpDown.ConvertTextToValueCore (cognitive 27) src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs:1154— NumericUpDown.ConvertTextToValueCore has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TabbedPage.OnKeyDown (cognitive 27) src/Avalonia.Controls/Page/TabbedPage.cs:701— TabbedPage.OnKeyDown has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RefreshContainer.OnPropertyChanged (cognitive 27) src/Avalonia.Controls/PullToRefresh/RefreshContainer.cs:166— RefreshContainer.OnPropertyChanged has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
StackPanel.GetControlInDirection (cognitive 27) src/Avalonia.Controls/StackPanel.cs:180— StackPanel.GetControlInDirection has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
X11Window.X11Window.ctor (cognitive 27) src/Avalonia.X11/X11Window.cs:96— X11Window.X11Window.ctor has cognitive complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
OleDataObjectHelper.WriteDataToGdi (cognitive 27) src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:519— OleDataObjectHelper.WriteDataToGdi has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResourceDictionary.TryGetResource (cognitive 26) src/Avalonia.Base/Controls/ResourceDictionary.cs:188— ResourceDictionary.TryGetResource has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SwipeGestureRecognizer.PointerMoved (cognitive 26) src/Avalonia.Base/Input/GestureRecognizers/SwipeGestureRecognizer.cs:129— SwipeGestureRecognizer.PointerMoved has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TouchDevice.ProcessRawEvent (cognitive 26) src/Avalonia.Base/Input/TouchDevice.cs:38— TouchDevice.ProcessRawEvent has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TextLineImpl.GetPreviousCharacterHit (cognitive 26) src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:866— TextLineImpl.GetPreviousCharacterHit has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValueStore.ReevaluateEffectiveValues (cognitive 26) src/Avalonia.Base/PropertyStore/ValueStore.cs:1112— ValueStore.ReevaluateEffectiveValues has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaXamlIlQueryTransformer.Transform (cognitive 26) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:21— AvaloniaXamlIlQueryTransformer.Transform has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandBar.OnPropertyChanged (cognitive 26) src/Avalonia.Controls/CommandBar/CommandBar.cs:407— CommandBar.OnPropertyChanged has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Popup.Open (cognitive 26) src/Avalonia.Controls/Primitives/Popup.cs:429— Popup.Open has cognitive complexity 26 (threshold 15). 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.
SelectingItemsControl.EndUpdating (cognitive 26) src/Avalonia.Controls/Primitives/SelectingItemsControl.cs:1505— SelectingItemsControl.EndUpdating has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Slider.MoveToNextTick (cognitive 26) src/Avalonia.Controls/Slider.cs:288— Slider.MoveToNextTick has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolTipService.InputManager_OnProcess (cognitive 26) src/Avalonia.Controls/ToolTipService.cs:38— ToolTipService.InputManager_OnProcess has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VirtualizingCarouselPanel.OnViewportFractionSwipeGesture (cognitive 26) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:1192— VirtualizingCarouselPanel.OnViewportFractionSwipeGesture has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AndroidStorageProvider.TryGetFolderFromPathAsync (cognitive 26) src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:96— AndroidStorageProvider.TryGetFolderFromPathAsync has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
FluidNavBar.OnAnimTick (cognitive 26) samples/ControlCatalog/Pages/TabbedPage/FluidNavBar/FluidNavBar.cs:305— FluidNavBar.OnAnimTick has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SegmentationTrieGenerator.Execute (cognitive 26) src/tools/Avalonia.UnicodeTrieGenerator/SegmentationTrieGenerator.cs:33— SegmentationTrieGenerator.Execute has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowImpl.CreateLazyIntermediatePoints (cognitive 26) src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:1069— WindowImpl.CreateLazyIntermediatePoints has cognitive complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to one function literal inside it that branches (line 1074). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
CaretHelper.getCaretCoordinates (cognitive 26) src/Browser/Avalonia.Browser/webapp/modules/avalonia/caretHelper.ts:3— CaretHelper.getCaretCoordinates has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 2, ternaries 1 (nesting depth added 5). Of this number, 15 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
Gestures.PointerPressed (cognitive 25) src/Avalonia.Base/Input/Gestures.cs:47— Gestures.PointerPressed has cognitive complexity 25 (threshold 15). Of this number, 19 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TabNavigation.GetNextTab (cognitive 25) src/Avalonia.Base/Input/Navigation/TabNavigation.cs:17— TabNavigation.GetNextTab has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
GlyphRun.FindGlyphIndex (cognitive 25) src/Avalonia.Base/Media/GlyphRun.cs:482— GlyphRun.FindGlyphIndex has cognitive complexity 25 (threshold 15). 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.
TextLayout.HitTestTextRange (cognitive 25) src/Avalonia.Base/Media/TextFormatting/TextLayout.cs:358— TextLayout.HitTestTextRange has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValueStore.SetInheritanceParent (cognitive 25) src/Avalonia.Base/PropertyStore/ValueStore.cs:437— ValueStore.SetInheritanceParent has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RenderContext.PostSubgraph (cognitive 25) src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual/ServerCompositionVisual.Render.cs:170— RenderContext.PostSubgraph has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StringSplitter.SplitRespectingBrackets (cognitive 25) src/Avalonia.Base/Utilities/StringSplitter.cs:39— StringSplitter.SplitRespectingBrackets has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ComInteropHelper.PatchMethod (cognitive 25) src/Avalonia.Build.Tasks/ComInteropHelper.cs:57— ComInteropHelper.PatchMethod has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
X11Info.X11Info.ctor (cognitive 25) src/Avalonia.X11/X11Info.cs:48— X11Info.X11Info.ctor has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Program.Main (cognitive 25) samples/ControlCatalog.Desktop/Program.cs:24— Program.Main has cognitive complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindingExpression.OnNodeValueChanged (cognitive 24) src/Avalonia.Base/Data/Core/BindingExpression.cs:193— BindingExpression.OnNodeValueChanged has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TabNavigation.GetFirstChild (cognitive 24) src/Avalonia.Base/Input/Navigation/TabNavigation.cs:218— TabNavigation.GetFirstChild has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: one other method here (TabNavigation.GetLastChild) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
TabNavigation.GetLastChild (cognitive 24) src/Avalonia.Base/Input/Navigation/TabNavigation.cs:252— TabNavigation.GetLastChild has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: one other method here (TabNavigation.GetFirstChild) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
FormattedText.BuildHighlightGeometry (cognitive 24) src/Avalonia.Base/Media/FormattedText.cs:1399— FormattedText.BuildHighlightGeometry has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlyphRun.GetCharacterHitFromDistance (cognitive 24) src/Avalonia.Base/Media/GlyphRun.cs:345— GlyphRun.GetCharacterHitFromDistance has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShapedBuffer.EnsureClusterCache (cognitive 24) src/Avalonia.Base/Media/TextFormatting/ShapedBuffer.cs:377— ShapedBuffer.EnsureClusterCache has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextCharacters.TryGetShapeableLength (cognitive 24) src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs:294— TextCharacters.TryGetShapeableLength has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValueStore.ReevaluateEffectiveValue (cognitive 24) src/Avalonia.Base/PropertyStore/ValueStore.cs:1019— ValueStore.ReevaluateEffectiveValue has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AddNameScopeRegistration.Transform (cognitive 24) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AddNameScopeRegistration.cs:14— AddNameScopeRegistration.Transform has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
AvaloniaXamlResourceTransformer.Transform (cognitive 24) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlResourceTransformer.cs:27— AvaloniaXamlResourceTransformer.Transform has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
AvaloniaXamlIlTransformRoutedEvent.Transform (cognitive 24) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlTransformRoutedEvent.cs:13— AvaloniaXamlIlTransformRoutedEvent.Transform has cognitive complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ColorSpectrum.OnKeyDown (cognitive 24) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:228— ColorSpectrum.OnKeyDown has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Calendar.HighlightDays (cognitive 24) src/Avalonia.Controls/Calendar/Calendar.cs:1233— Calendar.HighlightDays has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TextPresenter.GetNextCharacterHit (cognitive 24) src/Avalonia.Controls/Presenters/TextPresenter.cs:860— TextPresenter.GetNextCharacterHit has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectingItemsControl.UpdateSelection (cognitive 24) src/Avalonia.Controls/Primitives/SelectingItemsControl.cs:793— SelectingItemsControl.UpdateSelection has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextBox.OnPointerPressed (cognitive 24) src/Avalonia.Controls/TextBox.cs:1839— TextBox.OnPointerPressed has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
AvaloniaAccessHelper.GetOrCreateNodeInfoProvidersFromPeer (cognitive 24) src/Android/Avalonia.Android/AvaloniaAccessHelper.cs:90— AvaloniaAccessHelper.GetOrCreateNodeInfoProvidersFromPeer has cognitive complexity 24 (threshold 15). Of this number, 19 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AndroidStorageFolder.GetItemAsync (cognitive 24) src/Android/Avalonia.Android/Platform/Storage/AndroidStorageItem.cs:385— AndroidStorageFolder.GetItemAsync has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InputHandler.Handle (cognitive 24) src/iOS/Avalonia.iOS/InputHandler.cs:50— InputHandler.Handle has cognitive complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RenderTarget.EnsureSwapchain (cognitive 24) src/Avalonia.Wayland/Server/Transient/Rendering/WaylandEglDmaBufSurface.cs:113— RenderTarget.EnsureSwapchain has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaXamlIlRuntimeCompiler.FindAssembliesGrantingInternalAccess (cognitive 24) src/Markup/Avalonia.Markup.Xaml.Loader/AvaloniaXamlIlRuntimeCompiler.cs:140— AvaloniaXamlIlRuntimeCompiler.FindAssembliesGrantingInternalAccess has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaNativeMenuExporter.DoLayoutReset (cognitive 24) src/Avalonia.Native/AvaloniaNativeMenuExporter.cs:206— AvaloniaNativeMenuExporter.DoLayoutReset has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MainWindow.OnHitsSelectionChanged (cognitive 24) samples/TextTestApp/MainWindow.axaml.cs:265— MainWindow.OnHitsSelectionChanged has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SafeArrayRef.ToArray (cognitive 24) src/Windows/Avalonia.Win32.Automation/Marshalling/SafeArrayRef.cs:99— SafeArrayRef.ToArray has cognitive complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 103). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
OleDataObjectHelper.WriteDataToHGlobal (cognitive 24) src/Windows/Avalonia.Win32/OleDataObjectHelper.cs:351— OleDataObjectHelper.WriteDataToHGlobal has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Win32StorageProvider.ShowFilePickerAsync (cognitive 24) src/Windows/Avalonia.Win32/Win32StorageProvider.cs:95— Win32StorageProvider.ShowFilePickerAsync has cognitive complexity 24 (threshold 15). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 115). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Rotate3DTransition.Update (cognitive 23) src/Avalonia.Base/Animation/Transitions/Rotate3DTransition.cs:125— Rotate3DTransition.Update has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LayoutManager.ExecuteLayoutPass (cognitive 23) src/Avalonia.Base/Layout/LayoutManager.cs:117— LayoutManager.ExecuteLayoutPass has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FontFamily.GetFontSourceIdentifier (cognitive 23) src/Avalonia.Base/Media/FontFamily.cs:130— FontFamily.GetFontSourceIdentifier has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
GeometryBuilder.CalculateRoundedCornersRectangleWinUI (cognitive 23) src/Avalonia.Base/Media/GeometryBuilder.cs:206— GeometryBuilder.CalculateRoundedCornersRectangleWinUI has cognitive complexity 23 (threshold 15). 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.
CompositionTarget.HitTestFirstCore (cognitive 23) src/Avalonia.Base/Rendering/Composition/CompositionTarget.cs:196— CompositionTarget.HitTestFirstCore has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SelectedDatesCollection.AddRange (cognitive 23) src/Avalonia.Controls/Calendar/SelectedDatesCollection.cs:60— SelectedDatesCollection.AddRange has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ComboBox.OnKeyDown (cognitive 23) src/Avalonia.Controls/ComboBox.cs:254— ComboBox.OnKeyDown has cognitive complexity 23 (threshold 15). 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.
TimePicker.SetGrid (cognitive 23) src/Avalonia.Controls/DateTimePickers/TimePicker.cs:271— TimePicker.SetGrid has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Grid.MeasureCellsGroup (cognitive 23) src/Avalonia.Controls/Grid.cs:1009— Grid.MeasureCellsGroup has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NavigationPage.UpdateActivePage (cognitive 23) src/Avalonia.Controls/Page/NavigationPage.cs:1802— NavigationPage.UpdateActivePage has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StackPanel.GetIrregularSnapPoints (cognitive 23) src/Avalonia.Controls/StackPanel.cs:360— StackPanel.GetIrregularSnapPoints has cognitive complexity 23 (threshold 15). 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.
RealizedStackElements.ItemsRemoved (cognitive 23) src/Avalonia.Controls/Utils/RealizedStackElements.cs:193— RealizedStackElements.ItemsRemoved has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ManagedFileChooserViewModel.OnSelectionChangedAsync (cognitive 23) src/Avalonia.Dialogs/Internal/ManagedFileChooserViewModel.cs:206— ManagedFileChooserViewModel.OnSelectionChangedAsync has cognitive complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 214). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
AndroidMotionEventsHelper.DispatchMotionEvent (cognitive 23) src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidMotionEventsHelper.cs:31— AndroidMotionEventsHelper.DispatchMotionEvent has cognitive complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AtSpiNode.ComputeStatesCore (cognitive 23) src/Avalonia.FreeDesktop.AtSpi/AtSpiNode.StateMapping.cs:16— AtSpiNode.ComputeStatesCore has cognitive complexity 23 (threshold 15). 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.
DrmCard.DrmCard.ctor (cognitive 23) src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs:153— DrmCard.DrmCard.ctor has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StaticResourceExtension.ProvideValue (cognitive 23) src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StaticResourceExtension.cs:31— StaticResourceExtension.ProvideValue has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataTransferItemToAvnClipboardDataItemWrapper.GetValue (cognitive 23) src/Avalonia.Native/DataTransferItemToAvnClipboardDataItemWrapper.cs:24— DataTransferItemToAvnClipboardDataItemWrapper.GetValue has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AutoCompleteBoxPage.LastWordContains (cognitive 23) samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml.cs:138— AutoCompleteBoxPage.LastWordContains has cognitive complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CardStackPageTransition.Update (cognitive 23) samples/ControlCatalog/Pages/Transitions/CardStackPageTransition.cs:173— CardStackPageTransition.Update has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompileAnalyzer.AnalyzeMethodInvocation (cognitive 23) src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs:582— CompileAnalyzer.AnalyzeMethodInvocation has cognitive complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
AnimationInstance.Subscribed (cognitive 22) src/Avalonia.Base/Animation/AnimationInstance`1.cs:156— AnimationInstance.Subscribed has cognitive complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 165). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
TransformAnimator.Apply (cognitive 22) src/Avalonia.Base/Animation/Animators/TransformAnimator.cs:17— TransformAnimator.Apply has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KeySpline.SetParameterFromX (cognitive 22) src/Avalonia.Base/Animation/KeySpline.cs:272— KeySpline.SetParameterFromX has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XYFocus.ChooseBestFocusableElementFromList (cognitive 22) src/Avalonia.Base/Input/Navigation/XYFocus.Impl.cs:194— XYFocus.ChooseBestFocusableElementFromList has cognitive complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CmapFormat4Table.GetGlyphs (cognitive 22) src/Avalonia.Base/Media/Fonts/Tables/Cmap/CmapFormat4Table.cs:155— CmapFormat4Table.GetGlyphs has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlyphRun.GetTrailingWhitespaceLength (cognitive 22) src/Avalonia.Base/Media/GlyphRun.cs:764— GlyphRun.GetTrailingWhitespaceLength has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PathMarkupParser.ReadArgument (cognitive 22) src/Avalonia.Base/Media/PathMarkupParser.cs:462— PathMarkupParser.ReadArgument has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextDecoration.Draw (cognitive 22) src/Avalonia.Base/Media/TextDecoration.cs:161— TextDecoration.Draw has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextFormatterImpl.ShapeTextRuns (cognitive 22) src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs:342— TextFormatterImpl.ShapeTextRuns has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValueStore.OnChanged (cognitive 22) src/Avalonia.Base/PropertyStore/ValueStore.cs:805— ValueStore.OnChanged has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DispatcherOperation.Wait (cognitive 22) src/Avalonia.Base/Threading/DispatcherOperation.cs:146— DispatcherOperation.Wait has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
AvaloniaBindingExtensionTransformer.Transform (cognitive 22) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaBindingExtensionTransformer.cs:21— AvaloniaBindingExtensionTransformer.Transform has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ColorSpectrum.UpdateBitmapSources (cognitive 22) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1586— ColorSpectrum.UpdateBitmapSources has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Track.ArrangeOverride (cognitive 22) src/Avalonia.Controls/Primitives/Track.cs:212— Track.ArrangeOverride has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeViewItem.OnKeyDown (cognitive 22) src/Avalonia.Controls/TreeViewItem.cs:220— TreeViewItem.OnKeyDown has cognitive complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 5 function items inside it that branch (FocusAwareCollapseItem, ExpandItem, CollapseItem, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SimpleWebSocketHttpServer.AcceptAsyncImpl (cognitive 22) src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:29— SimpleWebSocketHttpServer.AcceptAsyncImpl has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClipboardImpl.TryAddItemAsync (cognitive 22) src/Browser/Avalonia.Browser/ClipboardImpl.cs:53— ClipboardImpl.TryAddItemAsync has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AtSpiNode.OnPeerPropertyChanged (cognitive 22) src/Avalonia.FreeDesktop.AtSpi/AtSpiNode.cs:456— AtSpiNode.OnPeerPropertyChanged has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AtSpiCollectionHandler.CollectMatchesOrdered (cognitive 22) src/Avalonia.FreeDesktop.AtSpi/Handlers/AtSpiCollectionHandler.cs:94— AtSpiCollectionHandler.CollectMatchesOrdered has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
X11PlatformThreading.RunLoop (cognitive 22) src/Avalonia.X11/Dispatching/X11PlatformThreading.cs:130— X11PlatformThreading.RunLoop has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaX11Platform.InitializeGraphics (cognitive 22) src/Avalonia.X11/X11Platform.cs:231— AvaloniaX11Platform.InitializeGraphics has cognitive complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowImpl.ChromeHitTest (cognitive 22) src/Avalonia.Native/WindowImpl.cs:141— WindowImpl.ChromeHitTest has cognitive complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ComVariant.Create (cognitive 22) src/Windows/Avalonia.Win32.Automation/Marshalling/ComVariant.cs:140— ComVariant.Create has cognitive complexity 22 (threshold 15). 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.
Win32Platform.WndProc (cognitive 22) src/Windows/Avalonia.Win32/Win32Platform.cs:143— Win32Platform.WndProc has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SbomGenerator.GenerateForPackage (cognitive 21) nukebuild/SbomGenerator.cs:77— SbomGenerator.GenerateForPackage has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindingExpression.TryConvertBack (cognitive 21) src/Avalonia.Base/Data/Core/BindingExpression.cs:586— BindingExpression.TryConvertBack has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Bcp47ScriptResolver.GetScriptSubtag (cognitive 21) src/Avalonia.Base/Media/Fonts/Bcp47ScriptResolver.cs:25— Bcp47ScriptResolver.GetScriptSubtag has cognitive complexity 21 (threshold 15). 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.
FontCollectionBase.TryCreateSyntheticGlyphTypeface (cognitive 21) src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:469— FontCollectionBase.TryCreateSyntheticGlyphTypeface has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Dispatcher.PromoteTimers (cognitive 21) src/Avalonia.Base/Threading/Dispatcher.Timers.cs:141— Dispatcher.PromoteTimers has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SixItemList.Remove (cognitive 21) src/Avalonia.Base/Utilities/FrugalList.cs:905— SixItemList.Remove has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SixItemList.ToArray (cognitive 21) src/Avalonia.Base/Utilities/FrugalList.cs:1188— SixItemList.ToArray has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: one other method here (SixItemList.CopyTo) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SixItemList.CopyTo (cognitive 21) src/Avalonia.Base/Utilities/FrugalList.cs:1219— SixItemList.CopyTo has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: one other method here (SixItemList.ToArray) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SpanStringTokenizer.SkipToNextToken (cognitive 21) src/Avalonia.Base/Utilities/SpanStringTokenizer.cs:191— SpanStringTokenizer.SkipToNextToken has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaXamlIncludeTransformer.Transform (cognitive 21) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/GroupTransformers/XamlIncludeGroupTransformer.cs:21— AvaloniaXamlIncludeTransformer.Transform has cognitive complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
AvaloniaXamlIlReorderClassesPropertiesTransformer.Transform (cognitive 21) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlReorderClassesPropertiesTransformer.cs:8— AvaloniaXamlIlReorderClassesPropertiesTransformer.Transform has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Calendar.FindDayButtonFromDay (cognitive 21) src/Avalonia.Controls/Calendar/Calendar.cs:1077— Calendar.FindDayButtonFromDay has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
TimePicker.SetSelectedTimeText (cognitive 21) src/Avalonia.Controls/DateTimePickers/TimePicker.cs:329— TimePicker.SetSelectedTimeText has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
NavigationPage.PushModalAsyncPrivate (cognitive 21) src/Avalonia.Controls/Page/NavigationPage.cs:1212— NavigationPage.PushModalAsyncPrivate has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RefreshContainer.OnPullDirectionChanged (cognitive 21) src/Avalonia.Controls/PullToRefresh/RefreshContainer.cs:220— RefreshContainer.OnPullDirectionChanged has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RefreshVisualizer.UpdateContent (cognitive 21) src/Avalonia.Controls/PullToRefresh/RefreshVisualizer.cs:196— RefreshVisualizer.UpdateContent has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Slider.SnapToTick (cognitive 21) src/Avalonia.Controls/Slider.cs:434— Slider.SnapToTick has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Deserializer.ReadObject (cognitive 21) src/Avalonia.Remote.Protocol/MetsysBson.cs:1180— Deserializer.ReadObject has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KeyInterop.KeyFromDomKey (cognitive 21) src/Browser/Avalonia.Browser/KeyInterop.cs:385— KeyInterop.KeyFromDomKey has cognitive complexity 21 (threshold 15). 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.
DBusTrayIconImpl.CreateTrayIcon (cognitive 21) src/Avalonia.FreeDesktop/DBusTrayIconImpl.cs:145— DBusTrayIconImpl.CreateTrayIcon has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Randr15ScreensImpl.GetRefreshRateForOutput (cognitive 21) src/Avalonia.X11/Screens/X11Screen.Providers.cs:190— Randr15ScreensImpl.GetRefreshRateForOutput has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectionDataProvider.OnSelectionRequest (cognitive 21) src/Avalonia.X11/Selections/SelectionDataProvider.cs:44— SelectionDataProvider.OnSelectionRequest has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaNativeApplicationPlatform.UrlsOpened (cognitive 21) src/Avalonia.Native/AvaloniaNativeApplicationPlatform.cs:40— AvaloniaNativeApplicationPlatform.UrlsOpened has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
VulkanImage.VulkanImage.ctor (cognitive 21) samples/GpuInterop/VulkanDemo/VulkanImage.cs:75— VulkanImage.VulkanImage.ctor has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultConverter.TryConvert (cognitive 20) src/Avalonia.Base/Data/Core/TargetTypeConverter.cs:28— DefaultConverter.TryConvert has cognitive complexity 20 (threshold 15). 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.
Color.TryParseCssFormat (cognitive 20) src/Avalonia.Base/Media/Color.cs:328— Color.TryParseCssFormat has cognitive complexity 20 (threshold 15). 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.
InterWordJustification.CollectBreakOpportunities (cognitive 20) src/Avalonia.Base/Media/TextFormatting/InterWordJustification.cs:143— InterWordJustification.CollectBreakOpportunities has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextFormatterImpl.MeasureLength (cognitive 20) src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs:756— TextFormatterImpl.MeasureLength has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextLineImpl.GetTextRunBoundsRightToLeft (cognitive 20) src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:950— TextLineImpl.GetTextRunBoundsRightToLeft has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (TextLineImpl.GetTextBoundsLeftToRight) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
TextLineImpl.GetTextBoundsLeftToRight (cognitive 20) src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:1030— TextLineImpl.GetTextBoundsLeftToRight has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (TextLineImpl.GetTextRunBoundsRightToLeft) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SentenceBreakEnumerator.IsBoundary (cognitive 20) src/Avalonia.Base/Media/TextFormatting/Unicode/SentenceBreakEnumerator.cs:111— SentenceBreakEnumerator.IsBoundary has cognitive complexity 20 (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.
DelegateExpressionFfi.CallWithCast (cognitive 20) src/Avalonia.Base/Rendering/Composition/Expressions/DelegateExpressionFfi.cs:53— DelegateExpressionFfi.CallWithCast has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TokenParser.TryParseIdentifier (cognitive 20) src/Avalonia.Base/Rendering/Composition/Expressions/TokenParser.cs:120— TokenParser.TryParseIdentifier has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContainerQueryGrammar.ParseFeature (cognitive 20) src/Markup/Avalonia.Markup/Markup/Parsers/ContainerQueryGrammar.cs:67— ContainerQueryGrammar.ParseFeature has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColorPreviewer.ConnectEvents (cognitive 20) src/Avalonia.Controls.ColorPicker/ColorPreviewer/ColorPreviewer.cs:44— ColorPreviewer.ConnectEvents has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColorSpectrum.CreateBitmapsAndColorMap (cognitive 20) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1049— ColorSpectrum.CreateBitmapsAndColorMap has cognitive complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1137, 1181). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AutoCompleteBox.ItemsCollectionChanged (cognitive 20) src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.cs:1448— AutoCompleteBox.ItemsCollectionChanged has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CalendarItem.SetYearButtons (cognitive 20) src/Avalonia.Controls/Calendar/CalendarItem.cs:798— CalendarItem.SetYearButtons has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CalendarDatePicker.SetSelectedDate (cognitive 20) src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs:822— CalendarDatePicker.SetSelectedDate has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Control.OnGotFocus (cognitive 20) src/Avalonia.Controls/Control.cs:392— Control.OnGotFocus has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DatePicker.SetGrid (cognitive 20) src/Avalonia.Controls/DateTimePickers/DatePicker.cs:328— DatePicker.SetGrid has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DateTimePickerPanel.Offset.set (cognitive 20) src/Avalonia.Controls/DateTimePickers/DateTimePickerPanel.cs:220— DateTimePickerPanel.Offset.set has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TimePickerPresenter.SetGrid (cognitive 20) src/Avalonia.Controls/DateTimePickers/TimePickerPresenter.cs:322— TimePickerPresenter.SetGrid has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GridSplitter.SetupDefinitionsToResize (cognitive 20) src/Avalonia.Controls/GridSplitter.cs:249— GridSplitter.SetupDefinitionsToResize has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ItemsControl.PrepareContainerForItemOverride (cognitive 20) src/Avalonia.Controls/ItemsControl.cs:356— ItemsControl.PrepareContainerForItemOverride has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CarouselPage.OnKeyDown (cognitive 20) src/Avalonia.Controls/Page/CarouselPage.cs:249— CarouselPage.OnKeyDown has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultMenuInteractionHandler.PointerEntered (cognitive 20) src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs:105— DefaultMenuInteractionHandler.PointerEntered has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeView.UpdateSelectionFromContainer (cognitive 20) src/Avalonia.Controls/TreeView.cs:758— TreeView.UpdateSelectionFromContainer has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Window.ShowCore (cognitive 20) src/Avalonia.Controls/Window.cs:975— Window.ShowCore has cognitive complexity 20 (threshold 15). 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.
Window.HandleResized (cognitive 20) src/Avalonia.Controls/Window.cs:1464— Window.HandleResized has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HtmlWebSocketTransport.AcceptWorker (cognitive 20) REDACTED:87— HtmlWebSocketTransport.AcceptWorker has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Deserializer.DeserializeValue (cognitive 20) src/Avalonia.Remote.Protocol/MetsysBson.cs:1109— Deserializer.DeserializeValue has cognitive complexity 20 (threshold 15). 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.
TopLevelImpl.SetTransparencyLevelHint (cognitive 20) src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs:282— TopLevelImpl.SetTransparencyLevelHint has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DBusSystemDialog.ShowFilePickerAsync (cognitive 20) src/Avalonia.FreeDesktop/DBusSystemDialog.cs:116— DBusSystemDialog.ShowFilePickerAsync has cognitive complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 148, 174). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
X11Window.Cleanup (cognitive 20) src/Avalonia.X11/X11Window.cs:1185— X11Window.Cleanup has cognitive complexity 20 (threshold 15). 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.
EpollDispatcherImpl.RunLoop (cognitive 20) src/Linux/Avalonia.LinuxFramebuffer/EpollDispatcherImpl.cs:135— EpollDispatcherImpl.RunLoop has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaNativePlatform.DoInitialize (cognitive 20) src/Avalonia.Native/AvaloniaNativePlatform.cs:94— AvaloniaNativePlatform.DoInitialize has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSONParser.ParseAnonymousValue (cognitive 20) REDACTED:272— JSONParser.ParseAnonymousValue has cognitive complexity 20 (threshold 15). 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.
OleDataObjectToDataTransferWrapper.ProvideItems (cognitive 20) src/Windows/Avalonia.Win32/OleDataObjectToDataTransferWrapper.cs:82— OleDataObjectToDataTransferWrapper.ProvideItems has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Win32GlManager.InitializeCore (cognitive 20) src/Windows/Avalonia.Win32/Win32GlManager.cs:34— Win32GlManager.InitializeCore has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowImpl.SetTransparencyLevelHint (cognitive 20) src/Windows/Avalonia.Win32/WindowImpl.cs:380— WindowImpl.SetTransparencyLevelHint has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnimationInstance.InternalStep (cognitive 19) src/Avalonia.Base/Animation/AnimationInstance`1.cs:366— AnimationInstance.InternalStep has cognitive complexity 19 (threshold 15). 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.
XYFocus.FindElements (cognitive 19) src/Avalonia.Base/Input/Navigation/XYFocus.FindElements.cs:11— XYFocus.FindElements has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Layoutable.ArrangeCore (cognitive 19) src/Avalonia.Base/Layout/Layoutable.cs:665— Layoutable.ArrangeCore has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FontCollectionBase.TryMatchCharacter (cognitive 19) src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:59— FontCollectionBase.TryMatchCharacter has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextLineImpl.GetDistanceFromCharacterHit (cognitive 19) src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs:388— TextLineImpl.GetDistanceFromCharacterHit has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Codepoint.ReadAt (cognitive 19) src/Avalonia.Base/Media/TextFormatting/Unicode/Codepoint.cs:257— Codepoint.ReadAt has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. Note what this body is, though: it carries an aggressive-inlining request, so its author has asked in the source for this body to be inlined into every caller. Each part pulled out of it becomes a call the runtime has to decide to inline again, against a size budget — so the split can quietly turn one inlined body into several real calls, on the path the marker exists to protect. The measurement stands — a hot path is not a licence to be unreadable — but the move that pays here is to lift the COLD parts out first (argument validation, fallback and error paths, one-off setup) and leave the kernel whole. Where the kernel itself has to be divided, ask for the extracted parts to be inlined as well, and measure the result rather than assuming the division is free.
KeyFrameAnimationInstance.EvaluateImpl (cognitive 19) src/Avalonia.Base/Rendering/Composition/Animations/KeyFrameAnimationInstance.cs:83— KeyFrameAnimationInstance.EvaluateImpl has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CDirtyRegion2.Add (cognitive 19) src/Avalonia.Base/Rendering/Composition/Server/DirtyRects/MultiDirtyRectTracker.CDirtyRegion.cs:133— CDirtyRegion2.Add has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Dispatcher.RescheduleTimers (cognitive 19) src/Avalonia.Base/Threading/Dispatcher.Timers.cs:38— Dispatcher.RescheduleTimers has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XDataTypeTransformer.Transform (cognitive 19) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/XDataTypeTransformer.cs:19— XDataTypeTransformer.Transform has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Calendar.OnPreviousClick (cognitive 19) src/Avalonia.Controls/Calendar/Calendar.cs:1334— Calendar.OnPreviousClick has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Calendar.OnNextClick) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Calendar.OnNextClick (cognitive 19) src/Avalonia.Controls/Calendar/Calendar.cs:1382— Calendar.OnNextClick has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (Calendar.OnPreviousClick) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SelectedDatesCollection.SetItem (cognitive 19) src/Avalonia.Controls/Calendar/SelectedDatesCollection.cs:284— SelectedDatesCollection.SetItem has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CalendarDatePicker.OnApplyTemplate (cognitive 19) src/Avalonia.Controls/CalendarDatePicker/CalendarDatePicker.cs:108— CalendarDatePicker.OnApplyTemplate has cognitive complexity 19 (threshold 15). 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.
DatePickerPresenter.SetGrid (cognitive 19) src/Avalonia.Controls/DateTimePickers/DatePickerPresenter.cs:453— DatePickerPresenter.SetGrid has cognitive complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Design.CreatePreviewWithControl (cognitive 19) src/Avalonia.Controls/Design.cs:349— Design.CreatePreviewWithControl has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PopupFlyoutBase.HandleTransientDismiss (cognitive 19) src/Avalonia.Controls/Flyouts/PopupFlyoutBase.cs:342— PopupFlyoutBase.HandleTransientDismiss has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NumericUpDown.SyncTextAndValueProperties (cognitive 19) src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs:1089— NumericUpDown.SyncTextAndValueProperties has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScrollViewerIRefreshInfoProviderAdapter.AdaptFromTree (cognitive 19) src/Avalonia.Controls/PullToRefresh/ScrollViewerIRefreshInfoProviderAdapter.cs:31— ScrollViewerIRefreshInfoProviderAdapter.AdaptFromTree has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataTemplateExtensions.FindDataTemplate (cognitive 19) src/Avalonia.Controls/Templates/DataTemplateExtensions.cs:20— DataTemplateExtensions.FindDataTemplate has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextBox.OnPointerReleased (cognitive 19) src/Avalonia.Controls/TextBox.cs:2099— TextBox.OnPointerReleased has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VirtualizingCarouselPanel.OnPropertyChanged (cognitive 19) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:1529— VirtualizingCarouselPanel.OnPropertyChanged has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VirtualizingStackPanel.GetOrEstimateAnchorElementForViewport (cognitive 19) src/Avalonia.Controls/VirtualizingStackPanel.cs:835— VirtualizingStackPanel.GetOrEstimateAnchorElementForViewport has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Window.SetWindowStartupLocation (cognitive 19) src/Avalonia.Controls/Window.cs:1294— Window.SetWindowStartupLocation has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Window.MeasureOverride (cognitive 19) src/Avalonia.Controls/Window.cs:1374— Window.MeasureOverride has cognitive complexity 19 (threshold 15). 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.
DBusTextInputMethodBase.OnOwnerChanged (cognitive 19) src/Avalonia.FreeDesktop/DBusIme/DBusTextInputMethodBase.cs:118— DBusTextInputMethodBase.OnOwnerChanged has cognitive complexity 19 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
X11EventDispatcher.DispatchX11Events (cognitive 19) src/Avalonia.X11/Dispatching/X11EventDispatcher.cs:28— X11EventDispatcher.DispatchX11Events has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlxDisplay.CreateContext (cognitive 19) src/Avalonia.X11/Glx/GlxDisplay.cs:122— GlxDisplay.CreateContext has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColorPaletteResources.TryGetResource (cognitive 19) src/Avalonia.Themes.Fluent2/ColorPaletteResources.cs:48— ColorPaletteResources.TryGetResource has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeneratedPropertyAnalyzer.ReportCommonDefects (cognitive 19) src/tools/Avalonia.Analyzers.CSharp/GeneratedProperties/GeneratedPropertyAnalyzer.cs:165— GeneratedPropertyAnalyzer.ReportCommonDefects has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UnicodeDataGenerator.AssignScriptExtensions (cognitive 19) src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:190— UnicodeDataGenerator.AssignScriptExtensions has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TabNavigation.GetPrevTabWithPrevIndex (cognitive 18) src/Avalonia.Base/Input/Navigation/TabNavigation.cs:517— TabNavigation.GetPrevTabWithPrevIndex has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Color.ToHsv (cognitive 18) src/Avalonia.Base/Media/Color.cs:717— Color.ToHsv has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CmapTable.Load::TryFindFormat12Or13Entry (cognitive 18) src/Avalonia.Base/Media/Fonts/Tables/Cmap/CmapTable.cs:73— CmapTable.Load::TryFindFormat12Or13Entry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HslColor.TryParse (cognitive 18) src/Avalonia.Base/Media/HslColor.cs:328— HslColor.TryParse has cognitive complexity 18 (threshold 15). 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.
HsvColor.TryParse (cognitive 18) src/Avalonia.Base/Media/HsvColor.cs:358— HsvColor.TryParse has cognitive complexity 18 (threshold 15). 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.
EllipticalArc.BuildArc (cognitive 18) src/Avalonia.Base/Media/PreciseEllipticArcHelper.cs:866— EllipticalArc.BuildArc has cognitive complexity 18 (threshold 15). 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.
FormattedTextSource.CreateTextStyleRun (cognitive 18) src/Avalonia.Base/Media/TextFormatting/FormattedTextSource.cs:51— FormattedTextSource.CreateTextStyleRun has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextLayout.GetHitTestResult (cognitive 18) src/Avalonia.Base/Media/TextFormatting/TextLayout.cs:486— TextLayout.GetHitTestResult has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StandardAssetLoader.TryGetAsset (cognitive 18) src/Avalonia.Base/Platform/StandardAssetLoader.cs:170— StandardAssetLoader.TryGetAsset has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TokenParser.TryParseCall (cognitive 18) src/Avalonia.Base/Rendering/Composition/Expressions/TokenParser.cs:181— TokenParser.TryParseCall has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeNameAndClassSelector.Evaluate (cognitive 18) src/Avalonia.Base/Styling/TypeNameAndClassSelector.cs:92— TypeNameAndClassSelector.Evaluate has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XamlIlClrPropertyInfoEmitter.Emit (cognitive 18) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlClrPropertyInfoHelper.cs:135— XamlIlClrPropertyInfoEmitter.Emit has cognitive complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
ColorHelper.ToDisplayName (cognitive 18) src/Avalonia.Controls.ColorPicker/Helpers/ColorHelper.cs:63— ColorHelper.ToDisplayName has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CommandBar.TrimOrphanedSeparatorsFromVisibleCommands (cognitive 18) src/Avalonia.Controls/CommandBar/CommandBar.cs:884— CommandBar.TrimOrphanedSeparatorsFromVisibleCommands has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarginMultiplierConverter.Convert (cognitive 18) src/Avalonia.Controls/Converters/MarginMultiplierConverter.cs:19— MarginMultiplierConverter.Convert has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectableTextBlock.OnPointerMoved (cognitive 18) src/Avalonia.Controls/SelectableTextBlock.cs:458— SelectableTextBlock.OnPointerMoved has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
VirtualizingCarouselPanel.MeasureSinglePageOverride (cognitive 18) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:462— VirtualizingCarouselPanel.MeasureSinglePageOverride has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
VirtualizingStackPanel.GetControl (cognitive 18) src/Avalonia.Controls/VirtualizingStackPanel.cs:541— VirtualizingStackPanel.GetControl has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VirtualizingStackPanel.RealizeElements (cognitive 18) src/Avalonia.Controls/VirtualizingStackPanel.cs:942— VirtualizingStackPanel.RealizeElements has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VirtualizingStackPanel.CalculateExtendedViewport (cognitive 18) src/Avalonia.Controls/VirtualizingStackPanel.cs:1231— VirtualizingStackPanel.CalculateExtendedViewport has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EglExternalObjectsFeature.TryQueryDmaBufFormats (cognitive 18) src/Avalonia.OpenGL/Egl/EglExternalObjectsFeature.Drm.cs:70— EglExternalObjectsFeature.TryQueryDmaBufFormats has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VulkanDevice.Create (cognitive 18) src/Avalonia.Vulkan/Interop/VulkanDevice.Create.cs:11— VulkanDevice.Create has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PasteboardItemToDataTransferItemWrapper.TryGetRawCore (cognitive 18) src/iOS/Avalonia.iOS/Clipboard/PasteboardItemToDataTransferItemWrapper.cs:26— PasteboardItemToDataTransferItemWrapper.TryGetRawCore has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WaylandClipboardImpl.SerializeForMimeAsync (cognitive 18) src/Avalonia.Wayland/Clipboard/WaylandClipboardImpl.cs:72— WaylandClipboardImpl.SerializeForMimeAsync has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SeatListener.Done (cognitive 18) src/Avalonia.Wayland/Server/Transient/WaylandTextInputV3.cs:448— SeatListener.Done has cognitive complexity 18 (threshold 15). 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.
DataFormatHelper.ToDataFormats (cognitive 18) src/Avalonia.X11/Selections/DataFormatHelper.cs:42— DataFormatHelper.ToDataFormats has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FadeThroughTransition.Start (cognitive 18) samples/ControlCatalog/Pages/NavigationPage/Transitions/FadeThroughTransition.cs:30— FadeThroughTransition.Start has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MainWindow.ListBuffer (cognitive 18) samples/TextTestApp/MainWindow.axaml.cs:148— MainWindow.ListBuffer has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DesignXamlLoader.ParseRuntimeDeps (cognitive 18) src/tools/Avalonia.Designer.HostApp/DesignXamlLoader.cs:91— DesignXamlLoader.ParseRuntimeDeps has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SubtypesFactoryGenerator.PopulateMethodTargets (cognitive 18) src/tools/DevGenerators/SubtypesFactoryGenerator.cs:55— SubtypesFactoryGenerator.PopulateMethodTargets has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Imm32InputMethod.HandleComposition (cognitive 18) src/Windows/Avalonia.Win32/Input/Imm32InputMethod.cs:370— Imm32InputMethod.HandleComposition has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowImpl.HitTestNCA (cognitive 18) src/Windows/Avalonia.Win32/WindowImpl.CustomCaptionProc.cs:13— WindowImpl.HitTestNCA has cognitive complexity 18 (threshold 15). 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.
AvaloniaSwapChainPanel.PopulateDataPackageAsync (cognitive 18) src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:859— AvaloniaSwapChainPanel.PopulateDataPackageAsync has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InputHelper.tryGetReadableDataItemValueAsync (cognitive 18) src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:214— InputHelper.tryGetReadableDataItemValueAsync has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 3 (7 pts), match/switch 2 (3 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Animation.Apply (cognitive 17) src/Avalonia.Base/Animation/Animation.cs:303— Animation.Apply has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnimationInstance.ApplyInitialDelay (cognitive 17) src/Avalonia.Base/Animation/AnimationInstance`1.cs:304— AnimationInstance.ApplyInitialDelay has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindingExpressionVisitor.VisitMethodCall (cognitive 17) src/Avalonia.Base/Data/Core/Parsers/BindingExpressionVisitor.cs:120— BindingExpressionVisitor.VisitMethodCall has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TabNavigation.GetNextTabWithNextIndex (cognitive 17) src/Avalonia.Base/Input/Navigation/TabNavigation.cs:437— TabNavigation.GetNextTabWithNextIndex has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XYFocusAlgorithms.CalculatePrimaryAxisDistance (cognitive 17) src/Avalonia.Base/Input/Navigation/XYFocusAlgorithms.cs:285— XYFocusAlgorithms.CalculatePrimaryAxisDistance has cognitive complexity 17 (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.
EventRoute.RaiseEventImpl (cognitive 17) src/Avalonia.Base/Interactivity/EventRoute.cs:121— EventRoute.RaiseEventImpl has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FontFamily.FontFamily.ctor (cognitive 17) src/Avalonia.Base/Media/FontFamily.cs:32— FontFamily.FontFamily.ctor has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FontCollectionBase.TryGetNearestMatchCore (cognitive 17) src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:1000— FontCollectionBase.TryGetNearestMatchCore has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlyfTable.EmitContour (cognitive 17) src/Avalonia.Base/Media/Fonts/Tables/Glyf/GlyfTable.cs:336— GlyfTable.EmitContour has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlyfTable.BuildPointMatchedComposite (cognitive 17) src/Avalonia.Base/Media/Fonts/Tables/Glyf/GlyfTable.cs:569— GlyfTable.BuildPointMatchedComposite has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlyphTypeface.TryGetGlyphMetrics (cognitive 17) src/Avalonia.Base/Media/GlyphTypeface.cs:773— GlyphTypeface.TryGetGlyphMetrics has cognitive complexity 17 (threshold 15). 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.
InterWordJustification.Justify (cognitive 17) src/Avalonia.Base/Media/TextFormatting/InterWordJustification.cs:32— InterWordJustification.Justify has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextFormatterImpl.CoalesceLevels (cognitive 17) src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs:577— TextFormatterImpl.CoalesceLevels has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ManagedDispatcherImpl.RunLoop (cognitive 17) src/Avalonia.Base/Platform/ManagedDispatcherImpl.cs:116— ManagedDispatcherImpl.RunLoop has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DispatcherPriority.ToString (cognitive 17) src/Avalonia.Base/Threading/DispatcherPriority.cs:177— DispatcherPriority.ToString has cognitive complexity 17 (threshold 15). 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.
AutoCompleteBox.OnKeyDown (cognitive 17) src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.cs:687— AutoCompleteBox.OnKeyDown has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AutoCompleteBox.RefreshView (cognitive 17) src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.cs:1331— AutoCompleteBox.RefreshView has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TimePickerPresenter.OnConfirmed (cognitive 17) src/Avalonia.Controls/DateTimePickers/TimePickerPresenter.cs:261— TimePickerPresenter.OnConfirmed has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DockPanel.MeasureOverride (cognitive 17) src/Avalonia.Controls/DockPanel.cs:125— DockPanel.MeasureOverride has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScrollContentPresenter.OnPointerWheelChanged (cognitive 17) src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs:753— ScrollContentPresenter.OnPointerWheelChanged has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectingItemsControl.OnPropertyChanged (cognitive 17) src/Avalonia.Controls/Primitives/SelectingItemsControl.cs:650— SelectingItemsControl.OnPropertyChanged has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextBlock.ArrangeOverride (cognitive 17) src/Avalonia.Controls/TextBlock.cs:858— TextBlock.ArrangeOverride has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WrapPanel.MeasureOverride (cognitive 17) src/Avalonia.Controls/WrapPanel.cs:215— WrapPanel.MeasureOverride has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SimpleWebSocket.ReceiveMessage (cognitive 17) src/Avalonia.DesignerSupport/Remote/HtmlTransport/SimpleWebSocketHttpServer.cs:388— SimpleWebSocket.ReceiveMessage has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AndroidScreen.Refresh (cognitive 17) src/Android/Avalonia.Android/Platform/AndroidScreens.cs:19— AndroidScreen.Refresh has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HeadlessVncFramebufferSource.HeadlessVncFramebufferSource.ctor (cognitive 17) src/Headless/Avalonia.Headless.Vnc/HeadlessVncFramebufferSource.cs:20— HeadlessVncFramebufferSource.HeadlessVncFramebufferSource.ctor has cognitive complexity 17 (threshold 15). None of this is in the body itself: all 17 points belong to 4 function literals inside it that branch (lines 40, 62, 77, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
LibInputBackend.HandleTouch (cognitive 17) src/Linux/Avalonia.LinuxFramebuffer/Input/LibInput/LibInputBackend.Touch.cs:14— LibInputBackend.HandleTouch has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ClipboardPage.CopyFiles (cognitive 17) samples/ControlCatalog/Pages/ClipboardPage.xaml.cs:79— ClipboardPage.CopyFiles has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DragAndDropPage.AddHandlers (cognitive 17) samples/ControlCatalog/Pages/DragAndDropPage.xaml.cs:106— DragAndDropPage.AddHandlers has cognitive complexity 17 (threshold 15). 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.
FluidNavBar.Render (cognitive 17) samples/ControlCatalog/Pages/TabbedPage/FluidNavBar/FluidNavBar.cs:168— FluidNavBar.Render has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MainWindowViewModel.NavigateToAsync (cognitive 17) samples/ControlCatalog/ViewModels/MainWindowViewModel.cs:261— MainWindowViewModel.NavigateToAsync has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeometryGroupImpl.GeometryGroupImpl.ctor (cognitive 17) src/Skia/Avalonia.Skia/GeometryGroupImpl.cs:13— GeometryGroupImpl.GeometryGroupImpl.ctor has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColorPaletteResources.TryGetResource (cognitive 17) src/Avalonia.Themes.Fluent/ColorPaletteResources.cs:23— ColorPaletteResources.TryGetResource has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CompileAnalyzer.AnalyzePropertyMethods (cognitive 17) src/tools/Avalonia.Analyzers.CSharp/AvaloniaPropertyAnalyzer.CompileAnalyzer.cs:737— CompileAnalyzer.AnalyzePropertyMethods has cognitive complexity 17 (threshold 15). 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.
TrayIconImpl.ProcWnd (cognitive 17) src/Windows/Avalonia.Win32/TrayIconImpl.cs:54— TrayIconImpl.ProcWnd has cognitive complexity 17 (threshold 15). 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.
Win32Platform.SetDpiAwareness (cognitive 17) src/Windows/Avalonia.Win32/Win32Platform.cs:299— Win32Platform.SetDpiAwareness has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaList.CopyTo (cognitive 16) src/Avalonia.Base/Collections/AvaloniaList.cs:657— AvaloniaList.CopyTo has cognitive complexity 16 (threshold 15). 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.
DynamicPluginPropertyAccessorNode.OnSourceChanged (cognitive 16) src/Avalonia.Base/Data/Core/ExpressionNodes/Reflection/DynamicPluginPropertyAccessorNode.cs:47— DynamicPluginPropertyAccessorNode.OnSourceChanged has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArgumentListParser.ParseArguments (cognitive 16) src/Avalonia.Base/Data/Core/Parsers/ArgumentListParser.cs:8— ArgumentListParser.ParseArguments has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindingExpressionGrammar.ParseRelativeSource (cognitive 16) src/Avalonia.Base/Data/Core/Parsers/BindingExpressionGrammar.cs:317— BindingExpressionGrammar.ParseRelativeSource has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
FocusManager.GetTabStopCandidateElement (cognitive 16) src/Avalonia.Base/Input/FocusManager.cs:584— FocusManager.GetTabStopCandidateElement has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PullGestureRecognizer.PointerMoved (cognitive 16) src/Avalonia.Base/Input/GestureRecognizers/PullGestureRecognizer.cs:41— PullGestureRecognizer.PointerMoved has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KeyboardDevice.SetFocusedElement (cognitive 16) src/Avalonia.Base/Input/KeyboardDevice.cs:140— KeyboardDevice.SetFocusedElement has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PointerOverPreProcessor.OnNext (cognitive 16) src/Avalonia.Base/Input/PointerOverPreProcessor.cs:30— PointerOverPreProcessor.OnNext has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlyphRun.GetTrailingWhitespaceLengthRightToLeft (cognitive 16) src/Avalonia.Base/Media/GlyphRun.cs:830— GlyphRun.GetTrailingWhitespaceLengthRightToLeft has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextFormatterImpl.ResetTrailingWhitespaceBidiLevels (cognitive 16) src/Avalonia.Base/Media/TextFormatting/TextFormatterImpl.cs:1159— TextFormatterImpl.ResetTrailingWhitespaceBidiLevels has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LineBreakEnumerator.LB19 (cognitive 16) src/Avalonia.Base/Media/TextFormatting/Unicode/LineBreakEnumerator.cs:676— LineBreakEnumerator.LB19 has cognitive complexity 16 (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.
UnicodeTrieBuilder.CompactIndex2 (cognitive 16) src/Avalonia.Base/Media/TextFormatting/Unicode/UnicodeTrieBuilder.cs:818— UnicodeTrieBuilder.CompactIndex2 has cognitive complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ExpressionVariant.EqualsTo (cognitive 16) src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs:653— ExpressionVariant.EqualsTo has cognitive complexity 16 (threshold 15). 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.
ServerCompositor.ApplyPendingBatches (cognitive 16) src/Avalonia.Base/Rendering/Composition/Server/ServerCompositor.cs:77— ServerCompositor.ApplyPendingBatches has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KeyComparer.Equals (cognitive 16) src/Avalonia.Base/Utilities/WeakHashList.cs:34— KeyComparer.Equals has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WeakHashList.GetAlive (cognitive 16) src/Avalonia.Base/Utilities/WeakHashList.cs:201— WeakHashList.GetAlive has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Visual.AffectsRender (cognitive 16) src/Avalonia.Base/Visual.cs:444— Visual.AffectsRender has cognitive complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 458, 448). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ColorToHexConverter.TryParseHexFormat (cognitive 16) src/Avalonia.Controls.ColorPicker/Converters/ColorToHexConverter.cs:157— ColorToHexConverter.TryParseHexFormat has cognitive complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (TryParseCore). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ClassicDesktopStyleApplicationLifetime.DoShutdown (cognitive 16) src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:177— ClassicDesktopStyleApplicationLifetime.DoShutdown has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ComboBox.MoveSelection (cognitive 16) src/Avalonia.Controls/ComboBox.cs:617— ComboBox.MoveSelection has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlexPanel.ChildrenChanged (cognitive 16) src/Avalonia.Controls/FlexPanel/FlexPanel.cs:531— FlexPanel.ChildrenChanged has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiPage.OnPropertyChanged (cognitive 16) src/Avalonia.Controls/Page/MultiPage.cs:82— MultiPage.OnPropertyChanged has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Popup.OnPropertyChanged (cognitive 16) src/Avalonia.Controls/Primitives/Popup.cs:658— Popup.OnPropertyChanged has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ProgressBar.UpdateIndicator (cognitive 16) src/Avalonia.Controls/ProgressBar.cs:345— ProgressBar.UpdateIndicator has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScrollViewer.OnKeyDown (cognitive 16) src/Avalonia.Controls/ScrollViewer.cs:797— ScrollViewer.OnKeyDown has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectionNodeBase.OnItemsAdded (cognitive 16) src/Avalonia.Controls/Selection/SelectionNodeBase.cs:274— SelectionNodeBase.OnItemsAdded has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectionNodeBase.OnItemsRemoved (cognitive 16) src/Avalonia.Controls/Selection/SelectionNodeBase.cs:336— SelectionNodeBase.OnItemsRemoved has cognitive complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TreeView.SynchronizeItems (cognitive 16) src/Avalonia.Controls/TreeView.cs:1025— TreeView.SynchronizeItems has cognitive complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
VirtualizingCarouselPanel.OnItemsChanged (cognitive 16) src/Avalonia.Controls/VirtualizingCarouselPanel.cs:686— VirtualizingCarouselPanel.OnItemsChanged has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EglExternalObjectsFeature.ImportDmaBufImage (cognitive 16) src/Avalonia.OpenGL/Egl/EglExternalObjectsFeature.Drm.cs:134— EglExternalObjectsFeature.ImportDmaBufImage has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeleteRegionInCodePointsCommand.Apply (cognitive 16) src/Android/Avalonia.Android/Platform/Input/EditCommand.cs:81— DeleteRegionInCodePointsCommand.Apply has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AndroidStorageFolder.GetItemsAsync (cognitive 16) src/Android/Avalonia.Android/Platform/Storage/AndroidStorageItem.cs:306— AndroidStorageFolder.GetItemsAsync has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AndroidStorageFile.MoveAsync (cognitive 16) src/Android/Avalonia.Android/Platform/Storage/AndroidStorageItem.cs:607— AndroidStorageFile.MoveAsync has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AndroidStorageProvider.StartActivity (cognitive 16) src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:278— AndroidStorageProvider.StartActivity has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AtSpiCollectionHandler.CollectMatches (cognitive 16) src/Avalonia.FreeDesktop.AtSpi/Handlers/AtSpiCollectionHandler.cs:65— AtSpiCollectionHandler.CollectMatches has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Listener.Key (cognitive 16) src/Avalonia.Wayland/Server/Transient/WaylandInputDispatcher.Keyboard.cs:110— Listener.Key has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowImpl.ApplyConfigureBatch (cognitive 16) src/Avalonia.Wayland/WindowImpl.cs:47— WindowImpl.ApplyConfigureBatch has cognitive complexity 16 (threshold 15). 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.
DataFormatHelper.ToAtom (cognitive 16) src/Avalonia.X11/Selections/DataFormatHelper.cs:84— DataFormatHelper.ToAtom has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
X11DropTarget.OnXdndEnter (cognitive 16) src/Avalonia.X11/Selections/DragDrop/X11DropTarget.cs:34— X11DropTarget.OnXdndEnter has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StorageProviderApi.TryGetStorageItem (cognitive 16) src/Avalonia.Native/StorageProviderApi.cs:27— StorageProviderApi.TryGetStorageItem has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContentPageCommandBarPage.RebuildCommandBar (cognitive 16) samples/ControlCatalog/Pages/ContentPage/ContentPageCommandBarPage.xaml.cs:162— ContentPageCommandBarPage.RebuildCommandBar has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlVisual.OnRender (cognitive 16) samples/ControlCatalog/Pages/OpenGl/OpenGlLeasePage.xaml.cs:34— GlVisual.OnRender has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScreensPagePresenter.Render (cognitive 16) samples/ControlCatalog/Pages/ScreenPage.cs:66— ScreensPagePresenter.Render has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowImpl.Resize (cognitive 16) src/Windows/Avalonia.Win32/WindowImpl.cs:561— WindowImpl.Resize has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WinScreen.GetDisplayName (cognitive 16) src/Windows/Avalonia.Win32/WinScreen.cs:46— WinScreen.GetDisplayName has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AvaloniaSwapChainPanel.BuildDataTransferAsync (cognitive 16) src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:755— AvaloniaSwapChainPanel.BuildDataTransferAsync has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) src/Avalonia.Base/Media/Color.cs:145— src/Avalonia.Base/Media/Color.cs:145-200 | src/Avalonia.Base/Media/Color.cs:209-268 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) src/tools/Avalonia.UnicodeTrieGenerator/EastAsianWidthClassTrieGenerator.cs:62— src/tools/Avalonia.UnicodeTrieGenerator/EastAsianWidthClassTrieGenerator.cs:62-97 | src/tools/Avalonia.UnicodeTrieGenerator/SegmentationTrieGenerator.cs:187-215 | src/tools/Avalonia.UnicodeTrieGenerator/SegmentationTrieGenerator.cs:218-244 | src/tools/Avalonia.UnicodeTrieGenerator/SegmentationTrieGenerator.cs:247-275 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:525-567 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:587-622 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:625-660 | src/tools/Avalonia.UnicodeTrieGenerator/UnicodeDataGenerator.cs:663-698 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:331— src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:331-366 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:369-385 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:406-444 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:511-526 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:529-543 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:546-560 — 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.
Duplicated block (27–137 lines × 3) src/Avalonia.Base/Input/Key.cs:265— src/Avalonia.Base/Input/Key.cs:265-395 | src/Avalonia.Base/Input/PhysicalKey.cs:125-261 | src/Avalonia.X11/Keysyms.cs:387-413 — 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 (118 lines × 2) src/Avalonia.Base/Input/Key.cs:497— src/Avalonia.Base/Input/Key.cs:497-614 | src/Avalonia.Base/Input/PhysicalKey.cs:621-738 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (64–70 lines × 2) src/Avalonia.Base/Utilities/FrugalList.cs:1792— src/Avalonia.Base/Utilities/FrugalList.cs:1792-1861 | src/Avalonia.Base/Utilities/FrugalList.cs:2170-2233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (55 lines × 2) src/Avalonia.Themes.Fluent/Accents/SystemAccentColors.cs:29— src/Avalonia.Themes.Fluent/Accents/SystemAccentColors.cs:29-83 | src/Avalonia.Themes.Fluent2/Accents/SystemAccentColors.cs:38-92 — before extracting anything, compare `src/Avalonia.Themes.Fluent/Accents/SystemAccentColors.cs` and `src/Avalonia.Themes.Fluent2/Accents/SystemAccentColors.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (38 lines × 2) src/Avalonia.Base/Utilities/FrugalList.cs:1715— src/Avalonia.Base/Utilities/FrugalList.cs:1715-1752 | src/Avalonia.Base/Utilities/FrugalList.cs:2094-2131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (37–38 lines × 2) src/Avalonia.Controls.ColorPicker/Helpers/ColorPickerHelpers.cs:121— src/Avalonia.Controls.ColorPicker/Helpers/ColorPickerHelpers.cs:121-157 | src/Avalonia.Controls.ColorPicker/Helpers/ColorPickerHelpers.cs:168-205 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls.ColorPicker/Helpers/ColorPickerHelpers.cs:121` 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 (32–37 lines × 2) src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:1201— src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:1201-1232 | src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:1234-1270 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Media/Fonts/FontCollectionBase.cs:1234` 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. 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 (35 lines × 2) src/Avalonia.Controls/Automation/Peers/AutomationPeer.cs:16— src/Avalonia.Controls/Automation/Peers/AutomationPeer.cs:16-50 | src/Windows/Avalonia.Win32.Automation/Interop/IRawElementProviderSimple.cs:241-275 — 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 (31–32 lines × 2) src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:314— src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:314-345 | src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:392-422 — both copies are in the same file, so extract the 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 `src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlQueryTransformer.cs:314` 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 (29–31 lines × 2) src/Avalonia.Base/Media/TextFormatting/ShapedBuffer.cs:707— src/Avalonia.Base/Media/TextFormatting/ShapedBuffer.cs:707-735 | src/Avalonia.Base/Media/TextFormatting/ShapedBuffer.cs:789-819 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Media/TextFormatting/ShapedBuffer.cs:707` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Avalonia.Base/Media/TextFormatting/ShapedBuffer.cs:788` calls `Min` and `src/Avalonia.Base/Media/TextFormatting/ShapedBuffer.cs:707` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19–31 lines × 2) src/Avalonia.Controls/Calendar/Calendar.cs:2024— src/Avalonia.Controls/Calendar/Calendar.cs:2024-2042 | src/Avalonia.Controls/Calendar/Calendar.cs:2049-2079 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls/Calendar/Calendar.cs:2024` 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 (26–29 lines × 2) src/Avalonia.Controls/SelectableTextBlock.cs:125— src/Avalonia.Controls/SelectableTextBlock.cs:125-153 | src/Avalonia.Controls/TextBox.cs:1343-1368 — 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 `src/Avalonia.Controls/SelectableTextBlock.cs:125` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28 lines × 2) src/Avalonia.Base/Utilities/FrugalList.cs:583— src/Avalonia.Base/Utilities/FrugalList.cs:583-610 | src/Avalonia.Base/Utilities/FrugalList.cs:1063-1090 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Utilities/FrugalList.cs: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.
Duplicated block (26–27 lines × 2) src/Avalonia.Base/Media/HslColor.cs:466— src/Avalonia.Base/Media/HslColor.cs:466-491 | src/Avalonia.Base/Media/HsvColor.cs:496-522 — before extracting anything, compare `src/Avalonia.Base/Media/HslColor.cs` and `src/Avalonia.Base/Media/HsvColor.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Base/Media/HslColor.cs:466` 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 (26 lines × 2) src/Avalonia.Base/Utilities/FrugalList.cs:623— src/Avalonia.Base/Utilities/FrugalList.cs:623-648 | src/Avalonia.Base/Utilities/FrugalList.cs:1099-1124 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Utilities/FrugalList.cs:623` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22–24 lines × 2) src/Avalonia.Controls/Button.cs:542— src/Avalonia.Controls/Button.cs:542-563 | src/Avalonia.Controls/SplitButton/SplitButton.cs:324-347 — 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 `src/Avalonia.Controls/Button.cs:542` 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 (22–23 lines × 2) src/Avalonia.Base/Utilities/FrugalList.cs:1935— src/Avalonia.Base/Utilities/FrugalList.cs:1935-1957 | src/Avalonia.Base/Utilities/FrugalList.cs:2306-2327 — both copies are in the same file, so extract the 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 (19 lines × 3) src/Avalonia.Controls/Grid.cs:3093— src/Avalonia.Controls/Grid.cs:3093-3111 | src/Avalonia.Controls/Grid.cs:3133-3151 | src/Avalonia.Controls/Grid.cs:3173-3191 — 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 `src/Avalonia.Controls/Grid.cs:3093` 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 (20–21 lines × 2) src/Avalonia.Dialogs/ManagedStorageProvider.cs:105— src/Avalonia.Dialogs/ManagedStorageProvider.cs:105-124 | src/Avalonia.Dialogs/ManagedStorageProvider.cs:154-174 — both copies are in the same file, so extract the 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 `src/Avalonia.Dialogs/ManagedStorageProvider.cs:105` 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 (18–21 lines × 2) src/Skia/Avalonia.Skia/ImmutableBitmap.cs:79— src/Skia/Avalonia.Skia/ImmutableBitmap.cs:79-99 | src/Skia/Avalonia.Skia/WriteableBitmapImpl.cs:57-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (16–21 lines × 2) src/Windows/Avalonia.Win32/DComposition/DirectCompositionConnection.cs:75— src/Windows/Avalonia.Win32/DComposition/DirectCompositionConnection.cs:75-90 | src/Windows/Avalonia.Win32/WinRT/Composition/WinUiCompositorConnection.cs:81-101 — 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 `src/Windows/Avalonia.Win32/DComposition/DirectCompositionConnection.cs:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 3) src/Avalonia.Base/Media/FormattedText.cs:299— src/Avalonia.Base/Media/FormattedText.cs:299-324 | src/Avalonia.Base/Media/FormattedText.cs:486-506 | src/Avalonia.Base/Media/FormattedText.cs:544-563 — 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 `src/Avalonia.Base/Media/FormattedText.cs:299` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16 lines × 3) src/tools/Avalonia.UnicodeTrieGenerator/SegmentationTrieGenerator.cs:194— src/tools/Avalonia.UnicodeTrieGenerator/SegmentationTrieGenerator.cs:194-209 | src/tools/Avalonia.UnicodeTrieGenerator/SegmentationTrieGenerator.cs:223-238 | src/tools/Avalonia.UnicodeTrieGenerator/SegmentationTrieGenerator.cs:254-269 — 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 `src/tools/Avalonia.UnicodeTrieGenerator/SegmentationTrieGenerator.cs:194` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14–19 lines × 2) src/Avalonia.Controls/Page/NavigationPage.cs:747— src/Avalonia.Controls/Page/NavigationPage.cs:747-760 | src/Avalonia.Controls/Page/NavigationPage.cs:1897-1915 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17–18 lines × 2) src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.Properties.cs:33— src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.Properties.cs:33-49 | src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs:117-134 — 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 (16–17 lines × 2) src/Avalonia.Controls/TopLevelHost.cs:52— src/Avalonia.Controls/TopLevelHost.cs:52-67 | src/Avalonia.Controls/TopLevelHost.cs:93-109 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls/TopLevelHost.cs:52` 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 before the matched lines, `src/Avalonia.Controls/TopLevelHost.cs:52` calls `default` and `src/Avalonia.Controls/TopLevelHost.cs:93` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 3) src/Avalonia.Base/Media/FormattedText.cs:330— src/Avalonia.Base/Media/FormattedText.cs:330-345 | src/Avalonia.Base/Media/FormattedText.cs:512-526 | src/Avalonia.Base/Media/FormattedText.cs:569-584 — 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 `src/Avalonia.Base/Media/FormattedText.cs:330` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–15 lines × 2) src/Avalonia.Themes.Fluent/Accents/SystemAccentColors.cs:10— src/Avalonia.Themes.Fluent/Accents/SystemAccentColors.cs:10-21 | src/Avalonia.Themes.Fluent2/Accents/SystemAccentColors.cs:10-24 — before extracting anything, compare `src/Avalonia.Themes.Fluent/Accents/SystemAccentColors.cs` and `src/Avalonia.Themes.Fluent2/Accents/SystemAccentColors.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Themes.Fluent/Accents/SystemAccentColors.cs:10` 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 (7–13 lines × 4) src/Browser/Avalonia.Browser/BrowserTopLevelImpl.cs:138— src/Browser/Avalonia.Browser/BrowserTopLevelImpl.cs:138-144 | src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs:65-73 | src/Windows/Avalonia.Win32/SwapChainTopLevelImpl.cs:62-74 | src/iOS/Avalonia.iOS/AvaloniaView.cs:251-258 — before extracting anything, compare `src/Browser/Avalonia.Browser/BrowserTopLevelImpl.cs` and `src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7–13 lines × 2) src/Avalonia.Wayland/WindowImplBase.cs:106— src/Avalonia.Wayland/WindowImplBase.cs:106-112 | src/Windows/Avalonia.Win32/WindowImpl.cs:199-211 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12–13 lines × 2) src/tools/DevGenerators/CrossThreadProxyGenerator.cs:74— src/tools/DevGenerators/CrossThreadProxyGenerator.cs:74-86 | src/tools/DevGenerators/CrossThreadProxyGenerator.cs:101-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/tools/DevGenerators/CrossThreadProxyGenerator.cs:74` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6–11 lines × 5) src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs:59— src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs:59-66 | src/Browser/Avalonia.Browser/BrowserTopLevelImpl.cs:138-143 | src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs:65-72 | src/Windows/Avalonia.Win32/SwapChainTopLevelImpl.cs:62-72 | src/iOS/Avalonia.iOS/AvaloniaView.cs:251-256 — before extracting anything, compare `src/Browser/Avalonia.Browser/BrowserTopLevelImpl.cs` and `src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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–10 lines × 2) src/Avalonia.Controls/WrapPanel.cs:247— src/Avalonia.Controls/WrapPanel.cs:247-256 | src/Avalonia.Controls/WrapPanel.cs:310-318 — both copies are in the same file, so extract the 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 `src/Avalonia.Controls/WrapPanel.cs:247` 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 before the matched lines, `src/Avalonia.Controls/WrapPanel.cs:247` calls `Measure` and `src/Avalonia.Controls/WrapPanel.cs:310` 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 (5–9 lines × 7) src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs:59— src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs:59-64 | src/Avalonia.Native/TopLevelImpl.cs:138-142 | src/Avalonia.Wayland/WindowImplBase.cs:108-112 | src/Browser/Avalonia.Browser/BrowserTopLevelImpl.cs:138-142 | src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs:65-70 | src/Windows/Avalonia.Win32/SwapChainTopLevelImpl.cs:62-70 | src/iOS/Avalonia.iOS/AvaloniaView.cs:251-255 — before extracting anything, compare `src/Browser/Avalonia.Browser/BrowserTopLevelImpl.cs` and `src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 6) src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:333— src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:333-340 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:371-378 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:407-414 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:515-522 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:532-539 | src/Windows/Avalonia.WinUI/AvaloniaSwapChainPanel.cs:547-554 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 8) src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1356— src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1356-1361 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1372-1377 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1378-1383 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1384-1389 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1542-1547 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1558-1563 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1564-1569 | src/Avalonia.Controls.ColorPicker/ColorSpectrum/ColorSpectrum.cs:1570-1575 — all 8 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 (5–6 lines × 3) src/Avalonia.X11/X11Window.cs:527— src/Avalonia.X11/X11Window.cs:527-532 | src/Headless/Avalonia.Headless/HeadlessWindowImpl.cs:76-80 | src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs:64-68 — 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 × 3) src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs:90— src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs:90-98 | src/Avalonia.Wayland/WindowImplBase.cs:107-111 | src/Windows/Avalonia.Win32/WindowImpl.cs:201-209 — 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 (42 lines × 2) src/Avalonia.Base/Styling/Activators/OrActivator.cs:16— src/Avalonia.Base/Styling/Activators/OrActivator.cs:16-57 | src/Avalonia.Base/Styling/Activators/OrQueryActivator.cs:14-61 — before extracting anything, compare `src/Avalonia.Base/Styling/Activators/OrActivator.cs` and `src/Avalonia.Base/Styling/Activators/OrQueryActivator.cs` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (129 lines × 4) src/Avalonia.Controls.ColorPicker/ColorPalettes/FlatColorPalette.cs:299— src/Avalonia.Controls.ColorPicker/ColorPalettes/FlatColorPalette.cs:299-617 | src/Avalonia.Controls.ColorPicker/ColorPalettes/FlatHalfColorPalette.cs:20-148 | src/Avalonia.Controls.ColorPicker/ColorPalettes/MaterialColorPalette.cs:354-658 | src/Avalonia.Controls.ColorPicker/ColorPalettes/MaterialHalfColorPalette.cs:20-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (138 lines × 2) src/Avalonia.Themes.Fluent/ColorPaletteResources.Properties.cs:20— src/Avalonia.Themes.Fluent/ColorPaletteResources.Properties.cs:20-157 | src/Avalonia.Themes.Fluent2/ColorPaletteResources.Properties.cs:20-157 — `src/Avalonia.Themes.Fluent/ColorPaletteResources.Properties.cs` and `src/Avalonia.Themes.Fluent2/ColorPaletteResources.Properties.cs` 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 2 separate duplicated blocks between them, totalling at least 147 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/Avalonia.Themes.Fluent/ColorPaletteResources.Properties.cs:20` 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 (10 lines × 5) src/Avalonia.Controls/Primitives/HeaderedContentControl.cs:78— src/Avalonia.Controls/Primitives/HeaderedContentControl.cs:78-87 | src/Avalonia.Controls/Primitives/HeaderedItemsControl.cs:134-143 | src/Avalonia.Controls/Primitives/HeaderedSelectingItemsControl.cs:132-141 | src/Avalonia.Controls/ToggleSwitch.cs:144-153 | src/Avalonia.Controls/ToggleSwitch.cs:157-166 — before extracting anything, compare `src/Avalonia.Controls/Primitives/HeaderedItemsControl.cs` and `src/Avalonia.Controls/Primitives/HeaderedSelectingItemsControl.cs` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 3) src/Windows/Avalonia.Win32/DComposition/DirectCompositionConnection.cs:41— src/Windows/Avalonia.Win32/DComposition/DirectCompositionConnection.cs:41-52 | src/Windows/Avalonia.Win32/DirectX/DxgiConnection.cs:49-60 | src/Windows/Avalonia.Win32/WinRT/Composition/WinUiCompositorConnection.cs:30-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Near-duplicate member pair (43 shared lines) src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:677— src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:677-728 | src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:731-782 — These two members are variants of one another: 43 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (42 shared lines) samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:176— samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:176-318 | samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:321-497 — These two members are variants of one another: 42 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:31— samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:31-109 | samples/ControlCatalog/Pages/NavigationPage/Transitions/FadeThroughTransition.cs:31-135 | samples/ControlCatalog/Pages/NavigationPage/Transitions/PageSlideTransition.cs:43-86 | samples/ControlCatalog/Pages/NavigationPage/Transitions/ParallaxSlideTransition.cs:32-110 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (37 lines × 2) samples/ControlCatalog/Pages/OpenGl/OpenGlContent.cs:139— samples/ControlCatalog/Pages/OpenGl/OpenGlContent.cs:139-175 | samples/GpuInterop/VulkanDemo/VulkanContent.cs:44-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9–34 lines × 4) samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:67— samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:67-75 | samples/ControlCatalog/Pages/NavigationPage/Transitions/FadeThroughTransition.cs:80-88 | samples/ControlCatalog/Pages/NavigationPage/Transitions/PageSlideTransition.cs:51-84 | samples/ControlCatalog/Pages/NavigationPage/Transitions/ParallaxSlideTransition.cs:68-76 — before extracting anything, compare `samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs` and `samples/ControlCatalog/Pages/NavigationPage/Transitions/PageSlideTransition.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:67` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (29 lines × 2) src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:679— src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:679-707 | src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:733-761 — both copies are in the same file, so extract the 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 `src/Avalonia.Base/Rendering/Composition/HitTesting/CompositionHitTestAabbTree.cs:679` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–25 lines × 3) samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:101— samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:101-109 | samples/ControlCatalog/Pages/NavigationPage/Transitions/PageSlideTransition.cs:62-86 | samples/ControlCatalog/Pages/NavigationPage/Transitions/ParallaxSlideTransition.cs:102-110 — before extracting anything, compare `samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs` and `samples/ControlCatalog/Pages/NavigationPage/Transitions/PageSlideTransition.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `samples/ControlCatalog/Pages/NavigationPage/Transitions/PageSlideTransition.cs:62` calls `Add`, `RunAsync` and `samples/ControlCatalog/Pages/NavigationPage/Transitions/CompositeTransition.cs:101` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (21 lines × 3) samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:298— samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:298-318 | samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:477-497 | samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:666-686 — 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 `samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:298` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:475` calls `Add` and `samples/ControlCatalog/Pages/CarouselPage/CareCompanionAppPage.xaml.cs:296` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (128 lines × 3) samples/ControlCatalog/Pages/CommandBarPage.xaml.cs:30— samples/ControlCatalog/Pages/CommandBarPage.xaml.cs:30-158 | samples/ControlCatalog/Pages/ConnectedAnimationDemoPage.xaml.cs:15-142 | samples/ControlCatalog/Pages/ContentDemoPage.xaml.cs:30-158 — before extracting anything, compare `samples/ControlCatalog/Pages/CommandBarPage.xaml.cs` and `samples/ControlCatalog/Pages/ConnectedAnimationDemoPage.xaml.cs` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Coverage not measured — .NET and JavaScript/TypeScript suite — Coverage NOT MEASURED: the .NET half could not be measured — the repository runs its tests on Microsoft.Testing.Platform and wires up no coverage extension for it; the JavaScript/TypeScript half could not be measured — the mocha suite in tests/Avalonia.DesignerSupport.Tests/Remote/HtmlTransport/webapp/ ran and not one test passed (> simple-test@1.0.0 test), so the coverage report describes the failed run, not the code. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
Hollow method — returns a constant without doing the work src/Avalonia.Base/Input/FocusManager.cs:1152— `GetRootOfPopupSubTree` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
IC1 · Incompleteness & stubs· Both branches open with the same statements · ×1
Both branches open with the same statements — the condition does not decide them src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs:618— The first 2 statements of the `if` and of the `else` are identical, so they run on both paths regardless of the condition. Lift them above the `if` — leaving them duplicated inside makes the branches read as though they handled this differently.
Skeleton type — most members are unfinished src/Avalonia.Controls/Automation/Peers/InteropAutomationPeer.cs:15— `InteropAutomationPeer` has 19 unfinished members out of 22 declared members (methods, properties, indexers and events, whether or not each carries a body) — a scaffolded type that was never implemented.
IC1 · Incompleteness & stubs· Both branches are identical · ×1
Both branches are identical — the condition decides nothing src/Avalonia.Controls/Primitives/TextSelectionCanvas.cs:342— Both arms of `handle.SelectionHandleType == SelectionHandleType.Start ? … : …` are `caretBound.BottomLeft`, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Duplicated block (14 lines × 2 locations) src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:241— src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:241 · src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:289 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (10 lines × 2 locations) src/Avalonia.DesignerSupport/Remote/HtmlTransport/webapp/src/Models/Input/PointerPressedEventMessage.ts:6— src/Avalonia.DesignerSupport/Remote/HtmlTransport/webapp/src/Models/Input/PointerPressedEventMessage.ts:6 · src/Avalonia.DesignerSupport/Remote/HtmlTransport/webapp/src/Models/Input/PointerReleasedEventMessage.ts:6 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (9 lines × 2 locations) src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:113— src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:113 · src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (8 matched lines × 2 locations) · ×1
Duplicated block with local edits (8 matched lines × 2 locations) src/Browser/Avalonia.Browser/webapp/modules/avalonia/screens.ts:82— src/Browser/Avalonia.Browser/webapp/modules/avalonia/screens.ts:82 · src/Browser/Avalonia.Browser/webapp/modules/avalonia/screens.ts:97 — the two spans are one implementation copied and then locally edited — 55 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (7 lines × 2 locations) src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:97— src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:97 · src/Browser/Avalonia.Browser/webapp/modules/storage/storageItem.ts:120 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (6 lines × 2 locations) src/Browser/Avalonia.Browser/webapp/modules/avalonia/inputQueue.ts:99— src/Browser/Avalonia.Browser/webapp/modules/avalonia/inputQueue.ts:99 · src/Browser/Avalonia.Browser/webapp/modules/avalonia/inputQueue.ts:173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2 locations) src/Browser/Avalonia.Browser/webapp/modules/avalonia/nativeControlHost.ts:32— src/Browser/Avalonia.Browser/webapp/modules/avalonia/nativeControlHost.ts:32 · src/Browser/Avalonia.Browser/webapp/modules/avalonia/nativeControlHost.ts:42 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Complex function getCaretCoordinates (cyclomatic 13, cognitive 16) src/Browser/Avalonia.Browser/webapp/modules/avalonia/caretHelper.ts:3— getCaretCoordinates has cyclomatic complexity 13 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function tryGetReadableDataItemValueAsync (cyclomatic 12, cognitive 18) src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:214— tryGetReadableDataItemValueAsync has cyclomatic complexity 12 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts · ×1
src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts: 486 lines of code src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts:1— src/Browser/Avalonia.Browser/webapp/modules/avalonia/input.ts has 486 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
No lint or typecheck script — test ✓ · lint ✗ · typecheck ✗ — read from this repository's REDACTED scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Dead file (~17 LoC) src/Browser/Avalonia.Browser/webapp/build.js— no import path from any entry point (5 application, 1 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency 'mobx' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'mobx-react' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'npm-run-all' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Blocking `File.ReadAllText` inside an `async` method src/Avalonia.DesignerSupport/Remote/FileWatcherTransport.cs:75— `File.ReadAllText` blocks the thread on I/O while `File.ReadAllTextAsync` exists to wait without one — inside a method that is already `async`, await the twin.
Blocking `WaitHandle.WaitOne` inside an `async` method REDACTED:201— `WaitHandle.WaitOne` parks the thread until another thread signals it — inside a method that is already `async`, the wait should be awaitable (a `TaskCompletionSource`, `SemaphoreSlim.WaitAsync`, or `WaitHandle` bridged with `Task.Factory.FromAsync`).
X15 · Unvalidated length from an untrusted reader· Length read from the parsed input is spent without ever being bounded · ×1
Length read from the parsed input is spent without ever being bounded src/Avalonia.Remote.Protocol/MetsysBson.cs:1304— `length` is read from the stream being parsed at line 1295 (`ReadInt32`), then read in bulk from that same stream at line 1304 — and nowhere in this method is `length` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). A file the caller did not write therefore chooses the size directly: a value near `int.MaxValue` allocates until the process dies, and a value that overflows the cast to `int` goes negative and throws out of a parser whose failure path was written for malformed input, not for hostile input. Bound `length` against the bytes actually remaining in the stream before spending it.
X29 · Per-element action decided by a fixed element· Per-element action decided by a fixed element · ×1
Per-element action decided by a fixed element samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml.cs:148— This loop runs once per element of `options`, and the statement it guards acts on the element it is on — `options[j]`. The test deciding whether that statement runs does not: `options[i] is { } option` reads `options[i]`, a subscript that does not move, so whatever it answers for that one element it answers for ALL of them. One `if` names the same collection at two different subscripts, which is the contradiction: either the test was meant to be per-element, in which case every element that differs from the fixed one is handled wrongly and all in the same direction, or it really is one answer for the whole collection, in which case it is being re-asked on every pass and belongs above the loop. The `if` is in the wrong place under both readings. Give the test the loop variable, or hoist it out.
X5 · Nullable reference types· Symbol treated as nullable, then dereferenced unguarded · ×1
Symbol treated as nullable, then dereferenced unguarded src/Windows/Avalonia.Win32/DComposition/DirectCompositionConnection.cs:108— This method contradicts itself about `device`: line 118 writes `device?.Dispose`, which says `device` can be null, but line 108 then dereferences it directly as `device.WaitForCommitCompletion` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `device` truly cannot be null here, the `?.` is misleading. Settle it one way — test `device` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
Orphaned file src/Avalonia.Dialogs/Internal/ManagedFileChooserViewModel.cs: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 src/Avalonia.Base/Input/GestureRecognizers/VelocityTracker.cs: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 src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlResourceTransformer.cs: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 src/Avalonia.Base/Vector.cs: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 src/Avalonia.Base/Media/Transformation/TransformParser.cs: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 src/Avalonia.Base/Media/ExperimentalAcrylicMaterial.cs: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 src/Avalonia.Base/Animation/KeySpline.cs: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 src/tools/Avalonia.Generators/Compiler/RoslynTypeSystem.cs: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 src/Avalonia.Native/AvaloniaNativeMenuExporter.cs: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 src/Avalonia.Base/Size.cs: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 src/Avalonia.Controls/Notifications/WindowNotificationManager.cs: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 src/Avalonia.Base/Media/Transformation/TransformOperations.cs: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 src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlBindingPathTransformer.cs: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 src/Avalonia.Base/Media/Transformation/TransformOperation.cs: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 src/Avalonia.Controls/Canvas.cs: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 src/Avalonia.Base/Data/Converters/MethodToCommandConverter.cs: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 src/Avalonia.Base/Rendering/Composition/Drawing/RenderDataStream.Visit.cs: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 src/Avalonia.Base/Utilities/SpanStringTokenizer.cs: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 src/Avalonia.Controls/Primitives/UniformGrid.cs: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 src/Avalonia.Base/Reactive/LightweightObservableBase.cs: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 src/Markup/Avalonia.Markup.Xaml/Diagnostics/XamlSourceInfo.cs: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 src/Avalonia.Base/Logging/ParametrizedLogger.cs: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 src/Avalonia.Base/Rendering/Composition/Drawing/RenderDataStream.cs: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 src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/XamlIlPropertyInfoAccessorFactoryEmitter.cs: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 src/Avalonia.Native/IAvnMenu.cs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate src/Avalonia.Base/Input/MouseDevice.cs:158— `!_lastClickRect.Contains(p) || timestamp - _lastClickTime > doubleClickTime || button != _lastClickButton` appears character-identically in 2 files — src/Avalonia.Base/Input/MouseDevice.cs, src/Avalonia.Base/Input/PenDevice.cs. 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 src/Avalonia.Base/Reactive/AvaloniaPropertyBindingObservable.cs:110— `!_value.HasValue || !EqualityComparer<TResult>.Default.Equals(newValue, _value.Value)` appears character-identically in 2 files — src/Avalonia.Base/Reactive/AvaloniaPropertyBindingObservable.cs, src/Avalonia.Base/Reactive/AvaloniaPropertyObservable.cs. 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 src/Avalonia.Base/Input/MouseDevice.cs:51— `!e.Handled && e is RawPointerEventArgs margs` appears character-identically in 2 files — src/Avalonia.Base/Input/MouseDevice.cs, src/Avalonia.Base/Input/PenDevice.cs. 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 src/Avalonia.Base/Data/Core/Plugins/AvaloniaPropertyAccessorPlugin.cs:36— `!reference.TryGetTarget(out var instance) || instance is null` appears character-identically in 3 files — src/Avalonia.Base/Data/Core/Plugins/AvaloniaPropertyAccessorPlugin.cs, src/Avalonia.Base/Data/Core/Plugins/InpcPropertyAccessorPlugin.cs, src/Avalonia.Base/Data/Core/Plugins/ReflectionMethodAccessorPlugin.cs. 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 src/Avalonia.Controls/SelectableTextBlock.cs:185— `(ContextFlyout == null || !ContextFlyout.IsOpen) && (ContextMenu == null || !ContextMenu.IsOpen)` appears character-identically in 2 files — src/Avalonia.Controls/SelectableTextBlock.cs, src/Avalonia.Controls/TextBox.cs. 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 src/Avalonia.Base/Data/Core/Parsers/BindingExpressionVisitor.cs:489— `(_index >= e.NewStartingIndex && _index < e.NewStartingIndex + e.NewItems!.Count) || (_index >= e.OldStartingIndex && _index < e.OldStarting…` appears character-identically in 2 files — src/Avalonia.Base/Data/Core/Parsers/BindingExpressionVisitor.cs, src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/PropertyInfoAccessorFactory.cs. 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 src/Avalonia.Base/StyledElement.cs:336— `(_resources?.HasResources ?? false) || (((IResourceNode?)_styles)?.HasResources ?? false)` appears character-identically in 2 files — src/Avalonia.Base/StyledElement.cs, src/Avalonia.Controls/Application.cs. 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 samples/GpuInterop/VulkanDemo/VulkanBufferHelper.cs:75— `(memoryTypeBits & (1 << i)) != 0 && type.PropertyFlags.HasFlag(flags)` appears character-identically in 3 files — samples/GpuInterop/VulkanDemo/VulkanBufferHelper.cs, samples/GpuInterop/VulkanDemo/VulkanContent.cs, samples/GpuInterop/VulkanDemo/VulkanMemoryHelper.cs. 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 src/Avalonia.Base/PixelRect.cs:244— `(newRight > newLeft) && (newBottom > newTop)` appears character-identically in 3 files — src/Avalonia.Base/PixelRect.cs, src/Avalonia.Base/Platform/LtrbRect.cs, src/Avalonia.Base/Rect.cs. 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 src/Avalonia.Base/PixelRect.cs:263— `(rect.X < Right) && (X < rect.Right) && (rect.Y < Bottom) && (Y < rect.Bottom)` appears character-identically in 2 files — src/Avalonia.Base/PixelRect.cs, src/Avalonia.Base/Rect.cs. 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 src/Avalonia.Base/PixelRect.cs:181— `Contains(r.TopLeft) && Contains(r.BottomRight)` appears character-identically in 2 files — src/Avalonia.Base/PixelRect.cs, src/Avalonia.Base/Rect.cs. 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 src/Avalonia.Controls/SplitView/SplitView.cs:419— `DisplayMode == SplitViewDisplayMode.CompactOverlay || DisplayMode == SplitViewDisplayMode.Overlay` appears character-identically in 2 files — samples/ControlCatalog/ViewModels/MainWindowViewModel.cs, src/Avalonia.Controls/SplitView/SplitView.cs. 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 src/Avalonia.Controls/VirtualizingCarouselPanel.cs:657— `Items[index] is Control c && c.GetValue(RecycleKeyProperty) == s_itemIsItsOwnContainer` appears character-identically in 2 files — src/Avalonia.Controls/VirtualizingCarouselPanel.cs, src/Avalonia.Controls/VirtualizingStackPanel.cs. 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 src/Avalonia.Base/Point.cs:217— `MathUtilities.AreClose(_x, other._x) && MathUtilities.AreClose(_y, other._y)` appears character-identically in 2 files — src/Avalonia.Base/Point.cs, src/Avalonia.Base/Vector.cs. 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 src/Avalonia.Controls/Automation/Peers/ScrollViewerAutomationPeer.cs:83— `Owner.TemplatedParent is null && base.IsControlElementCore()` appears character-identically in 2 files — src/Avalonia.Controls/Automation/Peers/ScrollViewerAutomationPeer.cs, src/Avalonia.Controls/Automation/Peers/TextBlockAutomationPeer.cs. 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 src/Avalonia.Controls/Presenters/TextPresenter.cs:623— `PasswordChar != default(char) && !RevealPassword` appears character-identically in 2 files — src/Avalonia.Controls/Presenters/TextPresenter.cs, src/Avalonia.Controls/TextBox.cs. 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 src/Avalonia.Controls/SelectableTextBlock.cs:524— `SelectionStart != SelectionEnd && caretIndex >= firstSelection && caretIndex <= lastSelection` appears character-identically in 2 files — src/Avalonia.Controls/SelectableTextBlock.cs, src/Avalonia.Controls/TextBox.cs. 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 src/Avalonia.Base/Data/Core/TypedBindingExpression.cs:166— `TargetProperty is not null && TargetProperty != targetProperty` appears character-identically in 2 files — src/Avalonia.Base/Data/Core/TypedBindingExpression.cs, src/Avalonia.Base/Data/Core/UntypedBindingExpressionBase.cs. 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 src/Avalonia.Base/Data/Core/BindingExpression.cs:506— `TryGetTarget(out var target) && TargetProperty is not null` appears character-identically in 2 files — src/Avalonia.Base/Data/Core/BindingExpression.cs, src/Avalonia.Base/Data/Core/TypedBindingExpression.cs. 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 src/Avalonia.Base/Data/Core/ExpressionNodes/LogicalAncestorElementNode.cs:24— `_ancestorLevel > 0 || _ancestorType is not null` appears character-identically in 2 files — src/Avalonia.Base/Data/Core/ExpressionNodes/LogicalAncestorElementNode.cs, src/Avalonia.Base/Data/Core/ExpressionNodes/VisualAncestorElementNode.cs. 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 src/Avalonia.Themes.Fluent/FluentTheme.xaml.cs:73— `_densityStyle == DensityStyle.Compact && _compactStyles.TryGetResource(key, theme, out value)` appears character-identically in 2 files — src/Avalonia.Themes.Fluent/FluentTheme.xaml.cs, src/Avalonia.Themes.Fluent2/Fluent2Theme.axaml.cs. 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 src/Avalonia.Base/Data/Core/Parsers/BindingExpressionVisitor.cs:487— `_index >= e.NewStartingIndex && _index < e.NewStartingIndex + e.NewItems!.Count` appears character-identically in 2 files — src/Avalonia.Base/Data/Core/Parsers/BindingExpressionVisitor.cs, src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/PropertyInfoAccessorFactory.cs. 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 src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs:50— `_inner.TryGetValue(theme, out var themePaletteResources) && themePaletteResources.TryGetResource(key, theme, out value)` appears character-identically in 2 files — src/Avalonia.Themes.Fluent/ColorPaletteResourcesCollection.cs, src/Avalonia.Themes.Fluent2/ColorPaletteResourcesCollection.cs. 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 src/Avalonia.Controls/Primitives/OverlayPopupHost.cs:131— `_needsUpdate && _popupPositionRequest is not null` appears character-identically in 2 files — src/Avalonia.Controls/Primitives/OverlayPopupHost.cs, src/Avalonia.Controls/Primitives/PopupRoot.cs. 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 src/Avalonia.X11/Dispatching/X11PlatformThreading.cs:135— `_nextTimer.HasValue && now > _nextTimer.Value` appears character-identically in 2 files — src/Avalonia.X11/Dispatching/X11PlatformThreading.cs, src/Linux/Avalonia.LinuxFramebuffer/EpollDispatcherImpl.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Silent fallback default on parse failure src/Avalonia.Base/Media/TextFormatting/Unicode/PropertyValueAliasHelper.cs:189— `GetTag` returns `"Zzzz"` when `s_scriptToTag.TryGetValue(script, out var value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Avalonia.Base/Media/TextFormatting/Unicode/PropertyValueAliasHelper.cs:378— `GetScript` returns `Script.Unknown` when `s_tagToScript.TryGetValue(tag, out var value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Avalonia.Base/Media/TextFormatting/Unicode/PropertyValueAliasHelper.cs:429— `GetGeneralCategory` returns `GeneralCategory.Other` when `s_tagToGeneralCategory.TryGetValue(tag, out var value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Avalonia.Base/Media/TextFormatting/Unicode/PropertyValueAliasHelper.cs:491— `GetLineBreakClass` returns `LineBreakClass.Unknown` when `s_tagToLineBreakClass.TryGetValue(tag, out var value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Avalonia.Base/Media/TextFormatting/Unicode/PropertyValueAliasHelper.cs:523— `GetWordBreakClass` returns `WordBreakClass.Other` when `s_tagToWordBreakClass.TryGetValue(tag, out var value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Avalonia.Base/Media/TextFormatting/Unicode/PropertyValueAliasHelper.cs:539— `GetBidiPairedBracketType` returns `BidiPairedBracketType.None` when `s_tagToBidiPairedBracketType.TryGetValue(tag, out var value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Avalonia.Base/Media/TextFormatting/Unicode/PropertyValueAliasHelper.cs:575— `GetBidiClass` returns `BidiClass.LeftToRight` when `s_tagToBidiClass.TryGetValue(tag, out var value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Android/Avalonia.Android/Platform/Input/AndroidKeyboardDevice.cs:221— `ConvertKey` falls back to `Key.None` when `KeyDic.TryGetValue(key, out var result)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidKeyInterop.cs:195— `PhysicalKeyFromScanCode` falls back to `PhysicalKey.None` when `scanCode is > 0 and <= 255 && s_physicalKeyFromScanCode.TryGetValue((byte)scanCo…` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Browser/Avalonia.Browser/KeyInterop.cs:202— `PhysicalKeyFromDomCode` falls back to `PhysicalKey.None` when `!string.IsNullOrEmpty(domCode) && s_physicalKeyFromDomCode.TryGetValue(domCode, …` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Avalonia.Wayland/XkbKeyTransform.cs:320— `KeyFromEvdev` falls back to `Key.None` when `s_keyFromEvdev.TryGetValue(evdevCode, out var result)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Avalonia.Wayland/XkbKeyTransform.cs:323— `PhysicalKeyFromEvdev` falls back to `PhysicalKey.None` when `s_physicalKeyFromEvdev.TryGetValue(evdevCode, out var result)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Avalonia.Wayland/XkbKeyTransform.cs:326— `KeyFromKeysym` falls back to `Key.None` when `s_keyFromKeysym.TryGetValue(keysym, out var result)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Avalonia.X11/X11KeyTransform.cs:195— `PhysicalKeyFromScanCode` falls back to `PhysicalKey.None` when `scanCode is > 0 and <= 255 && s_physicalKeyFromScanCode.TryGetValue((byte)scanCo…` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure src/Avalonia.X11/X11KeyTransform.cs:425— `KeyFromX11Key` falls back to `Key.None` when `s_keyFromX11Key.TryGetValue(key, out var result)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default on parse failure samples/IntegrationTestApp/Pages/WindowDecorationsPage.axaml.cs:18— `SetWindowDecorations` falls back to `-1` when `int.TryParse(WindowTitleBarHeightHint.Text, out var val)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Silent fallback default in catch src/Avalonia.Base/Platform/Storage/FileIO/StorageProviderHelpers.cs:67— `TryGetUriFromFilePath` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch src/Avalonia.Controls/Converters/StringFormatConverter.cs:23— `Convert` swallows every exception into `return AvaloniaProperty.UnsetValue;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch src/Avalonia.Dialogs/Internal/ManagedFileChooserSources.cs:69— `DefaultGetFileSystemRoots` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch src/Android/Avalonia.Android/AvaloniaAccessHelper.cs:247— `TryPerformNodeAction` swallows `ElementNotEnabledException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch src/Android/Avalonia.Android/Platform/AndroidInsetsManager.cs:226— `SystemBarTheme` swallows every exception into `return Controls.Platform.SystemBarTheme.Light;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch src/Android/Avalonia.Android/Platform/AndroidPlatformSettings.cs:177— `IsHighContrast` swallows every exception into `return ColorContrastPreference.NoPreference;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch src/Browser/Avalonia.Browser/Storage/BrowserStorageProvider.cs:47— `OpenFilePickerAsync` swallows `JSException` into `return Array.Empty<IStorageFile>();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch src/Browser/Avalonia.Browser/Storage/BrowserStorageProvider.cs:115— `OpenFolderPickerAsync` swallows `JSException` into `return Array.Empty<IStorageFolder>();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch src/Avalonia.X11/Selections/UriListHelper.cs:34— `Utf8BytesToFileUriList` swallows every exception into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch src/Avalonia.Native/ClipboardReadSession.cs:40— `GetItemCount` swallows `COMException` into `return 0;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch src/Avalonia.Native/ClipboardReadSession.cs:88— `IsTextFormat` swallows `COMException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch samples/ControlCatalog.Browser/Program.cs:105— `ParseArgs` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch samples/ControlCatalog/Converter/HexConverter.cs:29— `ConvertBack` swallows every exception into `return AvaloniaProperty.UnsetValue;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch samples/ControlCatalog/Pages/NavigationPage/NavigationPageCurvedHeaderPage.xaml.cs:67— `LoadImg` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 31 significant file(s) lose their only recent owner: src/tools/DevGenerators/CrossThreadProxyGenerator.cs, src/Avalonia.OpenGL/Egl/EglConsts.cs, src/Avalonia.Wayland/Server/WaylandWorker.cs, src/Avalonia.Base/Rendering/Composition/Server/ServerCompositor.cs, src/Avalonia.X11/Dispatching/GlibDispatcherImplBase.cs, src/Avalonia.Base/Rendering/Composition/Server/ServerCompositionVisual/ServerCompositionVisual.Render.cs, src/Avalonia.Base/Threading/Dispatcher.Queue.cs, src/Linux/Avalonia.LinuxFramebuffer/EpollDispatcherImpl.cs (+23 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 13 significant file(s) lose their only recent owner: src/Avalonia.Base/Media/TextFormatting/ShapedBuffer.cs, src/Avalonia.Base/Media/Fonts/Tables/Glyf/GlyfTable.cs, src/Avalonia.Base/Media/GlyphRun.cs, src/Avalonia.Base/Media/TextFormatting/TextCharacters.cs, src/tools/Avalonia.UnicodeTrieGenerator/UnicodeEnumsGenerator.cs, src/Avalonia.Base/Media/Fonts/FontFallbackScriptHints.cs, src/Avalonia.Base/Media/TextFormatting/InterWordJustification.cs, src/Avalonia.Base/Media/TextFormatting/Unicode/UnicodeData.Lookups.cs (+5 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 6 significant file(s) lose their only recent owner: src/Avalonia.FreeDesktop.AtSpi/AtSpiServer.cs, src/Avalonia.Controls/Calendar/CalendarDayButton.cs, src/Avalonia.Controls/Automation/Peers/ScrollViewerAutomationPeer.cs, src/Avalonia.X11/X11AtSpiAccessibility.cs, src/Avalonia.Controls/Automation/Peers/ComboBoxAutomationPeer.cs, src/Avalonia.FreeDesktop.AtSpi/Handlers/AtSpiSelectionHandler.cs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 5 significant file(s) lose their only recent owner: src/Avalonia.Controls/Primitives/PopupPositioning/ManagedPopupPositioner.cs, src/Avalonia.Wayland/Server/Transient/Rendering/WaylandEglWsiSurface.cs, src/Avalonia.Native/AvaloniaNativeTextInputMethod.cs, src/Avalonia.Base/Input/FindNextElementOptions.cs, src/Avalonia.Base/Input/IFocusManager.cs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 5 significant file(s) lose their only recent owner: src/Avalonia.Base/Input/Platform/KeyGestureFormatInfo.cs, src/Avalonia.Base/Input/Platform/PlatformHotkeyConfiguration.cs, src/Browser/Avalonia.Browser/Storage/WriteableStream.cs, src/Browser/Avalonia.Browser/Storage/BlobReadableStream.cs, src/Browser/Avalonia.Browser/Interop/AvaloniaModule.cs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 4 significant file(s) lose their only recent owner: src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionVariant.cs, src/Avalonia.Base/Rendering/Composition/Expressions/ExpressionParser.cs, src/Avalonia.Base/Rendering/Composition/Expressions/DelegateExpressionFfi.cs, src/Avalonia.Base/Rendering/Composition/CompositionObject.cs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 4 significant file(s) lose their only recent owner: src/Windows/Avalonia.Win32/Input/KeyInterop.cs, src/Avalonia.Controls/Viewbox.cs, src/Avalonia.Controls/Primitives/ToggleButton.cs, src/Avalonia.Controls/DefinitionList.cs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #8 — If anonymized user #8 becomes unavailable, 4 significant file(s) lose their only recent owner: src/Avalonia.Controls/Primitives/TextSelectionHandle.cs, src/Avalonia.Controls/Image.cs, src/Avalonia.Controls/Page/PageNavigationHost.cs, src/Android/Avalonia.Android/CursorFactory.cs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #9 — If anonymized user #9 becomes unavailable, 5 significant file(s) lose their only recent owner: nukebuild/SbomGenerator.cs, src/Avalonia.Controls/Selection/SelectionModel.cs, src/Avalonia.Base/Data/Core/ExpressionNodes/ExpressionNode.cs, src/Avalonia.Base/Data/Core/ExpressionNodes/Reflection/DynamicPluginPropertyAccessorNode.cs, src/Avalonia.Base/Data/Core/ExpressionNodes/PropertyAccessorNode.cs. Pair on, review, or document these before any departure.
Fat interface: IInputElement (25 members) src/Avalonia.Base/Input/IInputElement.cs:11— `IInputElement` declares 25 members: `GotFocus`, `LostFocus`, `KeyDown`, `KeyUp`, `TextInput`, `PointerEntered`, `PointerExited`, `PointerPressed`, `PointerMoved`, `PointerReleased`, `PointerWheelChanged`, `Focusable`, `IsEnabled`, `Cursor`, `IsEffectivelyEnabled`, `IsEffectivelyVisible`, `IsKeyboardFocusWithin`, `IsFocused`, `IsHitTestVisible`, `IsPointerOver`, `Focus`, `KeyBindings`, `AddHandler`, `RemoveHandler`, `RaiseEvent`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IDrawingContextImpl (28 members) src/Avalonia.Base/Platform/IDrawingContextImpl.cs:13— `IDrawingContextImpl` declares 28 members: `Transform`, `Clear`, `DrawBitmap`, `DrawBitmap`, `DrawLine`, `DrawGeometry`, `DrawRectangle`, `DrawRegion`, `DrawEllipse`, `DrawGlyphRun`, `CreateLayer`, `PushClip`, `PushClip`, `PushClip`, `PopClip`, `PushLayer`, `PopLayer`, `PushOpacity`, `PopOpacity`, `PushOpacityMask`, `PopOpacityMask`, `PushGeometryClip`, `PopGeometryClip`, `PushRenderOptions`, `PopRenderOptions`, `PushTextOptions`, `PopTextOptions`, `GetFeature`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 28 declarations carry 25 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 25 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IPlatformRenderInterface (27 members) src/Avalonia.Base/Platform/IPlatformRenderInterface.cs:15— `IPlatformRenderInterface` declares 27 members: `CreateEllipseGeometry`, `CreateLineGeometry`, `CreateRectangleGeometry`, `CreateStreamGeometryBuilder`, `CreateGeometryGroup`, `CreateCombinedGeometry`, `BuildGlyphRunGeometry`, `CreateRenderTargetBitmap`, `CreateWriteableBitmap`, `LoadBitmap`, `LoadBitmap`, `LoadWriteableBitmapToWidth`, `LoadWriteableBitmapToHeight`, `LoadWriteableBitmap`, `LoadWriteableBitmap`, `LoadBitmapToWidth`, `LoadBitmapToHeight`, `ResizeBitmap`, `LoadBitmap`, `CreateGlyphRun`, `CreateBackendContext`, `SupportsIndividualRoundRects`, `DefaultAlphaFormat`, `DefaultPixelFormat`, `IsSupportedBitmapPixelFormat`, `SupportsRegions`, `CreateRegion`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 27 declarations carry 24 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 24 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: INavigation (25 members) src/Avalonia.Controls/Page/INavigation.cs:14— `INavigation` declares 25 members under just 14 distinct name(s): `NavigationStack`, `ModalStack`, `StackDepth`, `CanGoBack`, `PushAsync`, `PushAsync`, `PushAsync`, `PopAsync`, `PopAsync`, `PopToRootAsync`, `PopToRootAsync`, `PopToPageAsync`, `PopToPageAsync`, `ReplaceAsync`, `ReplaceAsync`, `ReplaceAsync`, `PushModalAsync`, `PushModalAsync`, `PushModalAsync`, `PopModalAsync`, `PopModalAsync`, `PopAllModalsAsync`, `PopAllModalsAsync`, `InsertPage`, `RemovePage`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 25 separate responsibilities: a caller binds to 14 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 25 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
Fat interface: ISelectionModel (21 members) src/Avalonia.Controls/Selection/ISelectionModel.cs:8— `ISelectionModel` declares 21 members: `Source`, `SingleSelect`, `SelectedIndex`, `SelectedIndexes`, `SelectedItem`, `SelectedItems`, `AnchorIndex`, `Count`, `IndexesChanged`, `SelectionChanged`, `LostSelection`, `SourceReset`, `BeginBatchUpdate`, `EndBatchUpdate`, `IsSelected`, `Select`, `Deselect`, `SelectRange`, `DeselectRange`, `SelectAll`, `Clear`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ITopLevelImpl (24 members) src/Avalonia.Controls/Platform/ITopLevelImpl.cs:19— `ITopLevelImpl` declares 24 members: `DesktopScaling`, `Handle`, `ClientSize`, `RenderScaling`, `Surfaces`, `Input`, `Paint`, `Resized`, `ScalingChanged`, `TransparencyLevelChanged`, `PlatformSpecificSceneInfo`, `PlatformSpecificSceneInfoChanged`, `Compositor`, `SetInputRoot`, `PointToClient`, `PointToScreen`, `SetCursor`, `Closed`, `LostFocus`, `CreatePopup`, `SetTransparencyLevelHint`, `TransparencyLevel`, `AcrylicCompensationLevels`, `SetFrameThemeVariant`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IWindowImpl (31 members) src/Avalonia.Controls/Platform/IWindowImpl.cs:12— `IWindowImpl` declares 31 members: `WindowState`, `WindowStateGetterIsUsable`, `WindowStateChanged`, `SetTitle`, `SetParent`, `SetEnabled`, `GotInputWhenDisabled`, `SetWindowDecorations`, `SetIcon`, `ShowTaskbarIcon`, `CanResize`, `SetCanMinimize`, `SetCanMaximize`, `Closing`, `IsClientAreaExtendedToDecorations`, `ExtendClientAreaToDecorationsChanged`, `NeedsManagedDecorations`, `RequestedDrawnDecorations`, `DrawnDecorationsRequestChanged`, `ExtendedMargins`, `OffScreenMargin`, `BeginMoveDrag`, `BeginResizeDrag`, `Resize`, `Move`, `SetMinMaxSize`, `SetExtendClientAreaToDecorationsHint`, `SetExtendClientAreaTitleBarHeightHint`, `AllowedWindowActions`, `AllowedWindowActionsChanged`, `SetShadowExtents`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Pass-through layer src/Avalonia.Base/Reactive/Operators/Sink.cs:84— _: all 3 public methods forward their arguments unchanged to _forward and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call _forward directly, or give the layer a job.
Pass-through layer src/Android/Avalonia.Android/Platform/AndroidScreens.cs:142— DisplayListener: all 3 public methods forward their arguments unchanged to screens and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call screens directly, or give the layer a job.
Pass-through layer src/iOS/Avalonia.iOS/AvaloniaView.Automation.cs:6— AvaloniaView: all 3 public methods forward their arguments unchanged to _accessWrapper and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call _accessWrapper directly, or give the layer a job.
Pass-through layer src/Avalonia.Native/MacOSNativeMenuCommands.cs:7— MacOSNativeMenuCommands: all 4 public methods forward their arguments unchanged to _commands and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call _commands directly, or give the layer a job.
Documentation: contradicts the code docs/api-compat.md— The document describes source/binary compatibility within major versions, but the companion CI build policy and baseline version configuration are outdated given the XML coverage (0-119) and no newer API compat doc appears. Update to reflect the current CI validation process and any new baseline-version rules.
Documentation: no installation or build instructions docs/index.md— The root README has no installation or build instructions; the only install guidance is in a separate file (build.md) that describes how to clone Avalonia and install .NET workloads. Add an Install/Build section summarizing the steps from the clone command to building samples, referencing build.md as needed.
GD1 · Unfinished & placeholder code· Placeholder literal left in code · ×2
Placeholder literal left in code samples/IntegrationTestApp/Pages/AutomationPage.axaml.cs:15— A placeholder string (" Lorem ipsum.") is still in shipped code — typical of generated boilerplate that was never filled in.
Placeholder literal left in code samples/RenderDemo/Pages/FormattedTextPage.axaml.cs:24— A placeholder string ("Lorem ipsum dolor sit amet, consectetur …") is still in shipped code — typical of generated boilerplate that was never filled in.
README/code drift src/tools/Avalonia.Generators/README.md:3— src/tools/Avalonia.Generators/README.md names the project `Avalonia.INamed`, but no project, folder or namespace of that name exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift src/tools/Avalonia.Generators/README.md:68— src/tools/Avalonia.Generators/README.md names the project `Avalonia.NameGenerator`, but no project, folder or namespace of that name exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
C2 · Access Controls· No named authorization policies · ×1
No named authorization policies — Authorization IS enforced here (by imperative guard methods that throw on violation) — this is NOT a claim that the code is unprotected. What's missing is a NAMED rule set: the guards encode the access rules inline, so the rules can't be listed, reviewed or tested apart from the call sites that apply them. Recommendation, not a defect.
C4 · Data Retention· Partial data-retention evidence · ×1
Partial data-retention evidence — A retention mechanism is present, but the data-lifecycle is not yet complete — missing: a scheduled purge / cleanup job (PurgeOlderThan / CleanupJob).
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 18 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (99 single-owned of 1285 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 1285 of the 2842 production source files in this repository met that bar). They are anonymized user #10 (2 file(s)), anonymized user #11 (2 file(s)), anonymized user #12 (2 file(s)), anonymized user #13 (2 file(s)), anonymized user #14 (1 file(s)), anonymized user #15 (1 file(s)) (+12 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/Avalonia.Base/Media/PreciseEllipticArcHelper.cs, src/Avalonia.Controls/Shapes/Arc.cs, src/Avalonia.Controls/CommandBar/CommandBarToggleButton.cs, src/Avalonia.Controls/CommandBar/CommandBarButton.cs, src/Avalonia.Base/Styling/AndQuery.cs, src/Avalonia.Base/Styling/OrQuery.cs, src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/CompiledBindings/PropertyInfoAccessorFactory.cs, src/Avalonia.Base/Data/Core/ExpressionNodes/Reflection/ReflectionIndexerNode.cs (+14 more).
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 3 of 104 project(s) overshoot their size bounds, lowering Project Cohesion to 9.4/10. The most over is `Avalonia.Base(net10.0)` (143556 LoC, 980 public types across 52 namespaces). Review these for cohesion — split a project that spans unrelated responsibilities.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
REDACTED
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 55 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: src/Avalonia.Dialogs/Internal/ManagedFileChooserViewModel.cs, src/Avalonia.Base/Input/GestureRecognizers/VelocityTracker.cs, src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlResourceTransformer.cs, src/Avalonia.Base/Vector.cs, src/Avalonia.Base/Media/Transformation/TransformParser.cs, src/Avalonia.Base/Media/ExperimentalAcrylicMaterial.cs, src/Avalonia.Base/Animation/KeySpline.cs, src/tools/Avalonia.Generators/Compiler/RoslynTypeSystem.cs (and 47 more) (60 orphaned of 1291 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 1291 of the 2842 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
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.
P12 · CI test-gate honesty· Sleep-based test synchronization · ×1
Sleep-based test synchronization — 46 Task.Delay/Thread.Sleep call(s) in test code synchronize with background work by sleeping — a known flakiness precursor on slow runners. Prefer polling with a deadline or completion signals.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R7 · Dead Code· Unused export 'StorageProvider' · ×1
Unused export 'StorageProvider' src/Browser/Avalonia.Browser/webapp/modules/storage/storageProvider.ts:13— Nothing ultimately consumes this binding: its only referrer is the re-export in src/Browser/Avalonia.Browser/webapp/modules/storage.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in src/Browser/Avalonia.Browser/webapp/modules/storage.ts in the same commit, or the barrel will import a name that no longer exists.
X2 · Cancellation propagation· Not all async methods take a CancellationToken · ×1
Not all async methods take a CancellationToken — Only 26/383 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
Nullable reference types not enabled everywhere — 53/79 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
Null-forgiving operator (`!`) suppressions reduce the NRT score — ~0.9 `!` suppressions per 1k syntax nodes — 1186 suppression(s) across the 1367606 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.
Subsumed condition operand nukebuild/SbomGenerator.cs:430— `declaredRange.StartsWith("github:")` can never decide this `||` — every value satisfying `declaredRange.StartsWith("github:")` also satisfies `declaredRange.StartsWith("git")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Skipped (documented): AssemblyName_With_Non_ASCII_Should_Load_Avares tests/Avalonia.Base.UnitTests/AssetLoaderTests.cs:42— Skipped with a documented reason — a deferral, not lazy debt: RegisterResUriParsers breaks this test. See https://github.com/AvaloniaUI/Avalonia/issues/2555.
Skipped (documented): TwoWay_Binding_Should_Not_Update_Source_When_Higher_Priority_Value_Set tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Binding.cs:1119— Skipped with a documented reason — a deferral, not lazy debt: Will need changes to binding internals in order to pass
Skipped (documented): TwoWay_Binding_Should_Not_Update_Source_When_Higher_Priority_Binding_Added tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Binding.cs:1141— Skipped with a documented reason — a deferral, not lazy debt: Will need changes to binding internals in order to pass
Skipped (documented): TwoWay_Style_Binding_Should_Not_Update_Source_When_StyleTrigger_Value_Set tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Binding.cs:1164— Skipped with a documented reason — a deferral, not lazy debt: Will need changes to binding internals in order to pass
Skipped (documented): TwoWay_Style_Binding_Should_Not_Update_Source_When_Animated_Binding_Added tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Binding.cs:1182— Skipped with a documented reason — a deferral, not lazy debt: Will need changes to binding internals in order to pass
Skipped (documented): Should_Process tests/Avalonia.Base.UnitTests/Media/TextFormatting/BiDiAlgorithmTests.cs:16— Skipped with a documented reason — a deferral, not lazy debt: Only run when we update Unicode data.
Skipped (documented): Should_Resolve tests/Avalonia.Base.UnitTests/Media/TextFormatting/BiDiClassTests.cs:19— Skipped with a documented reason — a deferral, not lazy debt: Only run when we update Unicode data.
Skipped (documented): Should_Enumerate tests/Avalonia.Base.UnitTests/Media/TextFormatting/GraphemeBreakClassTrieGeneratorTests.cs:22— Skipped with a documented reason — a deferral, not lazy debt: Only run when we update Unicode data.
Skipped (documented): Should_Enumerate_Other tests/Avalonia.Base.UnitTests/Media/TextFormatting/GraphemeBreakClassTrieGeneratorTests.cs:61— Skipped with a documented reason — a deferral, not lazy debt: Only run when we update the trie.
Skipped (documented): ShouldFindBreaks tests/Avalonia.Base.UnitTests/Media/TextFormatting/LineBreakEnumeratorTests.cs:153— Skipped with a documented reason — a deferral, not lazy debt: Only run when we update Unicode data.
Skipped (documented): ShouldFindBreaks tests/Avalonia.Base.UnitTests/Media/TextFormatting/SentenceBreakEnumeratorTests.cs:20— Skipped with a documented reason — a deferral, not lazy debt: Only run when we update Unicode data.
Skipped (documented): ShouldFindBreaks tests/Avalonia.Base.UnitTests/Media/TextFormatting/WordBreakEnumeratorTests.cs:78— Skipped with a documented reason — a deferral, not lazy debt: Only run when we update Unicode data.
Skipped (documented): Can_Select_Items_By_Ctrl_Clicking tests/Avalonia.IntegrationTests.Appium/ListBoxTests.cs:36— Skipped with a documented reason — a deferral, not lazy debt: WinAppDriver seems unable to consistently send a Ctrl key and appium-mac2-driver just hangs
Skipped (documented): Horizontal_Changes_Value_Dragging_Thumb_Right tests/Avalonia.IntegrationTests.Appium/SliderTests.cs:19— Skipped with a documented reason — a deferral, not lazy debt: Flaky test, slider value is sometimes off by 1 or 2 steps.
Skipped (documented): Horizontal_Changes_Value_Dragging_Thumb_Left tests/Avalonia.IntegrationTests.Appium/SliderTests.cs:40— Skipped with a documented reason — a deferral, not lazy debt: Flaky test, slider value is sometimes off by 1 or 2 steps.
Skipped (documented): Disallows_Setting_Non_Registered_Property tests/Avalonia.Markup.Xaml.UnitTests/Xaml/StyleTests.cs:200— Skipped with a documented reason — a deferral, not lazy debt: The animation system currently needs to be able to set any property on any object
Skipped (documented): Should_Wrap tests/Avalonia.Skia.UnitTests/Media/TextFormatting/TextLayoutTests.cs:770— Skipped with a documented reason — a deferral, not lazy debt: Only used for profiling.
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 173 file(s) — `REDACTED`, `src/Android/Avalonia.Android/AvaloniaView.cs`, `src/Android/Avalonia.Android/BackPressedCallback.cs`, `src/Android/Avalonia.Android/Platform/AndroidPlatformFeedback.cs`, `src/Android/Avalonia.Android/Platform/AndroidPlatformSettings.cs`, … (+168 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a16631-8561-70f6-8939-d378be961aae · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Appendix C — Personal-data map
Every field, property and record parameter whose name is conventional personal data — 23 field(s) across 2 categories, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.
Issues: 214 · Warnings: 1906 · Recommendations: 168 · Info: 110 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 23-10-2026 @ 00:38 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.