Public report of tui-cs/Terminal.Gui, published 12 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.3). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 12 November 2026, 01:25 UTC · Survey ID cd_8cafd0c91a5c499f93b9689ef946c9bf
tui-cs/Terminal.Gui
Measured 12 November 2026, 01:24 UTC, at code version 4454927
Code coverage is not measured: No coverage collector is wired up.
Boundary Type-Coupling is not measured: Bounded contexts not declared.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Down 2 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 148,422 lines of product code in 25 projects, tests not counted · Estimated rebuild effort: about 3.9 person-years · Weakest lens: Code Health, 44
Findings by how serious they are
153 critical1062 serious344 minor
2 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
12 November 2026, 01:24 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
71of 71 dimensions measured by tools.
1517of 1559 findings point to an exact file and line, so you can open each one in the code. The other 42 concern the repository as a whole, such as missing documentation.
71dimensions across 6 lenses, read from 148,422 lines of product code in 25 projects.
tui-cs/Terminal.Gui falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 54 out of 100 and is rated Adequate, and 84 of its 153 critical findings are security problems.
Code Health, at 44, is the weakest lens and counts most in the score. The best first steps are fixing the silenced warnings and handling the discarded errors, each worth about 7 points. Raising Code Health to 70 would lift the score to about 61.
Fifty-seven pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Eight weaknesses in the code could be used by an attacker, and forty-one errors are caught and ignored, so failures can go unnoticed. Pinning each tool to an exact version, fixing the weaknesses the scanner points to and handling or logging the ignored errors would close these risks. Limiting each secret to its own step would fix the six secrets exposed to more of the pipeline than needed, and passing outside input through environment variables would deal with the four pipeline steps that put outside input straight into a shell command. The nine sets of compiler warnings switched off in projects need turning back on in the build file.
The product code is 148,422 lines, about €570,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 Code Health rose from 44 to 70, the lowest score rated Strong, the score would rise from 54 to about 61.
Code composition: what the lines of code are
Business logic 24%Supporting code 13%Tests 62%Generated by tools 0%Code analyzers 0%
New since the last survey: 201 findings
These 201 critical or serious findings weren't in the previous survey, on 23 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes · ClassTooLong: NerdFonts Terminal.Gui/Text/NerdFonts.cs
God Classes · FileTooLong: Text/NerdFonts.cs Terminal.Gui/Text/NerdFonts.cs
God Classes · MethodTooLong: MarkdownTableLayoutEngine.Build Terminal.Gui/Views/Markdown/MarkdownTableLayoutEngine.cs
God Classes · TooManyMethods: MenuBar Terminal.Gui/Views/Menu/MenuBar.cs
Code Duplication · Edited copy of a member (91 corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs
Code Duplication · Edited copy of a member (56 corresponding lines) Terminal.Gui/Text/TextFormatter.cs
Code Duplication · Edited copy of a member (35 corresponding lines) Terminal.Gui/Drawing/Kitty/KittyGraphicsEncoder.cs
Code Duplication · Edited copy of a member (41 corresponding lines) Terminal.Gui/Views/GraphView/GraphView.cs
Code Duplication · Edited copies of one member (3 members, 43+ corresponding lines) Terminal.Gui/Views/TableView/TableView.Drawing.cs
Code Duplication · Edited copy of a member (34 corresponding lines) Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs
Code Duplication · Edited copy of a member (44 corresponding lines) Terminal.Gui/Views/GraphView/HorizontalAxis.cs
Code Duplication · Edited copies of one member (4 members, 31+ corresponding lines) Terminal.Gui/ViewBase/Adornment/Arranger.cs
Code Duplication · Edited copy of a member (24 corresponding lines) Terminal.Gui/ViewBase/Adornment/ShadowView.cs
Code Duplication · Edited copy of a member (20 corresponding lines) Terminal.Gui/Drawing/Color/Color.cs
Code Duplication · Edited copy of a member (31 corresponding lines) Terminal.Gui/Views/Selectors/SelectorBase.cs
Code Duplication · Edited copy of a member (44 corresponding lines) Terminal.Gui/Drawing/LineCanvas/StraightLine.cs
Code Duplication · Edited copy of a member (41 corresponding lines) Terminal.Gui/ViewBase/View.Command.cs
Code Duplication · Edited copy of a member (51 corresponding lines) Terminal.Gui/Views/ListView/ListView.Movement.cs
Code Duplication · Edited copy of a member (39 corresponding lines) Terminal.Gui/Views/TreeView/TreeView.Navigation.cs
Code Duplication · Edited copy of a member (33 corresponding lines) Terminal.Gui/ViewBase/Layout/Aligner.cs
Code Duplication · Edited copy of a member (30 corresponding lines) Terminal.Gui/Views/GraphView/HorizontalAxis.cs
Code Duplication · Edited copy of a member (36 corresponding lines) Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs
Code Duplication · Edited copy of a member (32 corresponding lines) Terminal.Gui/Views/DropDownList.cs
Code Duplication · Edited copy of a member (40 corresponding lines) Terminal.Gui/Views/Markdown/MarkdownTable.cs
Code Duplication · Edited copy of a member (17 corresponding lines) Terminal.Gui/Views/ImageView/ImageView.Scaling.cs
Code Duplication · Edited copy of a member (31 corresponding lines) Terminal.Gui/App/Popovers/Popover.cs
Code Duplication · Edited copy of a member (34 corresponding lines) Terminal.Gui/Configuration/ConcurrentDictionaryJsonConverter.cs
Code Duplication · Edited copy of a member (33 corresponding lines) Terminal.Gui/App/ApplicationImpl.Run.cs
Code Duplication · Edited copy of a member (40 corresponding lines) Terminal.Gui/Views/StatusBar.cs
Code Duplication · Edited copies of one member (5 members, 29+ corresponding lines) Terminal.Gui/Views/CheckBox.cs
Code Duplication · Edited copy of a member (18 corresponding lines) Terminal.Gui/Views/ImageView/ImageView.cs
Code Duplication · Edited copy of a member (21 corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Movement.cs
Code Duplication · Edited copy of a member (24 corresponding lines) Terminal.Gui/Views/TextInput/TextModel.cs
Code Duplication · Edited copy of a member (35 corresponding lines) Terminal.Gui/ViewBase/View.ScrollBars.cs
Code Duplication · Edited copy of a member (28 corresponding lines) Terminal.Gui/ViewBase/Mouse/View.Mouse.cs
Code Duplication · Edited copy of a member (29 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (32 corresponding lines) Terminal.Gui/Views/TextInput/DateEditor.cs
Code Duplication · Edited copy of a member (31 corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Movement.cs
Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) Terminal.Gui/Views/Color/ColorPicker.16.cs
Code Duplication · Edited copy of a member (23 corresponding lines) Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs
Code Duplication · Edited copy of a member (16 corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs
Code Duplication · Edited copy of a member (26 corresponding lines) Terminal.Gui/Drivers/AnsiHandling/CsiCursorPattern.cs
Code Duplication · Edited copy of a member (25 corresponding lines) Terminal.Gui/Views/TableView/TableView.cs
Code Duplication · Edited copy of a member (22 corresponding lines) Terminal.Gui/Drivers/Output/OutputBase.cs
Code Duplication · Edited copy of a member (32 corresponding lines) Terminal.Gui/Configuration/KeyArrayJsonConverter.cs
Code Duplication · Edited copy of a member (21 corresponding lines) Terminal.Gui/Drivers/WindowsDriver/WindowsOutput.cs
Code Duplication · Edited copy of a member (18 corresponding lines) Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs
Code Duplication · Edited copy of a member (30 corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs
Code Duplication · Edited copy of a member (16 corresponding lines) Terminal.Gui/ViewBase/Layout/DimCombine.cs
Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) Terminal.Gui/Views/TextInput/DateTextProvider.cs
Code Duplication · Edited copy of a member (15 corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs
Code Duplication · Edited copy of a member (12 corresponding lines) Terminal.Gui/Text/StringExtensions.cs
Code Duplication · Edited copy of a member (27 corresponding lines) Terminal.Gui/Testing/InputInjector.cs
Code Duplication · Edited copy of a member (24 corresponding lines) Terminal.Gui/ViewBase/Layout/ViewManipulator.cs
Code Duplication · Edited copy of a member (20 corresponding lines) Terminal.Gui/Views/CharMap/CharMap.cs
Code Duplication · Edited copy of a member (14 corresponding lines) Terminal.Gui/Views/Tabs.cs
Code Duplication · Edited copy of a member (24 corresponding lines) Terminal.Gui/ViewBase/Mouse/View.Mouse.cs
Code Duplication · Edited copy of a member (28 corresponding lines) Terminal.Gui/Views/Wizard/Wizard.cs
Code Duplication · Edited copy of a member (22 corresponding lines) Terminal.Gui/Input/Keyboard/PlatformKeyBinding.cs
Code Duplication · Edited copy of a member (23 corresponding lines) Terminal.Gui/ViewBase/Layout/ViewManipulator.cs
Code Duplication · Edited copy of a member (21 corresponding lines) Terminal.Gui/Drivers/WindowsDriver/WindowsInput.cs
Code Duplication · Edited copy of a member (19 corresponding lines) Terminal.Gui/Input/CommandBridge.cs
Code Duplication · Edited copy of a member (15 corresponding lines) Terminal.Gui/ViewBase/Layout/Aligner.cs
Code Duplication · Edited copy of a member (21 corresponding lines) Terminal.Gui/Views/TextInput/DateTextProvider.cs
Code Duplication · Edited copy of a member (13 corresponding lines) Terminal.Gui/Drivers/AnsiHandling/AnsiResponseParserBase.cs
Code Duplication · Edited copy of a member (16 corresponding lines) Terminal.Gui/FileServices/FileSystemInfoStats.cs
Code Duplication · Edited copy of a member (18 corresponding lines) Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs
Code Duplication · Edited copy of a member (17 corresponding lines) Terminal.Gui/ViewBase/Helpers/StackExtensions.cs
Code Duplication · Edited copy of a member (16 corresponding lines) Terminal.Gui/ViewBase/Layout/Pos.cs
Code Duplication · Edited copy of a member (22 corresponding lines) Terminal.Gui/Drawing/Kitty/KittyGraphicsSupportDetector.cs
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 49 findings
These 49 critical or serious findings were in the previous survey, on 23 October 2026, and are gone from this one.
Exception handling · Swallowed exception (caught, then discarded) Examples/UICatalog/Scenarios/MessageBoxes.cs
Exception handling · Swallowed exception (caught, then discarded) Examples/UICatalog/Scenarios/NumericUpDownDemo.cs
Exception handling · Swallowed exception (caught, then discarded) Examples/UICatalog/Scenarios/NumericUpDownDemo.cs
Exception handling · Swallowed exception (caught, then discarded) Examples/UICatalog/Scenarios/NumericUpDownDemo.cs
Exception handling · Swallowed exception (caught, then discarded) Examples/UICatalog/Scenarios/NumericUpDownDemo.cs
Exception handling · Swallowed exception (caught, then discarded) Examples/UICatalog/Scenarios/NumericUpDownDemo.cs
Exception handling · Swallowed exception (caught, then discarded) Examples/UICatalog/Scenarios/NumericUpDownDemo.cs
Rebuild cost: about €570,000 · Estimate
Cost to rebuild
€190,000 to €950,000, for 3,087 to 10,030 hours of work, about 3.9 person-years for 2 to 8 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 54. 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: 148,422 lines of product code
Comment lines
The estimate prices 106,573 lines. Comment lines count towards the size of 148,422 lines but aren't priced as work.
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.
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 9 FileScopedPragmaDisable finding(s) in Explicit Debt — start with CancelEventArgs.cs, EventArgs.cs, WindowsConsole.cs.
Raises the score by about 7 points · Low effort · Explicit Debt
2
Resolve the 9 NoWarnInCsproj finding(s) in Explicit Debt — start with NativeAotSmoke.csproj (4), AppTestHelpers.XunitHelpers.csproj, PerformanceTests.csproj.
Raises the score by about 7 points · Low effort · Explicit Debt
3
Resolve the 41 EmptyCatchBlock finding(s) in Explicit Debt — start with TerminalDevice.cs (6), FileDialogState.cs (4), TextMateSyntaxHighlighter.cs (3).
Raises the score by about 7 points · Medium effort · Explicit Debt
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 €570,000 to build again, about 3.9 person-years of work. Its weakest lens is Code Health, at 44 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 9 FileScopedPragmaDisable finding(s) in Explicit Debt. Of all the actions in this report, it raises the score most for the work it takes: about 7 points for low effort, because it clears the 9 Explicit Debt 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.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 52,397 lines over the last 90 days, which is about 212,499 lines a year. At that pace, the extra work comes to an estimated 10.6 to 70.8 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
21 modules, with 56 dependencies between them. One loop runs through 10 of the modules, marked above the diagonal.
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.
Terminal.Gui.Text uses Terminal.Gui.ViewBase, so a change to Terminal.Gui.ViewBase can break Terminal.Gui.Text, while a change to Terminal.Gui.Text can't break Terminal.Gui.ViewBase.
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.
10→14 Terminal.Gui.Text uses Terminal.Gui.Driverspart of a loop✕
Connections
1 pair of types, where a type in Terminal.Gui.Text uses a type in Terminal.Gui.Drivers.
Terminal.Gui.Text uses Terminal.Gui.Drivers, so a change to Terminal.Gui.Drivers can break Terminal.Gui.Text, while a change to Terminal.Gui.Text can't break Terminal.Gui.Drivers.
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.
10→15 Terminal.Gui.Text uses Terminal.Gui.Drawingpart of a loop✕
Connections
2 pairs of types, where a type in Terminal.Gui.Text uses a type in Terminal.Gui.Drawing.
Terminal.Gui.Text uses Terminal.Gui.Drawing, so a change to Terminal.Gui.Drawing can break Terminal.Gui.Text, while a change to Terminal.Gui.Text can't break Terminal.Gui.Drawing.
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.
10→18 Terminal.Gui.Text uses Terminal.Gui.Inputpart of a loop✕
Connections
2 pairs of types, where a type in Terminal.Gui.Text uses a type in Terminal.Gui.Input.
Terminal.Gui.Text uses Terminal.Gui.Input, so a change to Terminal.Gui.Input can break Terminal.Gui.Text, while a change to Terminal.Gui.Text can't break Terminal.Gui.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.
Terminal.Gui.FileServices uses Terminal.Gui.Text, so a change to Terminal.Gui.Text can break Terminal.Gui.FileServices, while a change to Terminal.Gui.FileServices can't break Terminal.Gui.Text.
Position
Below the diagonal: Terminal.Gui.FileServices uses a module listed above it, which is the healthy direction.
11→12 Terminal.Gui.FileServices uses Terminal.Gui.Viewspart of a loop✕
Connections
1 pair of types, where a type in Terminal.Gui.FileServices uses a type in Terminal.Gui.Views.
Terminal.Gui.FileServices uses Terminal.Gui.Views, so a change to Terminal.Gui.Views can break Terminal.Gui.FileServices, while a change to Terminal.Gui.FileServices can't break Terminal.Gui.Views.
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→15 Terminal.Gui.FileServices uses Terminal.Gui.Drawingpart of a loop✕
Connections
1 pair of types, where a type in Terminal.Gui.FileServices uses a type in Terminal.Gui.Drawing.
Terminal.Gui.FileServices uses Terminal.Gui.Drawing, so a change to Terminal.Gui.Drawing can break Terminal.Gui.FileServices, while a change to Terminal.Gui.FileServices can't break Terminal.Gui.Drawing.
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→17 Terminal.Gui.FileServices uses Terminal.Gui.Apppart of a loop✕
Connections
1 pair of types, where a type in Terminal.Gui.FileServices uses a type in Terminal.Gui.App.
Terminal.Gui.FileServices uses Terminal.Gui.App, so a change to Terminal.Gui.App can break Terminal.Gui.FileServices, while a change to Terminal.Gui.FileServices can't break Terminal.Gui.App.
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.
Terminal.Gui.Views uses Terminal.Gui.Text, so a change to Terminal.Gui.Text can break Terminal.Gui.Views, while a change to Terminal.Gui.Views can't break Terminal.Gui.Text.
Position
Below the diagonal: Terminal.Gui.Views uses a module listed above it, which is the healthy direction.
Terminal.Gui.Views uses Terminal.Gui.FileServices, so a change to Terminal.Gui.FileServices can break Terminal.Gui.Views, while a change to Terminal.Gui.Views can't break Terminal.Gui.FileServices.
Position
Below the diagonal: Terminal.Gui.Views uses a module listed above it, which is the healthy direction.
12→13 Terminal.Gui.Views uses Terminal.Gui.ViewBasepart of a loop✕
Connections
221 pairs of types, where a type in Terminal.Gui.Views uses a type in Terminal.Gui.ViewBase. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Terminal.Gui.Views uses Terminal.Gui.ViewBase, so a change to Terminal.Gui.ViewBase can break Terminal.Gui.Views, while a change to Terminal.Gui.Views can't break Terminal.Gui.ViewBase.
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→14 Terminal.Gui.Views uses Terminal.Gui.Driverspart of a loop✕
Connections
6 pairs of types, where a type in Terminal.Gui.Views uses a type in Terminal.Gui.Drivers.
Terminal.Gui.Views uses Terminal.Gui.Drivers, so a change to Terminal.Gui.Drivers can break Terminal.Gui.Views, while a change to Terminal.Gui.Views can't break Terminal.Gui.Drivers.
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→15 Terminal.Gui.Views uses Terminal.Gui.Drawingpart of a loop✕
Connections
115 pairs of types, where a type in Terminal.Gui.Views uses a type in Terminal.Gui.Drawing. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Terminal.Gui.Views uses Terminal.Gui.Drawing, so a change to Terminal.Gui.Drawing can break Terminal.Gui.Views, while a change to Terminal.Gui.Views can't break Terminal.Gui.Drawing.
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→17 Terminal.Gui.Views uses Terminal.Gui.Apppart of a loop✕
Connections
104 pairs of types, where a type in Terminal.Gui.Views uses a type in Terminal.Gui.App. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Terminal.Gui.Views uses Terminal.Gui.App, so a change to Terminal.Gui.App can break Terminal.Gui.Views, while a change to Terminal.Gui.Views can't break Terminal.Gui.App.
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→18 Terminal.Gui.Views uses Terminal.Gui.Inputpart of a loop✕
Connections
130 pairs of types, where a type in Terminal.Gui.Views uses a type in Terminal.Gui.Input. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Terminal.Gui.Views uses Terminal.Gui.Input, so a change to Terminal.Gui.Input can break Terminal.Gui.Views, while a change to Terminal.Gui.Views can't break Terminal.Gui.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.
12→19 Terminal.Gui.Views uses (global)part of a loop✕
Connections
2 pairs of types, where a type in Terminal.Gui.Views uses a type in (global).
Terminal.Gui.ViewBase uses Terminal.Gui.Text, so a change to Terminal.Gui.Text can break Terminal.Gui.ViewBase, while a change to Terminal.Gui.ViewBase can't break Terminal.Gui.Text.
Position
Below the diagonal: Terminal.Gui.ViewBase uses a module listed above it, which is the healthy direction.
Terminal.Gui.ViewBase uses Terminal.Gui.Views, so a change to Terminal.Gui.Views can break Terminal.Gui.ViewBase, while a change to Terminal.Gui.ViewBase can't break Terminal.Gui.Views.
Position
Below the diagonal: Terminal.Gui.ViewBase uses a module listed above it, which is the healthy direction.
13→14 Terminal.Gui.ViewBase uses Terminal.Gui.Driverspart of a loop✕
Connections
3 pairs of types, where a type in Terminal.Gui.ViewBase uses a type in Terminal.Gui.Drivers.
Terminal.Gui.ViewBase uses Terminal.Gui.Drivers, so a change to Terminal.Gui.Drivers can break Terminal.Gui.ViewBase, while a change to Terminal.Gui.ViewBase can't break Terminal.Gui.Drivers.
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→15 Terminal.Gui.ViewBase uses Terminal.Gui.Drawingpart of a loop✕
Connections
26 pairs of types, where a type in Terminal.Gui.ViewBase uses a type in Terminal.Gui.Drawing. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Terminal.Gui.ViewBase uses Terminal.Gui.Drawing, so a change to Terminal.Gui.Drawing can break Terminal.Gui.ViewBase, while a change to Terminal.Gui.ViewBase can't break Terminal.Gui.Drawing.
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→17 Terminal.Gui.ViewBase uses Terminal.Gui.Apppart of a loop✕
Connections
29 pairs of types, where a type in Terminal.Gui.ViewBase uses a type in Terminal.Gui.App. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Terminal.Gui.ViewBase uses Terminal.Gui.App, so a change to Terminal.Gui.App can break Terminal.Gui.ViewBase, while a change to Terminal.Gui.ViewBase can't break Terminal.Gui.App.
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→18 Terminal.Gui.ViewBase uses Terminal.Gui.Inputpart of a loop✕
Connections
28 pairs of types, where a type in Terminal.Gui.ViewBase uses a type in Terminal.Gui.Input. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Terminal.Gui.ViewBase uses Terminal.Gui.Input, so a change to Terminal.Gui.Input can break Terminal.Gui.ViewBase, while a change to Terminal.Gui.ViewBase can't break Terminal.Gui.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.
Terminal.Gui.Drivers uses Terminal.Gui.Time, so a change to Terminal.Gui.Time can break Terminal.Gui.Drivers, while a change to Terminal.Gui.Drivers can't break Terminal.Gui.Time.
Position
Below the diagonal: Terminal.Gui.Drivers uses a module listed above it, which is the healthy direction.
Terminal.Gui.Drivers uses Terminal.Gui.ViewBase, so a change to Terminal.Gui.ViewBase can break Terminal.Gui.Drivers, while a change to Terminal.Gui.Drivers can't break Terminal.Gui.ViewBase.
Position
Below the diagonal: Terminal.Gui.Drivers uses a module listed above it, which is the healthy direction.
14→15 Terminal.Gui.Drivers uses Terminal.Gui.Drawingpart of a loop✕
Connections
39 pairs of types, where a type in Terminal.Gui.Drivers uses a type in Terminal.Gui.Drawing. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Terminal.Gui.Drivers uses Terminal.Gui.Drawing, so a change to Terminal.Gui.Drawing can break Terminal.Gui.Drivers, while a change to Terminal.Gui.Drivers can't break Terminal.Gui.Drawing.
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→17 Terminal.Gui.Drivers uses Terminal.Gui.Apppart of a loop✕
Connections
21 pairs of types, where a type in Terminal.Gui.Drivers uses a type in Terminal.Gui.App.
Terminal.Gui.Drivers uses Terminal.Gui.App, so a change to Terminal.Gui.App can break Terminal.Gui.Drivers, while a change to Terminal.Gui.Drivers can't break Terminal.Gui.App.
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→18 Terminal.Gui.Drivers uses Terminal.Gui.Inputpart of a loop✕
Connections
36 pairs of types, where a type in Terminal.Gui.Drivers uses a type in Terminal.Gui.Input. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Terminal.Gui.Drivers uses Terminal.Gui.Input, so a change to Terminal.Gui.Input can break Terminal.Gui.Drivers, while a change to Terminal.Gui.Drivers can't break Terminal.Gui.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.
Terminal.Gui.Drawing uses Terminal.Gui.Views, so a change to Terminal.Gui.Views can break Terminal.Gui.Drawing, while a change to Terminal.Gui.Drawing can't break Terminal.Gui.Views.
Position
Below the diagonal: Terminal.Gui.Drawing uses a module listed above it, which is the healthy direction.
Terminal.Gui.Drawing uses Terminal.Gui.ViewBase, so a change to Terminal.Gui.ViewBase can break Terminal.Gui.Drawing, while a change to Terminal.Gui.Drawing can't break Terminal.Gui.ViewBase.
Position
Below the diagonal: Terminal.Gui.Drawing uses a module listed above it, which is the healthy direction.
Terminal.Gui.Drawing uses Terminal.Gui.Drivers, so a change to Terminal.Gui.Drivers can break Terminal.Gui.Drawing, while a change to Terminal.Gui.Drawing can't break Terminal.Gui.Drivers.
Position
Below the diagonal: Terminal.Gui.Drawing uses a module listed above it, which is the healthy direction.
15→17 Terminal.Gui.Drawing uses Terminal.Gui.Apppart of a loop✕
Connections
2 pairs of types, where a type in Terminal.Gui.Drawing uses a type in Terminal.Gui.App.
Terminal.Gui.Drawing uses Terminal.Gui.App, so a change to Terminal.Gui.App can break Terminal.Gui.Drawing, while a change to Terminal.Gui.Drawing can't break Terminal.Gui.App.
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.
Terminal.Gui.Testing uses Terminal.Gui.Time, so a change to Terminal.Gui.Time can break Terminal.Gui.Testing, while a change to Terminal.Gui.Testing can't break Terminal.Gui.Time.
Position
Below the diagonal: Terminal.Gui.Testing uses a module listed above it, which is the healthy direction.
Terminal.Gui.Testing uses Terminal.Gui.Drivers, so a change to Terminal.Gui.Drivers can break Terminal.Gui.Testing, while a change to Terminal.Gui.Testing can't break Terminal.Gui.Drivers.
Position
Below the diagonal: Terminal.Gui.Testing uses a module listed above it, which is the healthy direction.
16→17 Terminal.Gui.Testing uses Terminal.Gui.Apppart of a loop✕
Connections
1 pair of types, where a type in Terminal.Gui.Testing uses a type in Terminal.Gui.App.
Terminal.Gui.Testing uses Terminal.Gui.App, so a change to Terminal.Gui.App can break Terminal.Gui.Testing, while a change to Terminal.Gui.Testing can't break Terminal.Gui.App.
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→18 Terminal.Gui.Testing uses Terminal.Gui.Inputpart of a loop✕
Connections
10 pairs of types, where a type in Terminal.Gui.Testing uses a type in Terminal.Gui.Input.
Terminal.Gui.Testing uses Terminal.Gui.Input, so a change to Terminal.Gui.Input can break Terminal.Gui.Testing, while a change to Terminal.Gui.Testing can't break Terminal.Gui.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.
Terminal.Gui.App uses Terminal.Gui.Time, so a change to Terminal.Gui.Time can break Terminal.Gui.App, while a change to Terminal.Gui.App can't break Terminal.Gui.Time.
Position
Below the diagonal: Terminal.Gui.App uses a module listed above it, which is the healthy direction.
Terminal.Gui.App uses Terminal.Gui.ViewBase, so a change to Terminal.Gui.ViewBase can break Terminal.Gui.App, while a change to Terminal.Gui.App can't break Terminal.Gui.ViewBase.
Position
Below the diagonal: Terminal.Gui.App uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in Terminal.Gui.App uses a type in Terminal.Gui.Drivers. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Terminal.Gui.App uses Terminal.Gui.Drivers, so a change to Terminal.Gui.Drivers can break Terminal.Gui.App, while a change to Terminal.Gui.App can't break Terminal.Gui.Drivers.
Position
Below the diagonal: Terminal.Gui.App uses a module listed above it, which is the healthy direction.
Terminal.Gui.App uses Terminal.Gui.Drawing, so a change to Terminal.Gui.Drawing can break Terminal.Gui.App, while a change to Terminal.Gui.App can't break Terminal.Gui.Drawing.
Position
Below the diagonal: Terminal.Gui.App uses a module listed above it, which is the healthy direction.
Terminal.Gui.App uses Terminal.Gui.Testing, so a change to Terminal.Gui.Testing can break Terminal.Gui.App, while a change to Terminal.Gui.App can't break Terminal.Gui.Testing.
Position
Below the diagonal: Terminal.Gui.App uses a module listed above it, which is the healthy direction.
17→18 Terminal.Gui.App uses Terminal.Gui.Inputpart of a loop✕
Connections
26 pairs of types, where a type in Terminal.Gui.App uses a type in Terminal.Gui.Input. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Terminal.Gui.App uses Terminal.Gui.Input, so a change to Terminal.Gui.Input can break Terminal.Gui.App, while a change to Terminal.Gui.App can't break Terminal.Gui.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.
Terminal.Gui.Input uses Terminal.Gui.ViewBase, so a change to Terminal.Gui.ViewBase can break Terminal.Gui.Input, while a change to Terminal.Gui.Input can't break Terminal.Gui.ViewBase.
Position
Below the diagonal: Terminal.Gui.Input uses a module listed above it, which is the healthy direction.
Terminal.Gui.Input uses Terminal.Gui.Drivers, so a change to Terminal.Gui.Drivers can break Terminal.Gui.Input, while a change to Terminal.Gui.Input can't break Terminal.Gui.Drivers.
Position
Below the diagonal: Terminal.Gui.Input uses a module listed above it, which is the healthy direction.
Terminal.Gui.Input uses Terminal.Gui.App, so a change to Terminal.Gui.App can break Terminal.Gui.Input, while a change to Terminal.Gui.Input can't break Terminal.Gui.App.
Position
Below the diagonal: Terminal.Gui.Input uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in (global) uses a type in Terminal.Gui.ViewBase.
The types involved
ViewDemoWindow → Terminal.Gui.ViewBase.View
Direction
(global) uses Terminal.Gui.ViewBase, so a change to Terminal.Gui.ViewBase can break (global), while a change to (global) can't break Terminal.Gui.ViewBase.
Position
Below the diagonal: (global) uses a module listed above it, which is the healthy direction.
Terminal.Gui.Configuration uses Terminal.Gui, so a change to Terminal.Gui can break Terminal.Gui.Configuration, while a change to Terminal.Gui.Configuration can't break Terminal.Gui.
Position
Below the diagonal: Terminal.Gui.Configuration uses a module listed above it, which is the healthy direction.
Terminal.Gui.Configuration uses Terminal.Gui.ViewBase, so a change to Terminal.Gui.ViewBase can break Terminal.Gui.Configuration, while a change to Terminal.Gui.Configuration can't break Terminal.Gui.ViewBase.
Position
Below the diagonal: Terminal.Gui.Configuration uses a module listed above it, which is the healthy direction.
Terminal.Gui.Configuration uses Terminal.Gui.Drivers, so a change to Terminal.Gui.Drivers can break Terminal.Gui.Configuration, while a change to Terminal.Gui.Configuration can't break Terminal.Gui.Drivers.
Position
Below the diagonal: Terminal.Gui.Configuration uses a module listed above it, which is the healthy direction.
Terminal.Gui.Configuration uses Terminal.Gui.Drawing, so a change to Terminal.Gui.Drawing can break Terminal.Gui.Configuration, while a change to Terminal.Gui.Configuration can't break Terminal.Gui.Drawing.
Position
Below the diagonal: Terminal.Gui.Configuration uses a module listed above it, which is the healthy direction.
Terminal.Gui.Configuration uses Terminal.Gui.App, so a change to Terminal.Gui.App can break Terminal.Gui.Configuration, while a change to Terminal.Gui.Configuration can't break Terminal.Gui.App.
Position
Below the diagonal: Terminal.Gui.Configuration uses a module listed above it, which is the healthy direction.
Terminal.Gui.Configuration uses Terminal.Gui.Input, so a change to Terminal.Gui.Input can break Terminal.Gui.Configuration, while a change to Terminal.Gui.Configuration can't break Terminal.Gui.Input.
Position
Below the diagonal: Terminal.Gui.Configuration uses a module listed above it, which is the healthy direction.
Terminal.Gui.Tracing uses Terminal.Gui, so a change to Terminal.Gui can break Terminal.Gui.Tracing, while a change to Terminal.Gui.Tracing can't break Terminal.Gui.
Position
Below the diagonal: Terminal.Gui.Tracing uses a module listed above it, which is the healthy direction.
Terminal.Gui.Tracing uses Terminal.Gui.ViewBase, so a change to Terminal.Gui.ViewBase can break Terminal.Gui.Tracing, while a change to Terminal.Gui.Tracing can't break Terminal.Gui.ViewBase.
Position
Below the diagonal: Terminal.Gui.Tracing uses a module listed above it, which is the healthy direction.
Terminal.Gui.Tracing uses Terminal.Gui.Input, so a change to Terminal.Gui.Input can break Terminal.Gui.Tracing, while a change to Terminal.Gui.Tracing can't break Terminal.Gui.Input.
Position
Below the diagonal: Terminal.Gui.Tracing uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 44% · Weak · 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
81
High / Critical
A03:2025 — Software Supply Chain Failures
16
High / Critical
A07:2025 — Authentication Failures
3
High / Critical
A02:2025 — Security Misconfiguration
1
Medium
Roadmap
Top priorities: Resolve the 41 EmptyCatchBlock finding(s) in Explicit Debt — start with TerminalDevice.cs (6), FileDialogState.cs (4), TextMateSyntaxHighlighter.cs (3); Resolve the 9 FileScopedPragmaDisable finding(s) in Explicit Debt — start with CancelEventArgs.cs, EventArgs.cs, WindowsConsole.cs; Resolve the 9 NoWarnInCsproj finding(s) in Explicit Debt — start with NativeAotSmoke.csproj (4), AppTestHelpers.XunitHelpers.csproj, PerformanceTests.csproj.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 9 FileScopedPragmaDisable finding(s) in Explicit Debt — start with CancelEventArgs.cs, EventArgs.cs, WindowsConsole.cs.
Resolve the 9 NoWarnInCsproj finding(s) in Explicit Debt — start with NativeAotSmoke.csproj (4), AppTestHelpers.XunitHelpers.csproj, PerformanceTests.csproj.
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 — 153
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 — 1062
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 — 344
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 2
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 71 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 71 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, 1517 of 1559 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — 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. Coverage NOT MEASURED: this repository runs its tests on Microsoft.Testing.Platform (its global.json opts in), where coverage comes from a coverage extension the test project references — and none is wired up: no build file names `Microsoft.Testing.Extensions.CodeCoverage` or `coverlet.MTP`. The absence of coverage here is therefore not evidence about the suite or about our analyzer environment. Add one of those PackageReferences to the test project(s) (or commit the Cobertura/OpenCover/lcov report your CI produces) and real coverage will be measured. It is excluded from the score rather than counted as a near-zero defect. You can widen what we reach: add the `Microsoft.Testing.Extensions.CodeCoverage` (or `coverlet.MTP`) package to the test projects to enable coverage (or commit the Cobertura/OpenCover/lcov report your CI produces).
D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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 'REDACTED' with message: Repository '' does not have the specified remote 'upstream'; using 'origin' instead.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — 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. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
D23 Boundary Type-Coupling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Large codebase (148,018 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"]`.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `Examples/UICatalog/ScenarioCategory.cs`, `Examples/UICatalog/ScenarioMetadata.cs`, `Examples/UICatalog/Scenarios/Adornments.cs`, `Examples/UICatalog/Scenarios/AnimationScenario/AnimationScenario.cs`, `Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs`, … (+90 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via Dockerfile (Examples/UICatalog/Dockerfile). docker build failed (exit 1) — 23 | >>> COPY ["REDACTED", "Terminal.Gui/"] 24 | RUN dotnet restore "UICatalog/UICatalog.csproj" 25 | COPY . . -------------------- ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 6ef5546e-e75c-4b10-a8cf-5d256af00dfd::y76pjycn4hgvjqrzm14fsjndz: "/REDACTED": not found; runtime evidence skipped.
IC1 Incompleteness & stubs — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 97 further occurrence(s) are not listed individually; the score already reflects all 137.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
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.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 17 further occurrence(s) are not listed individually; the score already reflects all 57.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
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 publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a 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.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
146 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was TextFormatter.Draw at 102. A further 13 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 WindowsKeyConverter.GetScanCodeForKey at 64 — they are counted neither in the figure above nor in this dimension's score. 8 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: Terminal.Gui/Drivers/WindowsDriver/WindowsKeyConverter.cs (WindowsKeyConverter.GetScanCodeForKey at 64), Terminal.Gui/Drivers/AnsiHandling/AnsiKeyboardEncoder.cs (AnsiKeyboardEncoder.GetSpecialKeySequence at 28), Terminal.Gui/Drawing/Color/Color.Formatting.cs (Color.Parse at 22), Terminal.Gui/Views/Selectors/SelectorBase.cs (SelectorBase.OnAccepting at 22), Terminal.Gui/Drawing/Markdown/MarkdownAttributeHelper.cs (MarkdownAttributeHelper.ResolveSegmentAttribute at 21), and 3 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.
+ 141 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with TextFormatter.Draw (cyclomatic 102), TextFormatter.GetDrawRegion (cyclomatic 78), WindowsKeyHelper.MapKey (cyclomatic 72). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cyclomatic Complexity from 6.0 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 213 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cognitive Complexity — start with TextFormatter.Draw (cognitive 237). — Refactoring it lifts Cognitive Complexity from 4.2 to about 5.2/10.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.7 / 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 27 TooManyMethods finding(s) in God Classes — start with View.Layout.cs, TextView.Movement.cs, MarkdownView.Parsing.cs. — One of this dimension's main actionable groups (27 warning-level).
Resolve the 15 MethodTooLong finding(s) in God Classes — start with TextFormatter.cs (3), BorderView.cs, ConsoleKeyMapping.cs. — One of this dimension's main actionable groups (15 warning-level).
Resolve the 9 FileTooLong finding(s) in God Classes — start with TextFormatter.cs, LinearRangeViewBase.cs, OutputBase.cs. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
96 duplicated block group(s) detected. A further 130 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 73 of the 226 are in trees this repository does not ship — vendored, example/demo, project-template, 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.
Edited copy of a member (17 corresponding lines) · ×9Terminal.Gui/Views/ImageView/ImageView.Scaling.cs:37
Edited copy of a member (16 corresponding lines) · ×9Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs:183
Edited copy of a member (18 corresponding lines) · ×6Terminal.Gui/Views/ImageView/ImageView.cs:377
Edited copy of a member (31 corresponding lines) · ×5Terminal.Gui/Views/Selectors/SelectorBase.cs:66
+ 106 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 9 Edited copy of a member (17 corresponding lines) finding(s) in Code Duplication — start with ImageView.Scaling.cs, StackExtensions.cs, OutputBufferImpl.cs. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 9 Edited copy of a member (16 corresponding lines) finding(s) in Code Duplication — start with TextView.Drawing.cs, DimCombine.cs, FileSystemInfoStats.cs. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 7 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with TextFormatter.cs, ImageView.cs, PopoverMenu.cs. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ 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.
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 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with DriverImpl.cs, InputProcessorImpl.cs, View.Layout.cs. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Adequategated by 2 critical findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
17 skipped (16 with a documented reason), 11 zero-assertion, 1 synchronised by a fixed sleep, 1 racing the wall clock, 2 whose failure is swallowed by a catch-all, 3 mock references across 7895 tests.
+ 4 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 AttributeTests.cs. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 No assertions (empty test) finding(s) in Test Quality — start with FlagSelectorTests.cs. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 9 No assertions finding(s) in Test Quality — start with LoggingTests.cs (3), SchemeTests.cs (2), TestContextTests.cs. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: 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 197 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 40 direct `PackageReference`(s), and 158 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution.
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: Terminal.Gui/App/ApplicationImpl.Screen.cs (14×58=812); Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs (24×24=576); Terminal.Gui/Drivers/Output/OutputBase.cs (12×39=468) Repeated repair below the complexity floor: Terminal.Gui/Views/Markdown/Markdown.cs (4 of 6 changes were fixes); Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs (3 of 5 changes were fixes); Terminal.Gui/Views/Shortcut.cs (3 of 3 changes were fixes)
Resolve the 16 Hotspot finding(s) in Churn × Complexity Hotspots — start with ApplicationImpl.Screen.cs, MarkdownView.Parsing.cs, OutputBase.cs. — One of this dimension's main actionable groups (16 warning-level).
Resolve the 6 Repeated repair finding(s) in Churn × Complexity Hotspots — start with Markdown.cs, UnixIOHelper.cs, Shortcut.cs. — One of this dimension's main actionable groups (6 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.3 / 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.
28 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is Terminal.Gui/Drawing/Region.cs. Counted over 392 of the 731 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×2
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.
288 deducted debt markers + unmeasured dead symbols across 148018 LoC in the .NET projects (0.7/KLoC) → score 8.7. Dead code not measured: the solution did not load cleanly, so the reference search was skipped.
+ 8 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 41 EmptyCatchBlock finding(s) in Explicit Debt — start with TerminalDevice.cs (6), FileDialogState.cs (4), TextMateSyntaxHighlighter.cs (3). — One of this dimension's main actionable groups (41 issue-level).
Resolve the 9 FileScopedPragmaDisable finding(s) in Explicit Debt — start with CancelEventArgs.cs, EventArgs.cs, WindowsConsole.cs. — One of this dimension's main actionable groups (9 issue-level).
Resolve the 9 NoWarnInCsproj finding(s) in Explicit Debt — start with NativeAotSmoke.csproj (4), AppTestHelpers.XunitHelpers.csproj, PerformanceTests.csproj. — One of this dimension's main actionable groups (9 issue-level).
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.
20 projects, 1509 source files, 324761 hand-written lines of code (147242 production / 177519 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 743 generated (machine-written code — designer, scaffolded and tool-emitted files — excluded from quality), 32 inter-project edges.
Thin analysable surface across projects: ConsumerLibTests/TestAssets/ConfigPropertyTypeLoad/ConsumerLib/ConsumerLib.csproj
✓ On the Gold path — maintain.
Detailed fixes: d18_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
2 of 2 documentation facets pass in full. 55 document(s) read across 9 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
1 naming inconsistencies among 32 declarations measured against a convention their peers follow.
`ReplaceTABWithSpaces` spells `TAB` where 32 names in the project spell it `Tab`Terminal.Gui/Text/TextFormatter.cs:1376
What to do
Resolve the 1 `ReplaceTABWithSpaces` spells `TAB` where 32 names in the project spell… finding(s) in Naming Consistency — start with TextFormatter.cs. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
doc comments repeat the names · ×8Tests/AppTestHelpers/AppTestHelper.ContextMenu.cs:13
What to do
Resolve the 149 redundant comment finding(s) in Comment Value — start with View.Layout.cs (4), RegionClassTests.cs (4), SchemeTests.cs (4). — One of this dimension's main actionable groups (149 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
2 of 25 projects flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×2REDACTED:1
What to do
Resolve the 2 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with REDACTED, UICatalog.csproj. — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D27 · Navigability8.4 / 10Strong✓ Tool-verified
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
70 % of calls cross a namespace and 10 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: large — vertical-slice locality expected.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 2 High secret finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 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).
81 finding(s): 0 critical, 80 high, 1 medium, 0 low. 57 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 262 file(s) — `Examples/UICatalog/ScenarioCategory.cs` (line 10), `Examples/UICatalog/ScenarioMetadata.cs` (line 9), `Examples/UICatalog/Scenarios/Adornments.cs`, `Examples/UICatalog/Scenarios/AnimationScenario/AnimationScenario.cs` (lines 100–101, line 252), `Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs` (line 336), … (+257 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 192 of those file(s) — `Examples/UICatalog/ScenarioCategory.cs`, `Examples/UICatalog/ScenarioMetadata.cs`, `Examples/UICatalog/Scenarios/AnimationScenario/AnimationScenario.cs`, `Examples/UICatalog/Scenarios/DynamicStatusBar.cs`, `Examples/UICatalog/Scenarios/Images/ConstPalette.cs`, … (+187 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 23 of those file(s) — `Examples/UICatalog/Scenarios/Adornments.cs`, `Examples/UICatalog/Scenarios/CsvEditor.cs`, `Examples/UICatalog/Scenarios/EditorsAndHelpers/LayoutEditor.cs`, `Examples/UICatalog/Scenarios/Notepad.cs`, `Examples/UICatalog/Scenarios/Osc94ProgressIndicator.cs`, … (+18 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 9 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 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7). — One of this dimension's main actionable groups (7 issue-level).
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
No action in Static Analysis (SAST) — all 57 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (57 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 2 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
8 of 392 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Terminal.Gui/Drawing/Gradient.cs. Counted over 392 of the 731 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
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.
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 warning-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 — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (REDACTED 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 REDACTED (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.
A vulnerability-disclosure policy (REDACTED) is present but only routes reports to a public channel (no private reporting contact).
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Vulnerability-disclosure Policy — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d37_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 14 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 singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
`ApplicationImpl` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_inputInjector, _keyboard, _mouse, _driverName, Coordinator, AnsiStartupGate; e.g. `_inputInjector` at line 200). — Terminal.Gui/App/ApplicationImpl.cs:7
`TuiConfigurationBuilder` keeps one instance of itself in the static `Shared`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_runtimeConfig, _configuration, _mergedSourceJson, _rootSettingsCache, _overlaySettingsCache, _themeManager; e.g. `_runtimeConfig` at line 100). — Terminal.Gui/Configuration/Settings/TuiConfigurationBuilder.cs:47
`ScenarioLogCapture` is not registered, but `UICatalog` creates it and keeps it in the static `LogCapture`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_scenarioStartPosition, _hasErrors; e.g. `_scenarioStartPosition` at line 29). — Examples/UICatalog/ScenarioLogCapture.cs:11
`ApplicationMouse` is not registered, but the singleton `ApplicationImpl` creates it and keeps it in `_mouse`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (LastMousePosition, _activePopoverAtPress, _dismissedByMousePress, _isDismissRecursing, _mouseGrabViewRef; e.g. `LastMousePosition` at line 155). — Terminal.Gui/App/Mouse/ApplicationMouse.cs:14
`ApplicationNavigation` is not registered, but the singleton `ApplicationImpl` creates it and keeps it in `<Navigation>k__BackingField`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_focused; e.g. `_focused` at line 92). — Terminal.Gui/App/ApplicationNavigation.cs:7
`ApplicationPopover` is not registered, but the singleton `ApplicationImpl` creates it and keeps it in `<Popovers>k__BackingField`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_popovers, _activePopover; e.g. `_popovers` at line 33). — Terminal.Gui/App/ApplicationPopover.cs:9
`ApplicationToolTip` is not registered, but the singleton `ApplicationImpl` creates it and keeps it in `<ToolTips>k__BackingField`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_registrations, _sharedToolTip, _currentTarget; e.g. `_registrations` at line 109). — Terminal.Gui/App/ApplicationToolTip.cs:21
`InlineResize` is not registered, but the singleton `ApplicationImpl` creates it and keeps it in `_inlineResize`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (ObservedSize, Revision, LastChanged; e.g. `ObservedSize` at line 186). — Terminal.Gui/App/ApplicationImpl.InlineResize.cs:170
`ToolTipHost` is not registered, but the singleton `ApplicationToolTip` creates it and keeps it in `_sharedToolTip`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_contentCommandBridge; e.g. `_contentCommandBridge` at line 90). — Terminal.Gui/App/Popovers/ToolTipHost.cs:19
`Clipboard` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_contents; e.g. `_contents` at line 39). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/App/Clipboard/Clipboard.cs:22
`Logging` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_globalLogger; e.g. `_globalLogger` at line 29). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/App/Logging.cs:18
`AttributeJsonConverter` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_instance; e.g. `_instance` at line 18). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/Configuration/AttributeJsonConverter.cs:7
`ColorJsonConverter` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_instance; e.g. `_instance` at line 27). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/Configuration/ColorJsonConverter.cs:16
`KeyBindingConfiguration` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_appPrior, _viewPrior, _viewTypesPrior; e.g. `_appPrior` at line 27). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/Configuration/Settings/KeyBindingConfiguration.cs:15
`DriverRegistry` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_registry; e.g. `_registry` at line 66). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/Drivers/DriverRegistry.cs:7
`TerminalDevice` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_ownedInputFd, _ownedOutputFd, _ownedInputHandle, _ownedOutputHandle; e.g. `_ownedInputFd` at line 374). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/Drivers/TerminalDevice.cs:25
`SuspendHelper` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_suspendSignal; e.g. `_suspendSignal` at line 50). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/Drivers/UnixHelpers/SuspendHelper.cs:6
`WSLClipboard` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_powershellPath; e.g. `_powershellPath` at line 254). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/Drivers/UnixHelpers/UnixClipboard.cs:181
`UnixTerminalHelper` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_ttyFd, _origTermios, _savedTermios; e.g. `_ttyFd` at line 21). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/Drivers/UnixHelpers/UnixTerminalHelper.cs:7
`MenuBar` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_defaultKeyOverride; e.g. `_defaultKeyOverride` at line 454). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/Views/Menu/MenuBar.cs:69
`PopoverMenu` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_defaultKeyOverride; e.g. `_defaultKeyOverride` at line 315). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/Views/Menu/PopoverMenu.cs:43
`NumericHelper` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_helpers; e.g. `_helpers` at line 519). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Terminal.Gui/Views/NumericUpDown.cs:503
`Scenario` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_maxScenarioNameLen; e.g. `_maxScenarioNameLen` at line 101). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Examples/UICatalog/Scenario.cs:45
`UICatalogRunnable` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_isFirstRunning, CachedRunnableScheme, _cachedCategoryIndex, _cachedScenarioIndex; e.g. `_isFirstRunning` at line 87). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Examples/UICatalog/UICatalogRunnable.cs:15
`DynamicStatusBar` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_app; e.g. `_app` at line 20). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Examples/UICatalog/Scenarios/DynamicStatusBar.cs:11
`TextEffectsScenario` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_loopingGradient; e.g. `_loopingGradient` at line 54). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — Examples/UICatalog/Scenarios/TextEffectsScenario.cs:3
What to do
Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
A `static` field is one slot for the whole process, however its type is created: back it with a thread-safe type (ConcurrentDictionary, Interlocked), take a lock around every write, or move it into a registered singleton that does.
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 (global) ↔ Terminal.Gui.App ↔ Terminal.Gui.Drawing ↔ Terminal.Gui.Drivers ↔ Terminal.Gui.FileServices ↔ Terminal.Gui.Input ↔ Terminal.Gui.Testing ↔ Terminal.Gui.Text ↔ Terminal.Gui.ViewBase ↔ Terminal.Gui.Views depend on each other. The lightest dependency in the cycle is (global) → Terminal.Gui.Input (KeyEqualityComparer → Terminal.Gui.Input.Key, 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. — Terminal.Gui/Input/Keyboard/KeyEqualityComparer.cs:5
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.
`IApplication` declares 48 members: `MainThreadId`, `Init`, `InitializedChanged`, `Initialized`, `ResetState`, `SessionStack`, `SessionBegun`, `TopRunnable`, `TopRunnableView`, `Begin`, `Run`, `RunAsync`, `RunAsync`, `Run`, `RaiseIteration`, `Iteration`, `Invoke`, `Invoke`, `StopAfterFirstIteration`, `RequestStop`, `RequestStop`, `End`, `SessionEnded`, `GetResult`, `GetResult`, `Driver`, `AnsiStartupGate`, `Clipboard`, `ForceDriver`, `AppModel`, `ForceInlinePosition`, `Screen`, `ScreenChanged`, `ClearScreenNextIteration`, `GetInputInjector`, `Keyboard`, `Mouse`, `Paste`, `RaisePasteEvent`, `LayoutAndDraw`, and 8 more. 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 48 declarations carry 43 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 43 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. — Terminal.Gui/App/IApplication.cs:16
`IDriver` declares 63 members: `Init`, `Refresh`, `GetName`, `Suspend`, `IsLegacyConsole`, `GetInputProcessor`, `GetOutputBuffer`, `GetOutput`, `Clipboard`, `ProgressIndicator`, `AnsiStartupGate`, `Screen`, `SetScreenSize`, `SizeChanged`, `Cols`, `Rows`, `Left`, `Top`, `InlinePosition`, `AppModel`, `SixelSupport`, `SixelSupportChanged`, `SetSixelSupport`, `KittyGraphicsSupport`, `KittyGraphicsSupportChanged`, `SetKittyGraphicsSupport`, `SupportsTrueColor`, `Force16Colors`, `DefaultAttribute`, `DefaultAttributeChanged`, `ColorCapabilities`, `Contents`, `Clip`, `ClearContents`, `ClearedContents`, `Col`, `Row`, `CurrentAttribute`, `CurrentUrl`, `Move`, and 23 more. 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 63 declarations carry 62 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 62 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. — Terminal.Gui/Drivers/IDriver.cs:6
`IOutputBuffer` declares 26 members: `AddRune`, `AddRune`, `AddStr`, `ClearContents`, `DirtyLines`, `Clip`, `Col`, `Cols`, `Contents`, `CurrentAttribute`, `FillRect`, `FillRect`, `IsValidLocation`, `Left`, `Move`, `AddRasterImage`, `RemoveRasterImage`, `RetainRasterImages`, `GetRasterImages`, `Row`, `Rows`, `CurrentUrl`, `GetCellUrl`, `SetSize`, `Top`, `SetWideGlyphReplacement`. 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 26 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. — Terminal.Gui/Drivers/Output/IOutputBuffer.cs:23
`IAutocomplete` declares 18 members: `ClearSuggestions`, `CloseKey`, `Scheme`, `Context`, `GenerateSuggestions`, `HostControl`, `MaxHeight`, `MaxWidth`, `OnMouseEvent`, `PopupInsideContainer`, `ProcessKey`, `RenderOverlay`, `Reopen`, `SelectedIdx`, `SelectionKey`, `SuggestionGenerator`, `Suggestions`, `Visible`. 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. — Terminal.Gui/Views/Autocomplete/IAutocomplete.cs:10
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
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.
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. (×3) — Terminal.Gui/Drivers/DotNetDriver/NetInput.cs:101, Terminal.Gui/ViewBase/Adornment/AdornmentView.cs:47, Examples/UICatalog/Scenarios/ListViewWithSelection.cs:218
A placeholder string ("Lorem Ipsum") is still in shipped code — typical of generated boilerplate that was never filled in. — Examples/UICatalog/Scenarios/ColorPicker.cs:93
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.
`FormatNavigation` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — Terminal.Gui/App/Tracing/LoggingBackend.cs:38
`FormatLifecycle` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — Terminal.Gui/App/Tracing/LoggingBackend.cs:40
`InjectInput` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — Terminal.Gui/Drivers/DotNetDriver/NetInput.cs:101
Control only reaches here when `graphemes.Count - zeroLength > width` is false, because the guard on line 1831 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test. (×2) — Terminal.Gui/Text/TextFormatter.cs:1894, Terminal.Gui/Text/TextFormatter.cs:1903
Control only reaches here when `disposing` is true, because the guard on line 107 exits otherwise. This test is therefore always true and its `else`, and any code it is meant to skip, is unreachable. Implement the distinction that was intended, or delete the test. — Terminal.Gui/ViewBase/View.cs:132
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. — Terminal.Gui/Views/ScrollBar/ScrollBar.cs:136
A test is skipped with reason "Flaky test causing random GitHub workflow failures - see issue" — the behavior it asserts is UNVERIFIED and this skip is likely the only marker of a real bug. It ages invisibly: fix the flakiness or track the bug somewhere that can't be forgotten. — Tests/UnitTestsParallelizable/Input/InputProcessorImplTests.cs:49
A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×32) — Terminal.Gui/App/Application.cs:75, Terminal.Gui/App/ApplicationImpl.Lifecycle.cs:199, Terminal.Gui/App/ApplicationImpl.cs:107, …
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 repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Describe the projects a newcomer cannot place from the root README: 3 of 11 have no README of their own, in their folder or in their family's project (`Terminal.Gui.Analyzers.Internal`, `Terminal.Gui.Interop.Spectre`, `docfx/scripts/OutputView`).
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
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 & versioning9.7 / 10Exemplary✓ Tool-verified
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code 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.
1 public type in `Terminal.Gui.App` is marked as implementation by its own namespace, folder or name: `PopoverImpl` (Terminal.Gui/App/Popovers/PopoverImpl.cs:44, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — Terminal.Gui/App/Popovers/PopoverImpl.cs:44
4 public types in `Terminal.Gui.Drivers` are marked as implementation by their own namespace, folder or name: `ComponentFactoryImpl` (Terminal.Gui/Drivers/ComponentFactoryImpl.cs:8, name ends in `Impl`), `InputImpl` (Terminal.Gui/Drivers/Input/InputImpl.cs:11, name ends in `Impl`), `InputProcessorImpl` (Terminal.Gui/Drivers/Input/InputProcessorImpl.cs:10, name ends in `Impl`), `OutputBufferImpl` (Terminal.Gui/Drivers/Output/OutputBufferImpl.cs:11, name ends in `Impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — Terminal.Gui/Drivers/ComponentFactoryImpl.cs:8
1 public type in `Terminal.Gui.ViewBase` is marked as implementation by its own namespace, folder or name: `AdornmentImpl` (Terminal.Gui/ViewBase/Adornment/AdornmentImpl.cs:9, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — Terminal.Gui/ViewBase/Adornment/AdornmentImpl.cs:9
`Terminal.Gui.App.CWPWorkflowHelper` (Terminal.Gui/App/CWP/CWPWorkflowHelper.cs:16) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/App/CWP/CWPWorkflowHelper.cs:16
`Terminal.Gui.App.IApplicationInlineOutput` (Terminal.Gui/App/IApplicationInlineOutput.cs:4) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/App/IApplicationInlineOutput.cs:4
`Terminal.Gui.Tracing.LoggingBackend` (Terminal.Gui/App/Tracing/LoggingBackend.cs:6) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/App/Tracing/LoggingBackend.cs:6
`Terminal.Gui.Configuration.KeyArrayJsonConverter` (Terminal.Gui/Configuration/KeyArrayJsonConverter.cs:10) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/Configuration/KeyArrayJsonConverter.cs:10
`Terminal.Gui.Configuration.MouseFlagsArrayJsonConverter` (Terminal.Gui/Configuration/MouseFlagsArrayJsonConverter.cs:10) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/Configuration/MouseFlagsArrayJsonConverter.cs:10
`Terminal.Gui.Drawing.ICustomColorFormatter` (Terminal.Gui/Drawing/Color/ICustomColorFormatter.cs:4) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/Drawing/Color/ICustomColorFormatter.cs:4
`Terminal.Gui.Drivers.Ss3Pattern` (Terminal.Gui/Drivers/AnsiHandling/Ss3Pattern.cs:9) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/Drivers/AnsiHandling/Ss3Pattern.cs:9
`Terminal.Gui.Drivers.TerminalColorDetector` (Terminal.Gui/Drivers/AnsiHandling/TerminalColorDetector.cs:7) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/Drivers/AnsiHandling/TerminalColorDetector.cs:7
`Terminal.Gui.Drivers.IWindowsInput` (Terminal.Gui/Drivers/WindowsDriver/IWindowsInput.cs:6) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/Drivers/WindowsDriver/IWindowsInput.cs:6
`Terminal.Gui.Drivers.WindowsComponentFactory` (Terminal.Gui/Drivers/WindowsDriver/WindowsComponentFactory.cs:9) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/Drivers/WindowsDriver/WindowsComponentFactory.cs:9
`KeyEqualityComparer` (Terminal.Gui/Input/Keyboard/KeyEqualityComparer.cs:5) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/Input/Keyboard/KeyEqualityComparer.cs:5
`Terminal.Gui.ViewBase.IValueParser` (Terminal.Gui/ViewBase/IValueParser.cs:16) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/ViewBase/IValueParser.cs:16
`Terminal.Gui.Views.LineF` (Terminal.Gui/Views/GraphView/LineF.cs:4) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/Views/GraphView/LineF.cs:4
`Terminal.Gui.Views.LinearRangeDefaults` (Terminal.Gui/Views/LinearRange/LinearRangeDefaults.cs:8) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/Views/LinearRange/LinearRangeDefaults.cs:8
`Terminal.Gui.Views.TextFieldAutocomplete` (Terminal.Gui/Views/TextInput/TextField/TextFieldAutocomplete.cs:7) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/Views/TextInput/TextField/TextFieldAutocomplete.cs:7
`Terminal.Gui.Views.TreeNodeBuilder` (Terminal.Gui/Views/TreeView/TreeNodeBuilder.cs:4) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — Terminal.Gui/Views/TreeView/TreeNodeBuilder.cs:4
What to do
Hide `Terminal.Gui.App` (`PopoverImpl`) (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `Terminal.Gui.Drivers` (`ComponentFactoryImpl`, `InputImpl`, `InputProcessorImpl`, `OutputBufferImpl`) (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `Terminal.Gui.ViewBase` (`AdornmentImpl`) (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Make `Terminal.Gui.App.CWPWorkflowHelper` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.App.IApplicationInlineOutput` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.Tracing.LoggingBackend` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.Configuration.KeyArrayJsonConverter` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.Configuration.MouseFlagsArrayJsonConverter` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.Drawing.ICustomColorFormatter` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.Drivers.Ss3Pattern` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.Drivers.TerminalColorDetector` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.Drivers.IWindowsInput` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.Drivers.WindowsComponentFactory` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `KeyEqualityComparer` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.ViewBase.IValueParser` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.Views.LineF` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.Views.LinearRangeDefaults` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.Views.TextFieldAutocomplete` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `Terminal.Gui.Views.TreeNodeBuilder` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · Readiness — Whether 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 · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`new ()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. (×2) — Examples/UICatalog/Scenarios/Deepdives.cs:17, Terminal.Gui/Views/CharMap/UcdApiClient.cs:9
What to do
Give every outbound call a bound the caller can rely on: set an explicit `HttpClient.Timeout` (or pass a `CancellationToken` from a `CancellationTokenSource` with a deadline) and flow the caller's own `CancellationToken` through, so a slow endpoint fails fast instead of hanging.
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 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 each language's code 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.
6 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).
`.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) — Terminal.Gui/App/ApplicationImpl.Driver.cs:107, Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs:106, Terminal.Gui/App/MainLoop/MainLoopCoordinator.cs:177, …
`.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). — Examples/UICatalog/Scenarios/InlineTranscript.cs:92
What to do
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
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.
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. (×5) — Terminal.Gui/App/ApplicationImpl.Driver.cs:107, Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs:106, Examples/UICatalog/Scenarios/AnimationScenario/AnimationScenario.cs:92, …
`.Wait(…)` blocks this thread until the task completes or the bound expires — sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters). (×2) — Terminal.Gui/Drivers/Input/InputImpl.cs:76, Terminal.Gui/Views/FileDialogs/FileDialog.cs:557
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. — Terminal.Gui/Views/ImageView/ImageView.Render.cs:300
`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. (×2) — Examples/UICatalog/Scenarios/Threading.cs:223, Examples/UICatalog/Scenarios/Threading.cs:272
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 stream5.2 / 10Adequate✓ Tool-verified
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.
`RedirectStandardError` is set here, but `StandardError` is not being read when `StandardOutput` is read to the end — it is never read, read only later, or read only in part. The child blocks as soon as it fills the StandardError pipe (~4 KB, never more than 64 KB), so it never finishes and never exits, and the read or wait above never returns: a `WaitForExit` timeout after a read does not help: the timeout bounds the WAIT, not the read that precedes it. Drain every redirected stream before blocking on the child — read one on a background thread (`BeginErrorReadLine()` with its `DataReceived` handler, or a `Task` running `ReadToEndAsync()` started before the other read and awaited after it) — or stop redirecting the stream you do not consume. — REDACTED:39
What to do
Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
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 document3.5 / 10Weak✓ Tool-verified
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.
`DeepMerge` is public and takes the `JsonObject` from its caller, and it calls itself at line 20 with a child of the node it was given — and nowhere in `DeepMerge` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `DeepMerge` can intervene. Thread a depth argument through `DeepMerge` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack. — Terminal.Gui/Configuration/Settings/JsonMerge.cs:20
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
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.
`_cancellationTokenSource` (line 12) holds a `CancellationTokenSource` that `ConsoleInputSource` acquires itself — every assignment to it is a call that opens or creates a new instance for the caller to own — and nothing in `ConsoleInputSource` ever releases it: the type is not `IDisposable`, declares no `Dispose`, and every other mention of `_cancellationTokenSource` only reads through it, so it is never disposed, closed, returned or handed on. Whatever it opened (a connection, a channel, a file) stays open until finalization if the type has a finalizer and until the process ends if it does not, once per instance of `ConsoleInputSource`. Implement `IDisposable` and release `_cancellationTokenSource` there, or take the instance from the caller so its owner ends it. — Terminal.Gui/Drivers/Input/ConsoleInputSource.cs:12
`BorderView` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_titleView` itself (line 689), which makes that instance its own. But `_titleView` is named in none of the methods the disposal search covered: `Dispose` (line 1224), `DisposeBorderTitleHooks` (line 139) — 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` (`_titleView?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/ViewBase/Adornment/BorderView.cs:689
`AttributePicker` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_sampleLabel` itself (line 54), which makes that instance its own. But `_sampleLabel` is named in none of the methods the disposal search covered: `Dispose` (line 234) — 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` (`_sampleLabel?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/Color/AttributePicker.cs:54
`lc` is a `LineCanvas`, which implements `IDisposable`, and it is created here (line 346). Every use of it in `DrawFocusRect` 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 lc = …;`), which releases it at the end of the scope on every path including a throw. — Terminal.Gui/Views/Color/ColorPicker.16.cs:346
`DropDownList` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_toggleButton` itself (line 114), which makes that instance its own. But `_toggleButton` is named in none of the methods the disposal search covered: `Dispose` (line 607) — 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` (`_toggleButton?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/DropDownList.cs:114
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_btnBack` itself (line 32), which makes that instance its own. But `_btnBack` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_btnBack?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:32
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_btnForward` itself (line 34), which makes that instance its own. But `_btnForward` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_btnForward?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:34
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_btnCancel` itself (line 35), which makes that instance its own. But `_btnCancel` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_btnCancel?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:35
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_btnOk` itself (line 50), which makes that instance its own. But `_btnOk` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_btnOk?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:50
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_btnUp` itself (line 51), which makes that instance its own. But `_btnUp` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_btnUp?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:51
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_spinnerView` itself (line 53), which makes that instance its own. But `_spinnerView` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_spinnerView?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:53
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_tableViewContainer` itself (line 54), which makes that instance its own. But `_tableViewContainer` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_tableViewContainer?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:54
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_tableView` itself (line 55), which makes that instance its own. But `_tableView` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_tableView?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:55
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_tbFind` itself (line 56), which makes that instance its own. But `_tbFind` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_tbFind?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:56
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_tbPath` itself (line 57), which makes that instance its own. But `_tbPath` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_tbPath?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:57
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_btnTreeToggle` itself (line 58), which makes that instance its own. But `_btnTreeToggle` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_btnTreeToggle?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:58
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_treeView` itself (line 59), which makes that instance its own. But `_treeView` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_treeView?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:59
`FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_typeFilterDropDown` itself (line 61), which makes that instance its own. But `_typeFilterDropDown` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_typeFilterDropDown?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Terminal.Gui/Views/FileDialogs/FileDialog.cs:61
`dt` is a `DataTable`, which implements `IDisposable`, and it is created here (line 167). Every use of it in `DisplayResultsUI` 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 dt = …;`), which releases it at the end of the scope on every path including a throw. — Examples/UICatalog/Runner.cs:167
`_adornmentsEditor` is a `AdornmentsEditor` this type creates itself, and here (line 81) a new instance is written over it — but `Main` itself reads through `_adornmentsEditor` before replacing it, so it expects an instance to be there, and nothing earlier in `Main` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_adornmentsEditor?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — Examples/UICatalog/Scenarios/AllViewsTester.cs:81
`timer` is a `Timer`, which implements `IDisposable`, and it is created here (line 74). Every use of it in `Main` 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 timer = …;`), which releases it at the end of the scope on every path including a throw. — Examples/UICatalog/Scenarios/Arrangement.cs:74
`progressTimer` is a `Timer`, which implements `IDisposable`, and it is created here (line 95). Every use of it in `Main` 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 progressTimer = …;`), which releases it at the end of the scope on every path including a throw. — Examples/UICatalog/Scenarios/Clipping.cs:95
`_allowMultiSelectionCheckBox` is a `CheckBox` this type creates itself, and here (line 98) a new instance is written over it — but `Main` itself reads through `_allowMultiSelectionCheckBox` before replacing it, so it expects an instance to be there, and nothing earlier in `Main` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_allowMultiSelectionCheckBox?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — Examples/UICatalog/Scenarios/CollectionNavigatorTester.cs:98
`_statusShortcut` is a `Shortcut` this type creates itself, and here (line 92) a new instance is written over it — but `Main` itself reads through `_statusShortcut` before replacing it, so it expects an instance to be there, and nothing earlier in `Main` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_statusShortcut?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — Examples/UICatalog/Scenarios/Deepdives.cs:92
`sw` is a `StreamWriter`, which implements `IDisposable`, and it is created here (line 145). Every use of it in `CreateDemoFile` 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 sw = …;`), which releases it at the end of the scope on every path including a throw. — Examples/UICatalog/Scenarios/HexEditor.cs:145
`timer` is a `Timer`, which implements `IDisposable`, and it is created here (line 394). Every use of it in `HandleOnIsRunningChanged` 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 timer = …;`), which releases it at the end of the scope on every path including a throw. — Examples/UICatalog/Scenarios/Shortcuts.cs:394
`canvas` is a `LineCanvas`, which implements `IDisposable`, and it is created here (line 332). Every use of it in `OnDrawingContent` 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 canvas = …;`), which releases it at the end of the scope on every path including a throw. — Examples/UICatalog/Scenarios/Snake.cs:332
`TableEditor` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_tableView` itself (line 172), which makes that instance its own. But `_tableView` is named in none of the methods the disposal search covered: `Dispose` (line 326) — 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` (`_tableView?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — Examples/UICatalog/Scenarios/TableEditor.cs:172
`tableView` is a `TableView` this type creates itself, and here (line 58) a new instance is written over it — but `Main` itself reads through `tableView` before replacing it, so it expects an instance to be there, and nothing earlier in `Main` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`tableView?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — Examples/UICatalog/Scenarios/TableViewTest.cs:58
`_itemsList` is a `ListView` this type creates itself, and here (line 77) a new instance is written over it — but `Main` itself reads through `_itemsList` before replacing it, so it expects an instance to be there, and nothing earlier in `Main` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_itemsList?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — Examples/UICatalog/Scenarios/Threading.cs:77
`loggerFactory` is a `ILoggerFactory`, which implements `IDisposable`, and it is created here (line 277). Every use of it in `CreateLogger` 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 loggerFactory = …;`), which releases it at the end of the scope on every path including a throw. — Examples/UICatalog/UICatalog.cs:277
`markdownView` is a `Markdown`, which implements `IDisposable`, and it is created here (line 362). Every use of it in `RenderMarkdown` 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 markdownView = …;`), which releases it at the end of the scope on every path including a throw. — Examples/UICatalog/UICatalog.cs:362
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 0/16 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. (×14) — Terminal.Gui/App/MainLoop/MainLoopCoordinator.cs:61, Terminal.Gui/Views/CharMap/UcdApiClient.cs:11, Terminal.Gui/Views/CharMap/UcdApiClient.cs:19, …
Queues or hands on an async lambda whose work calls something that takes a CancellationToken, while neither this method nor the delegate supplies one — that work can't be stopped early once started. Take a CancellationToken here and let the lambda capture it, or use a delegate that is handed one (`Func<CancellationToken, Task>`). — Examples/UICatalog/Scenarios/TextInputControls.cs:402
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. — Examples/UICatalog/Scenarios/Threading.cs:223
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.
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 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.
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.
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 element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`catch (Exception)` 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) — Terminal.Gui/App/Clipboard/Clipboard.cs:42, Terminal.Gui/App/Clipboard/Clipboard.cs:62
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. (×33) — Terminal.Gui/Configuration/Settings/TuiConfigurationBuilder.cs:320, Terminal.Gui/Configuration/Settings/TuiConfigurationBuilder.cs:443, Terminal.Gui/Drawing/Markdown/TextMateSyntaxHighlighter.cs:363, …
`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. (×2) — Terminal.Gui/Drivers/AnsiDriver/AnsiInput.cs:335, Terminal.Gui/Drivers/WindowsDriver/WindowsOutput.cs:551
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). (×3) — Terminal.Gui/Drivers/AnsiDriver/AnsiInput.cs:393, Terminal.Gui/Drivers/DotNetDriver/NetInput.cs:94, Terminal.Gui/Drivers/WindowsDriver/WindowsInput.cs:127
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether 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 `package.json` 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.
Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it. (×7) — Terminal.Gui/App/Logging.cs:83, Terminal.Gui/App/Logging.cs:95, Terminal.Gui/App/Logging.cs:107, …
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.
7/11 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.
~2.2 `!` suppressions per 1k syntax nodes — 1149 suppression(s) across the 532214 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. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
What to do
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 — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
P12 CI test-gate honesty — 2 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 — 29 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 43 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — no DI registrations 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
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 1) — 23 | >>> COPY ["REDACTED", "Terminal.Gui/"] 24 | RUN dotnet restore "UICatalog/UICatalog.csproj" 25 | COPY . . -------------------- ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 6ef5546e-e75c-4b10-a8cf-5d256af00dfd::y76pjycn4hgvjqrzm14fsjndz: "/REDACTED": not found; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
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
D32 Data Compliance (PII/GDPR) — 95 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
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 — no coverage collector is wired up
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (14 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows 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.
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
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
EmptyCatchBlock Examples/UICatalog/Scenarios/Deepdives.cs:396— 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 Examples/UICatalog/Scenarios/Deepdives.cs:409— 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 Examples/UICatalog/Scenarios/EditorsAndHelpers/DimEditor.cs:114— 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 Examples/UICatalog/Scenarios/EditorsAndHelpers/PosEditor.cs:109— 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 Terminal.Gui/Configuration/Settings/TuiConfigurationBuilder.cs:320— 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 Terminal.Gui/Configuration/Settings/TuiConfigurationBuilder.cs:443— 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 Terminal.Gui/Drawing/Markdown/TextMateSyntaxHighlighter.cs:363— 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 Terminal.Gui/Drawing/Markdown/TextMateSyntaxHighlighter.cs:380— 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 Terminal.Gui/Drawing/Markdown/TextMateSyntaxHighlighter.cs:421— 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 Terminal.Gui/Drivers/AnsiDriver/AnsiInput.cs:393— 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 Terminal.Gui/Drivers/AnsiDriver/AnsiTerminalHelper.cs:31— 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 Terminal.Gui/Drivers/DotNetDriver/NetInput.cs:64— 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 Terminal.Gui/Drivers/DotNetDriver/NetInput.cs:94— 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 Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs:32— 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 Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs:208— 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 Terminal.Gui/Drivers/Input/ConsoleInputSource.cs:56— 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 Terminal.Gui/Drivers/TerminalDevice.cs:198— 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 Terminal.Gui/Drivers/TerminalDevice.cs:210— 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 Terminal.Gui/Drivers/TerminalDevice.cs:369— 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 Terminal.Gui/Drivers/TerminalDevice.cs:387— 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 Terminal.Gui/Drivers/TerminalDevice.cs:401— 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 Terminal.Gui/Drivers/TerminalDevice.cs:415— 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 Terminal.Gui/Drivers/UnixHelpers/UnixClipboard.cs:77— 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 Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs:479— 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 Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs:541— 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.
FileScopedPragmaDisable Terminal.Gui/App/CWP/CancelEventArgs.cs:5— #pragma warning disable CS1711 — 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 Terminal.Gui/App/CWP/EventArgs.cs:3— #pragma warning disable CS1711 — 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 Terminal.Gui/Drivers/WindowsDriver/WindowsConsole.cs:7— #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member — 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/AppTestHelpers/AppTestHelper.ContextMenu.cs:3— #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member — 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/AppTestHelpers/AppTestHelper.Input.cs:5— #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member — 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/AppTestHelpers/AppTestHelper.Navigation.cs:1— #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member — 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/AppTestHelpers/AppTestHelper.ViewBase.cs:1— #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member — 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/AppTestHelpers/AppTestHelper.cs:8— #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member — 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/UnitTestsParallelizable/Views/TableViewBaselineTests.cs:10— #pragma warning disable xUnit2012 — 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 Tests/AppTestHelpers.XunitHelpers/AppTestHelpers.XunitHelpers.csproj:10— CS8714 — 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/NativeAotSmoke/NativeAotSmoke.csproj:8— IL2026 — 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/NativeAotSmoke/NativeAotSmoke.csproj:8— IL3050 — 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/NativeAotSmoke/NativeAotSmoke.csproj:8— IL2123 — 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/NativeAotSmoke/NativeAotSmoke.csproj:8— IL3057 — 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/PerformanceTests/PerformanceTests.csproj:16— AD0001 — 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/UnitTests.Legacy/UnitTests.Legacy.csproj:15— AD0001 — 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/UnitTests.NonParallelizable/UnitTests.NonParallelizable.csproj:15— AD0001 — 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/UnitTestsParallelizable/UnitTests.Parallelizable.csproj:15— AD0001 — 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.
WriteOnlyPrivateField Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs:25— private OptionSelector? _unicodeCategorySelector — 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 Terminal.Gui/Drivers/AnsiHandling/AnsiKeyboardParserPattern.cs:29— private string _name — 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/UnitTestsParallelizable/Resources/ResourceManagerTests.cs:33— private string? _stringsTranslatedKey — 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/UnitTestsParallelizable/Views/IListDataSourceTests.cs:13— private ITestOutputHelper _output — 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.
AnalyzerSeverityNone .editorconfig:85— CS0612 — this rule is switched off for every file the section matches, in every project under this directory, and the only record that it was ever switched off is this line: nothing at the sites it would have reported says so, so a reader of that code has no reason to look here, and code added years from now inherits the decision silently. Fix what the rule reports and delete the entry, or — where some sites really are legitimate — leave the rule on and suppress it at those sites with their reasons, so it keeps protecting the rest of the tree. If the rule is genuinely unwanted here, say why — on this line after the entry, or in the comment run directly above it: a comment that only repeats the rule's own title is read as no explanation at all and leaves this row in place.
AnalyzerSeverityNone .editorconfig:86— CS0618 — this rule is switched off for every file the section matches, in every project under this directory, and the only record that it was ever switched off is this line: nothing at the sites it would have reported says so, so a reader of that code has no reason to look here, and code added years from now inherits the decision silently. Fix what the rule reports and delete the entry, or — where some sites really are legitimate — leave the rule on and suppress it at those sites with their reasons, so it keeps protecting the rest of the tree. If the rule is genuinely unwanted here, say why — on this line after the entry, or in the comment run directly above it: a comment that only repeats the rule's own title is read as no explanation at all and leaves this row in place.
AnalyzerSeverityNone .editorconfig:97— CS0672 — this rule is switched off for every file the section matches, in every project under this directory, and the only record that it was ever switched off is this line: nothing at the sites it would have reported says so, so a reader of that code has no reason to look here, and code added years from now inherits the decision silently. Fix what the rule reports and delete the entry, or — where some sites really are legitimate — leave the rule on and suppress it at those sites with their reasons, so it keeps protecting the rest of the tree. If the rule is genuinely unwanted here, say why — on this line after the entry, or in the comment run directly above it: a comment that only repeats the rule's own title is read as no explanation at all and leaves this row in place.
Namespace dependency cycle Terminal.Gui/Input/Keyboard/KeyEqualityComparer.cs:5— The namespaces (global) ↔ Terminal.Gui.App ↔ Terminal.Gui.Drawing ↔ Terminal.Gui.Drivers ↔ Terminal.Gui.FileServices ↔ Terminal.Gui.Input ↔ Terminal.Gui.Testing ↔ Terminal.Gui.Text ↔ Terminal.Gui.ViewBase ↔ Terminal.Gui.Views depend on each other. The lightest dependency in the cycle is (global) → Terminal.Gui.Input (KeyEqualityComparer → Terminal.Gui.Input.Key, 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.
Assertions commented out: Make_SetsNotInitialized_NoDriver Tests/UnitTestsParallelizable/Drawing/AttributeTests.cs:295— 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.
D10 · Test Quality· No assertions (empty test) · ×1
No assertions (empty test): Mouse_DoubleClick_Accepts Tests/UnitTestsParallelizable/Views/FlagSelectorTests.cs:469— Test method has an empty body — it asserts nothing and exercises no code.
TodoComment Examples/UICatalog/Scenarios/Adornments.cs:87— // TODO: Use Dim.Auto — 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 Examples/UICatalog/Scenarios/AllViewsTester.cs:200— // TODO: Add Command.HotKey handler (pop a message box?) — 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 Examples/UICatalog/Scenarios/AnsiRequestsScenario.cs:167— // TODO: This UI would be cleaner/less rigid if Pos.Align were used — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Examples/UICatalog/Scenarios/AnsiRequestsScenario.cs:385— // 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 Examples/UICatalog/Scenarios/Arrangement.cs:104— // TODO: move this logic into `View.ShowHide()` or similar — 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 Examples/UICatalog/Scenarios/Arrangement.cs:118— // TODO: move this logic into `View.ShowHide()` or similar — 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 Examples/UICatalog/Scenarios/Navigation.cs:124— // TODO: move this logic into `View.ShowHide()` or similar — 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 Examples/UICatalog/Scenarios/Navigation.cs:138— // TODO: move this logic into `View.ShowHide()` or similar — 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 Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs:349— // TODO: Add a "None" option — 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 Examples/UICatalog/Scenarios/LineDrawing.cs:220— // TODO: #2616 - Support combining sequences that don't normalize
TodoComment Terminal.Gui/ViewBase/View.Drawing.LineCanvas.cs:58— // TODO: #2616 - Support combining sequences that don't normalize
TodoComment Examples/UICatalog/Scenarios/MenuBars.cs:112— // BUGBUG: This is due to TODO's in PopoverMenu where key bindings are not — 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 Examples/UICatalog/Scenarios/Progress.cs:261— // TODO: Great use of Dim.Auto — 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 Examples/UICatalog/Scenarios/ProgressBarStyles.cs:11— // TODO: Add enable/disable to show that that is working — 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 Examples/UICatalog/Scenarios/ProgressBarStyles.cs:12— // TODO: Clean up how FramesEditor works — 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 Examples/UICatalog/Scenarios/ProgressBarStyles.cs:13— // TODO: Better align rpPBFormat — 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 Examples/UICatalog/Scenarios/TableViewTest.cs:122— //ToDo: Investigate why this is needed to refresh the TableView layout — 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 Examples/UICatalog/Scenarios/TextInputControls.cs:86— // TODO: Editor does not yet expose an autocomplete API. Add when available. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Examples/UICatalog/Scenarios/ViewportSettings.cs:180— // TODO: Move to Padding with controls — 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 Examples/UICatalog/Scenarios/ViewportSettings.cs:188— // TODO: Use MouseBindings — 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 Examples/UICatalog/UICatalogRunnable.cs:404— // TODO: Implement Trace.Navigation and enable this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Terminal.Gui/App/ApplicationNavigation.cs:14— // TODO: Move navigation key bindings here from ApplicationKeyboard — 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 Terminal.Gui/App/Keyboard/ApplicationKeyboard.cs:98— // TODO: This should match standard event patterns — 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 Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs:30— // TODO: follow above pattern for others 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 Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs:201— // TODO release managed resources 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.
Swallowed exception (empty catch) Terminal.Gui/Configuration/Settings/TuiConfigurationBuilder.cs:320— 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) Terminal.Gui/Configuration/Settings/TuiConfigurationBuilder.cs:443— 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) Terminal.Gui/Drawing/Markdown/TextMateSyntaxHighlighter.cs:363— 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) Terminal.Gui/Drawing/Markdown/TextMateSyntaxHighlighter.cs:380— 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) Terminal.Gui/Drawing/Markdown/TextMateSyntaxHighlighter.cs:421— 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) Terminal.Gui/Drivers/AnsiDriver/AnsiInput.cs:393— 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) Terminal.Gui/Drivers/AnsiDriver/AnsiTerminalHelper.cs:31— 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) Terminal.Gui/Drivers/DotNetDriver/NetInput.cs:64— 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) Terminal.Gui/Drivers/DotNetDriver/NetInput.cs:94— 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) Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs:32— 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) Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs:208— 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) Terminal.Gui/Drivers/Input/ConsoleInputSource.cs:56— 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) Terminal.Gui/Drivers/TerminalDevice.cs:198— 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) Terminal.Gui/Drivers/TerminalDevice.cs:210— 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) Terminal.Gui/Drivers/TerminalDevice.cs:369— 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) Terminal.Gui/Drivers/TerminalDevice.cs:387— 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) Terminal.Gui/Drivers/TerminalDevice.cs:401— 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) Terminal.Gui/Drivers/TerminalDevice.cs:415— 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) Terminal.Gui/Drivers/UnixHelpers/UnixClipboard.cs:77— 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) Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs:479— 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) Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs:541— 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) Terminal.Gui/Drivers/UnixHelpers/UnixRawModeHelper.cs:240— 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) Terminal.Gui/Drivers/UnixHelpers/UnixRawModeHelper.cs:254— 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) Terminal.Gui/Drivers/UnixHelpers/UnixTerminalHelper.cs:39— 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) Terminal.Gui/Drivers/UnixHelpers/UnixTerminalHelper.cs:71— 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.
TooManyMethods: View Terminal.Gui/ViewBase/View.Layout.cs— TooManyMethods — 3479 significant lines (blank, comment-only and punctuation-only lines excluded), 310 methods, declared across 21 files: ViewBase/View.Command.cs (34), ViewBase/View.Layout.cs (34), ViewBase/View.Drawing.cs (26), Mouse/View.Mouse.cs (25), +17 more file(s). The bar is 30 methods; this is 280 over it, 10.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: TextView Terminal.Gui/Views/TextInput/TextView/TextView.Movement.cs— TooManyMethods — 2101 significant lines (blank, comment-only and punctuation-only lines excluded), 158 methods, declared across 13 files: TextView/TextView.Movement.cs (37), TextView/TextView.Commands.cs (35), TextView/TextView.Text.cs (25), TextView/TextView.Drawing.cs (13), +9 more file(s). The bar is 30 methods; this is 128 over it, 5.27× 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: Markdown Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs— TooManyMethods — 1415 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods, declared across 7 files: Markdown/MarkdownView.Parsing.cs (24), Markdown/Markdown.cs (21), Markdown/MarkdownView.Selection.cs (16), Markdown/MarkdownView.Mouse.cs (11), +3 more file(s). The bar is 30 methods; this is 55 over it, 2.83× 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: TextField Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs— TooManyMethods — 919 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods, declared across 8 files: TextField/TextField.Commands.cs (30), TextField/TextField.Text.cs (23), TextField/TextField.cs (12), TextField/TextField.Keyboard.cs (6), +4 more file(s). The bar is 30 methods; this is 53 over it, 2.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: ApplicationImpl Terminal.Gui/App/ApplicationImpl.Run.cs— TooManyMethods — 1153 significant lines (blank, comment-only and punctuation-only lines excluded), 79 methods, declared across 9 files: App/ApplicationImpl.Run.cs (15), App/ApplicationImpl.Lifecycle.cs (13), App/ApplicationImpl.Dispatch.cs (12), App/ApplicationImpl.cs (11), +5 more file(s). The bar is 30 methods; this is 49 over it, 2.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.
TooManyMethods: TableView Terminal.Gui/Views/TableView/TableView.Selection.cs— TooManyMethods — 942 significant lines (blank, comment-only and punctuation-only lines excluded), 79 methods, declared across 6 files: TableView/TableView.Selection.cs (27), TableView/TableView.Drawing.cs (19), TableView/TableView.cs (13), TableView/TableView.Content.cs (8), +2 more file(s). The bar is 30 methods; this is 49 over it, 2.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.
TooManyMethods: TreeView Terminal.Gui/Views/TreeView/TreeView.Navigation.cs— TooManyMethods — 675 significant lines (blank, comment-only and punctuation-only lines excluded), 74 methods, declared across 4 files: TreeView/TreeView.Navigation.cs (46), TreeView/TreeViewT.cs (19), TreeView/TreeView.Drawing.cs (7), TreeView/TreeView.Mouse.cs (2). The bar is 30 methods; this is 44 over it, 2.47× 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: FileDialog Terminal.Gui/Views/FileDialogs/FileDialog.TableView.cs— TooManyMethods — 640 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods, declared across 4 files: FileDialogs/FileDialog.TableView.cs (19), FileDialogs/FileDialog.Navigation.cs (18), FileDialogs/FileDialog.Commands.cs (16), FileDialogs/FileDialog.cs (7). The bar is 30 methods; this is 30 over it, 2.00× 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: LinearRangeViewBase Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs— TooManyMethods — 984 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods. The bar is 30 methods; this is 28 over it, 1.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: ImageView Terminal.Gui/Views/ImageView/ImageView.Render.cs— TooManyMethods — 663 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods, declared across 7 files: ImageView/ImageView.Render.cs (16), ImageView/ImageView.Input.cs (10), ImageView/ImageView.Geometry.cs (8), ImageView/ImageView.Drawing.cs (7), +3 more file(s). The bar is 30 methods; this is 24 over it, 1.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: OutputBase Terminal.Gui/Drivers/Output/OutputBase.cs— TooManyMethods — 742 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: TextModel Terminal.Gui/Views/TextInput/TextModel.cs— TooManyMethods — 617 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 30 methods; this is 19 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.
TooManyMethods: DriverImpl Terminal.Gui/Drivers/DriverImpl.cs— TooManyMethods — 233 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 30 methods; this is 15 over it, 1.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: ListView Terminal.Gui/Views/ListView/ListView.Selection.cs— TooManyMethods — 445 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods, declared across 5 files: ListView/ListView.Selection.cs (14), ListView/ListView.cs (13), ListView/ListView.Movement.cs (6), ListView/ListView.Commands.cs (3), +1 more file(s). The bar is 30 methods; this is 8 over it, 1.27× 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: TextFormatter Terminal.Gui/Text/TextFormatter.cs— TooManyMethods — 1167 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.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: Tabs Terminal.Gui/Views/Tabs.cs— TooManyMethods — 492 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.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: Color Terminal.Gui/Drawing/Color/Color.cs— TooManyMethods — 354 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods, declared across 3 files: Color/Color.cs (15), Color/Color.Formatting.cs (11), Color/Color.Operators.cs (10). The bar is 30 methods; this is 6 over it, 1.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: EscSeqUtils Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs— TooManyMethods — 397 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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: WindowsOutput Terminal.Gui/Drivers/WindowsDriver/WindowsOutput.cs— TooManyMethods — 312 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Arranger Terminal.Gui/ViewBase/Adornment/Arranger.cs— TooManyMethods — 435 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 30 methods; this is 4 over it, 1.13× 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: Key Terminal.Gui/Input/Keyboard/Key.cs— TooManyMethods — 368 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 30 methods; this is 4 over it, 1.13× 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: BorderView Terminal.Gui/ViewBase/Adornment/BorderView.cs— TooManyMethods — 548 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods, declared across 2 files: Adornment/BorderView.cs (28), Adornment/BorderView.Arrangement.cs (4). The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HexView Terminal.Gui/Views/HexView.cs— TooManyMethods — 393 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: OutputBufferImpl Terminal.Gui/Drivers/Output/OutputBufferImpl.cs— TooManyMethods — 275 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MenuBar Terminal.Gui/Views/Menu/MenuBar.cs— TooManyMethods — 375 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
+ 2 more in this group — see findings.md.
AX2 · Stateful singletons· Process-global static state · ×17
Process-global static state: Clipboard Terminal.Gui/App/Clipboard/Clipboard.cs:22— `Clipboard` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_contents; e.g. `_contents` at line 39). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: Logging Terminal.Gui/App/Logging.cs:18— `Logging` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_globalLogger; e.g. `_globalLogger` at line 29). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: AttributeJsonConverter Terminal.Gui/Configuration/AttributeJsonConverter.cs:7— `AttributeJsonConverter` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_instance; e.g. `_instance` at line 18). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: ColorJsonConverter Terminal.Gui/Configuration/ColorJsonConverter.cs:16— `ColorJsonConverter` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_instance; e.g. `_instance` at line 27). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: KeyBindingConfiguration Terminal.Gui/Configuration/Settings/KeyBindingConfiguration.cs:15— `KeyBindingConfiguration` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_appPrior, _viewPrior, _viewTypesPrior; e.g. `_appPrior` at line 27). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: DriverRegistry Terminal.Gui/Drivers/DriverRegistry.cs:7— `DriverRegistry` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_registry; e.g. `_registry` at line 66). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: TerminalDevice Terminal.Gui/Drivers/TerminalDevice.cs:25— `TerminalDevice` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_ownedInputFd, _ownedOutputFd, _ownedInputHandle, _ownedOutputHandle; e.g. `_ownedInputFd` at line 374). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: SuspendHelper Terminal.Gui/Drivers/UnixHelpers/SuspendHelper.cs:6— `SuspendHelper` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_suspendSignal; e.g. `_suspendSignal` at line 50). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: WSLClipboard Terminal.Gui/Drivers/UnixHelpers/UnixClipboard.cs:181— `WSLClipboard` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_powershellPath; e.g. `_powershellPath` at line 254). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: UnixTerminalHelper Terminal.Gui/Drivers/UnixHelpers/UnixTerminalHelper.cs:7— `UnixTerminalHelper` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_ttyFd, _origTermios, _savedTermios; e.g. `_ttyFd` at line 21). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: MenuBar Terminal.Gui/Views/Menu/MenuBar.cs:69— `MenuBar` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_defaultKeyOverride; e.g. `_defaultKeyOverride` at line 454). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: PopoverMenu Terminal.Gui/Views/Menu/PopoverMenu.cs:43— `PopoverMenu` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_defaultKeyOverride; e.g. `_defaultKeyOverride` at line 315). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: NumericHelper Terminal.Gui/Views/NumericUpDown.cs:503— `NumericHelper` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_helpers; e.g. `_helpers` at line 519). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: Scenario Examples/UICatalog/Scenario.cs:45— `Scenario` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_maxScenarioNameLen; e.g. `_maxScenarioNameLen` at line 101). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: UICatalogRunnable Examples/UICatalog/UICatalogRunnable.cs:15— `UICatalogRunnable` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_isFirstRunning, CachedRunnableScheme, _cachedCategoryIndex, _cachedScenarioIndex; e.g. `_isFirstRunning` at line 87). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: DynamicStatusBar Examples/UICatalog/Scenarios/DynamicStatusBar.cs:11— `DynamicStatusBar` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_app; e.g. `_app` at line 20). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: TextEffectsScenario Examples/UICatalog/Scenarios/TextEffectsScenario.cs:3— `TextEffectsScenario` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_loopingGradient; e.g. `_loopingGradient` at line 54). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
X18 · Disposal-pattern correctness· Owned disposable field is never released · ×17
Owned disposable field is never released Terminal.Gui/ViewBase/Adornment/BorderView.cs:689— `BorderView` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_titleView` itself (line 689), which makes that instance its own. But `_titleView` is named in none of the methods the disposal search covered: `Dispose` (line 1224), `DisposeBorderTitleHooks` (line 139) — 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` (`_titleView?.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 Terminal.Gui/Views/Color/AttributePicker.cs:54— `AttributePicker` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_sampleLabel` itself (line 54), which makes that instance its own. But `_sampleLabel` is named in none of the methods the disposal search covered: `Dispose` (line 234) — 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` (`_sampleLabel?.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 Terminal.Gui/Views/DropDownList.cs:114— `DropDownList` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_toggleButton` itself (line 114), which makes that instance its own. But `_toggleButton` is named in none of the methods the disposal search covered: `Dispose` (line 607) — 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` (`_toggleButton?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:32— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_btnBack` itself (line 32), which makes that instance its own. But `_btnBack` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_btnBack?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:34— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_btnForward` itself (line 34), which makes that instance its own. But `_btnForward` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_btnForward?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:35— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_btnCancel` itself (line 35), which makes that instance its own. But `_btnCancel` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_btnCancel?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:50— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_btnOk` itself (line 50), which makes that instance its own. But `_btnOk` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_btnOk?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:51— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_btnUp` itself (line 51), which makes that instance its own. But `_btnUp` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_btnUp?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:53— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_spinnerView` itself (line 53), which makes that instance its own. But `_spinnerView` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_spinnerView?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:54— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_tableViewContainer` itself (line 54), which makes that instance its own. But `_tableViewContainer` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_tableViewContainer?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:55— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_tableView` itself (line 55), which makes that instance its own. But `_tableView` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_tableView?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:56— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_tbFind` itself (line 56), which makes that instance its own. But `_tbFind` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_tbFind?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:57— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_tbPath` itself (line 57), which makes that instance its own. But `_tbPath` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_tbPath?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:58— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_btnTreeToggle` itself (line 58), which makes that instance its own. But `_btnTreeToggle` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_btnTreeToggle?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:59— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_treeView` itself (line 59), which makes that instance its own. But `_treeView` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_treeView?.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 Terminal.Gui/Views/FileDialogs/FileDialog.cs:61— `FileDialog` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_typeFilterDropDown` itself (line 61), which makes that instance its own. But `_typeFilterDropDown` is named in none of the methods the disposal search covered: `Dispose` (line 612) — 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` (`_typeFilterDropDown?.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 Examples/UICatalog/Scenarios/TableEditor.cs:172— `TableEditor` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `_tableView` itself (line 172), which makes that instance its own. But `_tableView` is named in none of the methods the disposal search covered: `Dispose` (line 326) — 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` (`_tableView?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
Hotspot: Terminal.Gui/App/ApplicationImpl.Screen.cs Terminal.Gui/App/ApplicationImpl.Screen.cs:183— Terminal.Gui/App/ApplicationImpl.Screen.cs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in ApplicationImpl.LayoutAndDrawCore at line 183. 6 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/App/ApplicationImpl.Screen.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: Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs:462— Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in Markdown.AppendInlineSource at line 462. 2 of those changes were fix/bug commits, and the other 22 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Views/Markdown/MarkdownView.Parsing.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: Terminal.Gui/Drivers/Output/OutputBase.cs Terminal.Gui/Drivers/Output/OutputBase.cs:321— Terminal.Gui/Drivers/Output/OutputBase.cs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in OutputBase.WriteFrame at line 321. 5 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Drivers/Output/OutputBase.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: Terminal.Gui/App/ApplicationImpl.Run.cs Terminal.Gui/App/ApplicationImpl.Run.cs:449— Terminal.Gui/App/ApplicationImpl.Run.cs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in ApplicationImpl.End at line 449. 3 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/App/ApplicationImpl.Run.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: Terminal.Gui/Views/Markdown/MarkdownTable.cs Terminal.Gui/Views/Markdown/MarkdownTable.cs:472— Terminal.Gui/Views/Markdown/MarkdownTable.cs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in MarkdownTable.WrapSegments at line 472. 2 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Views/Markdown/MarkdownTable.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: Terminal.Gui/Views/Markdown/MarkdownView.Layout.cs Terminal.Gui/Views/Markdown/MarkdownView.Layout.cs:273— Terminal.Gui/Views/Markdown/MarkdownView.Layout.cs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in Markdown.WrapBlock at line 273. 2 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Views/Markdown/MarkdownView.Layout.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: Terminal.Gui/App/Mouse/ApplicationMouse.cs Terminal.Gui/App/Mouse/ApplicationMouse.cs:133— Terminal.Gui/App/Mouse/ApplicationMouse.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in ApplicationMouse.RaiseMouseEvent at line 133. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/App/Mouse/ApplicationMouse.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: Terminal.Gui/App/ApplicationImpl.InlineOutput.cs Terminal.Gui/App/ApplicationImpl.InlineOutput.cs:162— Terminal.Gui/App/ApplicationImpl.InlineOutput.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in ApplicationImpl.DrainInlineOutput at line 162. 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-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/App/ApplicationImpl.InlineOutput.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: Terminal.Gui/App/ApplicationImpl.InlineResize.cs Terminal.Gui/App/ApplicationImpl.InlineResize.cs:91— Terminal.Gui/App/ApplicationImpl.InlineResize.cs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ApplicationImpl.CompleteInlineResize at line 91. 1 of those changes was a fix/bug commit, 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-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/App/ApplicationImpl.InlineResize.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: Terminal.Gui/ViewBase/Mouse/View.Mouse.cs Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:482— Terminal.Gui/ViewBase/Mouse/View.Mouse.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in View.NewMouseEvent at line 482. 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-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/ViewBase/Mouse/View.Mouse.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: Terminal.Gui/Views/Markdown/MarkdownView.Selection.cs Terminal.Gui/Views/Markdown/MarkdownView.Selection.cs:115— Terminal.Gui/Views/Markdown/MarkdownView.Selection.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in Markdown.GetSelectedText at line 115. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Views/Markdown/MarkdownView.Selection.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: Scripts/tuirec/verify-inline-output.py Scripts/tuirec/verify-inline-output.py:56— Scripts/tuirec/verify-inline-output.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in verify-inline-output.verify at line 56. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Scripts/tuirec/verify-inline-output.py`: 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: Terminal.Gui/App/ApplicationImpl.InlineSizing.cs Terminal.Gui/App/ApplicationImpl.InlineSizing.cs:9— Terminal.Gui/App/ApplicationImpl.InlineSizing.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ApplicationImpl.TryShrinkInlineRegion at line 9. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/App/ApplicationImpl.InlineSizing.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: Examples/UICatalog/Scenarios/InlineTranscript.cs Examples/UICatalog/Scenarios/InlineTranscript.cs:12— Examples/UICatalog/Scenarios/InlineTranscript.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in InlineTranscript.Main at line 12. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Examples/UICatalog/Scenarios/InlineTranscript.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: Terminal.Gui/Views/Markdown/MarkdownView.Drawing.cs Terminal.Gui/Views/Markdown/MarkdownView.Drawing.cs:76— Terminal.Gui/Views/Markdown/MarkdownView.Drawing.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in Markdown.DrawSelectionOverlayOnSubViewRows at line 76. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Views/Markdown/MarkdownView.Drawing.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: Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:846— Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in EscSeqUtils.ComputeTextStyleSgrCodes at line 846. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.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.
MethodTooLong: TextFormatter.Draw Terminal.Gui/Text/TextFormatter.cs:60— MethodTooLong — Draw runs 211 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 111 over it, 2.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TextFormatter.GetDrawRegion Terminal.Gui/Text/TextFormatter.cs:913— MethodTooLong — GetDrawRegion runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BorderView.DrawLegacyBorder Terminal.Gui/ViewBase/Adornment/BorderView.cs:235— MethodTooLong — DrawLegacyBorder runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ConsoleKeyMapping.MapConsoleKeyInfoToKeyCode Terminal.Gui/Drivers/Keyboard/ConsoleKeyMapping.cs:64— MethodTooLong — MapConsoleKeyInfoToKeyCode runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TextFormatter.WordWrapText Terminal.Gui/Text/TextFormatter.cs:1533— MethodTooLong — WordWrapText runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Color.Parse Terminal.Gui/Drawing/Color/Color.Formatting.cs:261— MethodTooLong — Parse 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: CharMap.OnDrawingContent Terminal.Gui/Views/CharMap/CharMap.cs:743— MethodTooLong — OnDrawingContent 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: Tabs.EnableForDesign Terminal.Gui/Views/Tabs.cs:972— MethodTooLong — EnableForDesign 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: ApplicationImpl.LayoutAndDrawCore Terminal.Gui/App/ApplicationImpl.Screen.cs:183— MethodTooLong — LayoutAndDrawCore runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MarkdownTableLayoutEngine.Build Terminal.Gui/Views/Markdown/MarkdownTableLayoutEngine.cs:6— MethodTooLong — Build runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Branch.Draw Terminal.Gui/Views/TreeView/Branch.cs:79— MethodTooLong — Draw runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MenuBar.EnableForDesign Terminal.Gui/Views/Menu/MenuBar.cs:199— MethodTooLong — EnableForDesign runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TextView.OnMouseEvent Terminal.Gui/Views/TextInput/TextView/TextView.Mouse.cs:18— MethodTooLong — OnMouseEvent runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LinearRangeViewBase.SetFocusedOption Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1976— MethodTooLong — SetFocusedOption runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EnumExtensionMethodsGenerator.GenerateExtensionClass Terminal.Gui.Analyzers.Internal/EnumExtensionMethodsGenerator.cs:111— MethodTooLong — GenerateExtensionClass runs 101 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× 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.
X2 · Cancellation propagation· Async method without CancellationToken · ×14
Async method without CancellationToken: StartInputTaskAsync Terminal.Gui/App/MainLoop/MainLoopCoordinator.cs:61— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: GetChars Terminal.Gui/Views/CharMap/UcdApiClient.cs:11— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: GetCharsName Terminal.Gui/Views/CharMap/UcdApiClient.cs:19— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: GetCodepointDec Terminal.Gui/Views/CharMap/UcdApiClient.cs:28— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: GetCodepointHex Terminal.Gui/Views/CharMap/UcdApiClient.cs:36— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: SetSourceAsync Terminal.Gui/Views/ListView/ListView.cs:213— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: LoadDocListAsync Examples/UICatalog/Scenarios/Deepdives.cs:203— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: LoadDocContentAsync Examples/UICatalog/Scenarios/Deepdives.cs:313— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: LoadIncludesAsync Examples/UICatalog/Scenarios/Deepdives.cs:373— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: FetchInclude Examples/UICatalog/Scenarios/Deepdives.cs:402— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: LoadData Examples/UICatalog/Scenarios/Threading.cs:272— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: LoadDataAsync Examples/UICatalog/Scenarios/Threading.cs:281— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: LoadItemsAsync Examples/UICatalog/Scenarios/Threading.cs:310— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: MethodAsync Examples/UICatalog/Scenarios/Threading.cs:326— No CancellationToken parameter — this work can't be stopped early once started.
Stateful shared instance: ApplicationImpl Terminal.Gui/App/ApplicationImpl.cs:7— `ApplicationImpl` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_inputInjector, _keyboard, _mouse, _driverName, Coordinator, AnsiStartupGate; e.g. `_inputInjector` at line 200).
Stateful shared instance: TuiConfigurationBuilder Terminal.Gui/Configuration/Settings/TuiConfigurationBuilder.cs:47— `TuiConfigurationBuilder` keeps one instance of itself in the static `Shared`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_runtimeConfig, _configuration, _mergedSourceJson, _rootSettingsCache, _overlaySettingsCache, _themeManager; e.g. `_runtimeConfig` at line 100).
Stateful shared instance: ScenarioLogCapture Examples/UICatalog/ScenarioLogCapture.cs:11— `ScenarioLogCapture` is not registered, but `UICatalog` creates it and keeps it in the static `LogCapture`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_scenarioStartPosition, _hasErrors; e.g. `_scenarioStartPosition` at line 29).
Stateful shared instance: ApplicationMouse Terminal.Gui/App/Mouse/ApplicationMouse.cs:14— `ApplicationMouse` is not registered, but the singleton `ApplicationImpl` creates it and keeps it in `_mouse`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (LastMousePosition, _activePopoverAtPress, _dismissedByMousePress, _isDismissRecursing, _mouseGrabViewRef; e.g. `LastMousePosition` at line 155).
Stateful shared instance: ApplicationNavigation Terminal.Gui/App/ApplicationNavigation.cs:7— `ApplicationNavigation` is not registered, but the singleton `ApplicationImpl` creates it and keeps it in `<Navigation>k__BackingField`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_focused; e.g. `_focused` at line 92).
Stateful shared instance: ApplicationPopover Terminal.Gui/App/ApplicationPopover.cs:9— `ApplicationPopover` is not registered, but the singleton `ApplicationImpl` creates it and keeps it in `<Popovers>k__BackingField`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_popovers, _activePopover; e.g. `_popovers` at line 33).
Stateful shared instance: ApplicationToolTip Terminal.Gui/App/ApplicationToolTip.cs:21— `ApplicationToolTip` is not registered, but the singleton `ApplicationImpl` creates it and keeps it in `<ToolTips>k__BackingField`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_registrations, _sharedToolTip, _currentTarget; e.g. `_registrations` at line 109).
Stateful shared instance: InlineResize Terminal.Gui/App/ApplicationImpl.InlineResize.cs:170— `InlineResize` is not registered, but the singleton `ApplicationImpl` creates it and keeps it in `_inlineResize`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (ObservedSize, Revision, LastChanged; e.g. `ObservedSize` at line 186).
Stateful shared instance: ToolTipHost Terminal.Gui/App/Popovers/ToolTipHost.cs:19— `ToolTipHost` is not registered, but the singleton `ApplicationToolTip` creates it and keeps it in `_sharedToolTip`, so one instance outlives every request and is shared by every caller that reaches it — and it mutates instance state outside any lock (_contentCommandBridge; e.g. `_contentCommandBridge` at line 90).
No assertions: AnsiScreenShot_Renders_Ansi_Stream Tests/IntegrationTests/FluentTests/TestContextTests.cs:77— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: PushLogger_Captures_Logs_To_XUnit_Output Tests/UnitTestsParallelizable/Application/LoggingTests.cs:98— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestLogging_Default_Only_Shows_Warnings_And_Errors Tests/UnitTestsParallelizable/Application/LoggingTests.cs:127— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestLogging_Verbose_Shows_All_Levels Tests/UnitTestsParallelizable/Application/LoggingTests.cs:146— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: New Tests/UnitTestsParallelizable/Drawing/SchemeTests.cs:20— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: Is_Thread_Safe_For_Concurrent_Reads Tests/UnitTestsParallelizable/Drawing/SchemeTests.cs:257— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: When_Not_Visually_Transparent Tests/UnitTestsParallelizable/ViewBase/Adornment/MarginTests.cs:112— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: StaticDraw_HandlesEmptyCollection Tests/UnitTestsParallelizable/ViewBase/Draw/StaticDrawTests.cs:132— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: Key_Set_Binds_Key_To_CommandView_Accept Tests/UnitTestsParallelizable/Views/ShortcutTests.cs:359— 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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.
FileTooLong: Text/TextFormatter.cs Terminal.Gui/Text/TextFormatter.cs— FileTooLong — 1170 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 670 over it, 2.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: LinearRange/LinearRangeViewBase.cs Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs— FileTooLong — 985 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 485 over it, 1.97× 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: Output/OutputBase.cs Terminal.Gui/Drivers/Output/OutputBase.cs— FileTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 249 over it, 1.50× 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: TextInput/TextModel.cs Terminal.Gui/Views/TextInput/TextModel.cs— FileTooLong — 618 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 118 over it, 1.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Text/NerdFonts.cs Terminal.Gui/Text/NerdFonts.cs— FileTooLong — 586 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 86 over it, 1.17× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Adornment/BorderView.cs Terminal.Gui/ViewBase/Adornment/BorderView.cs— FileTooLong — 539 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 39 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: CharMap/CharMap.cs Terminal.Gui/Views/CharMap/CharMap.cs— FileTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 11 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: TextView/TextView.Commands.cs Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs— FileTooLong — 502 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2 over it, 1.00× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ViewBase/View.Layout.cs Terminal.Gui/ViewBase/View.Layout.cs— FileTooLong — 501 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1 over it, 1.00× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×9
Edited copy of a member (17 corresponding lines) Terminal.Gui/Views/ImageView/ImageView.Scaling.cs:37— Terminal.Gui/Views/ImageView/ImageView.Scaling.cs:37-53 | Terminal.Gui/Views/ImageView/ImageView.Scaling.cs:61-77 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) Terminal.Gui/ViewBase/Helpers/StackExtensions.cs:31— Terminal.Gui/ViewBase/Helpers/StackExtensions.cs:31-47 | Terminal.Gui/ViewBase/Helpers/StackExtensions.cs:135-158 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) Terminal.Gui/Drivers/Output/OutputBufferImpl.cs:336— Terminal.Gui/Drivers/Output/OutputBufferImpl.cs:336-353 | Terminal.Gui/Drivers/Output/OutputBufferImpl.cs:357-373 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) Terminal.Gui/Drawing/LineCanvas/StraightLineExtensions.cs:187— Terminal.Gui/Drawing/LineCanvas/StraightLineExtensions.cs:187-203 | Terminal.Gui/Drawing/LineCanvas/StraightLineExtensions.cs:220-236 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) Terminal.Gui/Configuration/KeyArrayJsonConverter.cs:49— Terminal.Gui/Configuration/KeyArrayJsonConverter.cs:49-65 | Terminal.Gui/Configuration/MouseFlagsArrayJsonConverter.cs:50-66 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) Examples/UICatalog/Scenarios/LineDrawing.cs:370— Examples/UICatalog/Scenarios/LineDrawing.cs:370-386 | Examples/UICatalog/Scenarios/RegionScenario.cs:361-377 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) Examples/UICatalog/Scenarios/EditorsAndHelpers/ViewportSettingsEditor.cs:374— Examples/UICatalog/Scenarios/EditorsAndHelpers/ViewportSettingsEditor.cs:374-390 | Examples/UICatalog/Scenarios/EditorsAndHelpers/ViewportSettingsEditor.cs:404-420 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) Examples/ScenarioRunner/Program.cs:215— Examples/ScenarioRunner/Program.cs:215-231 | Examples/UICatalog/UICatalog.cs:262-286 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) Examples/UICatalog/Scenarios/InteractiveTree.cs:68— Examples/UICatalog/Scenarios/InteractiveTree.cs:68-84 | Examples/UICatalog/Scenarios/InteractiveTree.cs:129-145 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×9
Edited copy of a member (16 corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs:183— Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs:183-198 | Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs:213-228 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) Terminal.Gui/ViewBase/Layout/DimCombine.cs:46— Terminal.Gui/ViewBase/Layout/DimCombine.cs:46-61 | Terminal.Gui/ViewBase/Layout/DimCombine.cs:100-118 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) Terminal.Gui/FileServices/FileSystemInfoStats.cs:93— Terminal.Gui/FileServices/FileSystemInfoStats.cs:93-108 | Examples/UICatalog/Scenarios/TableEditor.cs:819-846 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) Terminal.Gui/ViewBase/Layout/Pos.cs:514— Terminal.Gui/ViewBase/Layout/Pos.cs:514-529 | Terminal.Gui/ViewBase/Layout/Pos.cs:544-559 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) Terminal.Gui/App/InlineOutputOperation.cs:29— Terminal.Gui/App/InlineOutputOperation.cs:29-44 | Terminal.Gui/App/UiDispatchOperation.cs:32-51 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) Terminal.Gui/Drivers/WindowsHelpers/WindowsVTInputHelper.cs:237— Terminal.Gui/Drivers/WindowsHelpers/WindowsVTInputHelper.cs:237-252 | Terminal.Gui/Drivers/WindowsHelpers/WindowsVTOutputHelper.cs:150-167 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) Terminal.Gui/Views/TextInput/DateEditor.cs:116— Terminal.Gui/Views/TextInput/DateEditor.cs:116-131 | Terminal.Gui/Views/TextInput/TimeEditor.cs:132-147 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) Examples/UICatalog/Scenarios/EditorsAndHelpers/ViewportSettingsEditor.cs:133— Examples/UICatalog/Scenarios/EditorsAndHelpers/ViewportSettingsEditor.cs:133-153 | Examples/UICatalog/Scenarios/EditorsAndHelpers/ViewportSettingsEditor.cs:162-177 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) Examples/UICatalog/Scenarios/AllViewsTester.cs:349— Examples/UICatalog/Scenarios/AllViewsTester.cs:349-366 | Examples/UICatalog/Scenarios/Themes.cs:333-348 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
X18 · Disposal-pattern correctness· Disposable created and abandoned in the method that made it · ×9
Disposable created and abandoned in the method that made it Terminal.Gui/Views/Color/ColorPicker.16.cs:346— `lc` is a `LineCanvas`, which implements `IDisposable`, and it is created here (line 346). Every use of it in `DrawFocusRect` 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 lc = …;`), 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 Examples/UICatalog/Runner.cs:167— `dt` is a `DataTable`, which implements `IDisposable`, and it is created here (line 167). Every use of it in `DisplayResultsUI` 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 dt = …;`), 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 Examples/UICatalog/Scenarios/Arrangement.cs:74— `timer` is a `Timer`, which implements `IDisposable`, and it is created here (line 74). Every use of it in `Main` 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 timer = …;`), 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 Examples/UICatalog/Scenarios/Clipping.cs:95— `progressTimer` is a `Timer`, which implements `IDisposable`, and it is created here (line 95). Every use of it in `Main` 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 progressTimer = …;`), 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 Examples/UICatalog/Scenarios/HexEditor.cs:145— `sw` is a `StreamWriter`, which implements `IDisposable`, and it is created here (line 145). Every use of it in `CreateDemoFile` 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 sw = …;`), 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 Examples/UICatalog/Scenarios/Shortcuts.cs:394— `timer` is a `Timer`, which implements `IDisposable`, and it is created here (line 394). Every use of it in `HandleOnIsRunningChanged` 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 timer = …;`), 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 Examples/UICatalog/Scenarios/Snake.cs:332— `canvas` is a `LineCanvas`, which implements `IDisposable`, and it is created here (line 332). Every use of it in `OnDrawingContent` 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 canvas = …;`), 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 Examples/UICatalog/UICatalog.cs:277— `loggerFactory` is a `ILoggerFactory`, which implements `IDisposable`, and it is created here (line 277). Every use of it in `CreateLogger` 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 loggerFactory = …;`), 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 Examples/UICatalog/UICatalog.cs:362— `markdownView` is a `Markdown`, which implements `IDisposable`, and it is created here (line 362). Every use of it in `RenderMarkdown` 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 markdownView = …;`), which releases it at the end of the scope on every path including a throw.
BarePragmaDisable Examples/UICatalog/Scenarios/ListViewWithSelection.cs:195— #pragma warning disable CS0067 — 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/UnitTestsParallelizable/Views/ListViewTests.cs:915— #pragma warning disable CS0067 — 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 Terminal.Gui/App/CWP/ResultEventArgs.cs:5— #pragma warning disable CS1711 — 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 Terminal.Gui/Drawing/VisualRoleEventArgs.cs:5— #pragma warning disable CS1711 — 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 Terminal.Gui/ModuleInitializers.cs:19— #pragma warning disable CA2255 — 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 Terminal.Gui/Views/SpinnerView/SpinnerStyle.cs:61— #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member — 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 Terminal.Gui/Views/StatusBar.cs:139— #pragma warning disable TGUI001 — 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/NativeAotSmoke/Program.cs:18— #pragma warning disable IL2026, IL3050 — 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.
DeadPreprocessorBranch Examples/UICatalog/Scenarios/Adornments.cs:226— #if SUBVIEW_BASED_BORDER — 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 Terminal.Gui/Drivers/WindowsDriver/WindowsKeyboardLayout.cs:66— #else — 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 Terminal.Gui/ViewBase/Adornment/BorderView.cs:324— #if TAB_COLOR_PROTOTYPE — 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 Terminal.Gui/ViewBase/Adornment/BorderView.cs:590— #if TAB_COLOR_PROTOTYPE — 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 Terminal.Gui/ViewBase/Adornment/TitleView.cs:78— #if TAB_COLOR_PROTOTYPE — 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 Terminal.Gui/ViewBase/View.cs:268— #if AUTO_CANFOCUS — 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 Terminal.Gui/Views/ScrollBar/ScrollBar.cs:563— #if PROPORTIONAL_SCROLL_JUMP — 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.
HackComment Terminal.Gui/App/ApplicationPopover.cs:278— // HACK: If our owner is a MenuBarItem, we want to allow nav keys to propagate to the MenuBar so it can move focus to the previous MenuBarItem. — 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 Terminal.Gui/Text/TextFormatter.cs:517— // HACK: Fill normally will fill the entire constraint size, but we need to know the actual size of the text. — 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 Terminal.Gui/Views/Menu/PopoverMenu.cs:126— // HACK: If our owner is a MenuBarItem, we want to allow left key to propagate to the MenuBar so it can move focus to the previous MenuBarItem. — 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 Terminal.Gui/Views/Menu/PopoverMenu.cs:148— // HACK: If our owner is a MenuBarItem, we want to allow right key to propagate to the MenuBar so it can move focus to the next MenuBarItem. — 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 Tests/UnitTestsParallelizable/Views/ListViewTests.cs:955— // HACK to make test pass — 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 Tests/UnitTestsParallelizable/Views/TableViewBaselineTests.cs:89— // HACK: Without Application/focus context, the command returns false — 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 Tests/UnitTestsParallelizable/Views/TableViewBaselineTests.cs:769— // HACK: The exact Viewport.Y depends on header height calculation. — 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 (7 lines × 2) Terminal.Gui/Text/TextFormatter.cs:190— Terminal.Gui/Text/TextFormatter.cs:190-196 | Terminal.Gui/Text/TextFormatter.cs:1027-1033 — both copies are in the same file, so extract the 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) Terminal.Gui/Views/ImageView/ImageView.cs:391— Terminal.Gui/Views/ImageView/ImageView.cs:391-397 | Terminal.Gui/Views/ImageView/ImageView.cs:426-432 — both copies are in the same file, so extract the 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 `Terminal.Gui/Views/ImageView/ImageView.cs:391` 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) Terminal.Gui/Views/Menu/PopoverMenu.cs:453— Terminal.Gui/Views/Menu/PopoverMenu.cs:453-459 | Terminal.Gui/Views/Menu/PopoverMenu.cs:567-573 — both copies are in the same file, so extract the 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 `Terminal.Gui/Views/Menu/PopoverMenu.cs:453` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Terminal.Gui/Views/Menu/PopoverMenu.cs:565` calls `ShowMenu` and `Terminal.Gui/Views/Menu/PopoverMenu.cs:451` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) Terminal.Gui/ViewBase/Layout/DimCombine.cs:37— Terminal.Gui/ViewBase/Layout/DimCombine.cs:37-43 | Terminal.Gui/ViewBase/Layout/PosCombine.cs:39-45 — 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 (7 lines × 2) Examples/UICatalog/Scenarios/Deepdives.cs:217— Examples/UICatalog/Scenarios/Deepdives.cs:217-223 | Examples/UICatalog/Scenarios/Deepdives.cs:383-389 — both copies are in the same file, so extract the 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 `Examples/UICatalog/Scenarios/Deepdives.cs:217` 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) Examples/UICatalog/Scenarios/Images/Images.cs:567— Examples/UICatalog/Scenarios/Images/Images.cs:567-573 | Examples/UICatalog/Scenarios/Mandelbrot.cs:315-321 — 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) Examples/UICatalog/ScenarioCategory.cs:29— Examples/UICatalog/ScenarioCategory.cs:29-35 | Examples/UICatalog/ScenarioMetadata.cs:32-38 — 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.
Sync-over-async blocking — 6 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 Terminal.Gui/App/ApplicationImpl.Driver.cs:107— `.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 Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs:106— `.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 Terminal.Gui/App/MainLoop/MainLoopCoordinator.cs:177— `.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 Examples/UICatalog/Scenarios/AnimationScenario/AnimationScenario.cs:92— `.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 Examples/UICatalog/Scenarios/InlineTranscript.cs:92— `.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 Examples/UICatalog/Scenarios/Snake.cs:49— `.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).
Repeated repair: Terminal.Gui/Views/Markdown/Markdown.cs Terminal.Gui/Views/Markdown/Markdown.cs:425— Terminal.Gui/Views/Markdown/Markdown.cs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is Markdown.OnSubViewLayout at line 425), 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: “Fixes #5760. Reassign automatic hotkeys when a view title changes (#5761)”; “Fix rich table prefixes, nested copy, and relayout caching”; “Fix Markdown rendering and cover Markdig upgrades under Native AOT”; “Fixes #5366 - BREAKING CHANGE - Make View.Text notifications CWP-compliant and non-virtual (#5371)”. 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-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Views/Markdown/Markdown.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: Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs:368— Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.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 11 (its worst body is UnixIOHelper.TryWriteAll at line 368), 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: “Fixes #5695. Harden UTF-8 output rendering”; “fix: address Copilot review comments from PR #5651 (shared with #5650)”; “fix: address Copilot review comments on PR #5650”. 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-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.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: Terminal.Gui/Views/Shortcut.cs Terminal.Gui/Views/Shortcut.cs:258— Terminal.Gui/Views/Shortcut.cs changed 3 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 14 (its worst body is Shortcut.ShowHide at line 258), 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: “Fixes #5757-MenuItem.Key with BindKeyToApplication does not fire Action while PopoverMenu is closed (#5758)”; “fix(shortcut): prevent help text overdraw (#5634)”; “Fixes #5366 - BREAKING CHANGE - Make View.Text notifications CWP-compliant and non-virtual (#5371)”. 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-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Views/Shortcut.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: Terminal.Gui/Views/Menu/MenuBar.cs Terminal.Gui/Views/Menu/MenuBar.cs:615— Terminal.Gui/Views/Menu/MenuBar.cs changed 3 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 10 (its worst body is MenuBar.OnActivating at line 615), 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: “Fixes #5742-Ability to open a menu at a given item (#5746)”; “Fixes #5675. MenuBar overrides DefaultBorderStyle”; “FIXES #4367 - BREAKING CHANGE - Remove legacy ConfigurationManager after MEC migration (#5416)”. 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-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Views/Menu/MenuBar.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: Terminal.Gui/Drivers/Output/Utf8Buffer.cs Terminal.Gui/Drivers/Output/Utf8Buffer.cs:42— Terminal.Gui/Drivers/Output/Utf8Buffer.cs changed 3 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 6 (its worst body is Utf8Buffer.AppendAscii at line 42), 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: “Fixes #5695. Harden UTF-8 output rendering”; “fix: address Copilot review comments from PR #5651 (shared with #5650)”; “fix: address Copilot review comments on PR #5650”. 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-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Drivers/Output/Utf8Buffer.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: Terminal.Gui/Views/TextInput/TextValidateField.cs Terminal.Gui/Views/TextInput/TextValidateField.cs:404— Terminal.Gui/Views/TextInput/TextValidateField.cs changed 3 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 9 (its worst body is TextValidateField.OnDrawingContent at line 404), 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: “Fixes #5640. Prevent custom renderer text overdraw (#5642)”; “Fixes #5366 - BREAKING CHANGE - Make View.Text notifications CWP-compliant and non-virtual (#5371)”; “Fix TextValidateField cursor rendering (#5620)”. 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-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 13:30:10 +00:00' --until='2026-11-08 13:30:10 +00:00' --full-history --no-merges -- Terminal.Gui/Views/TextInput/TextValidateField.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.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×6
Edited copy of a member (18 corresponding lines) Terminal.Gui/Views/ImageView/ImageView.cs:377— Terminal.Gui/Views/ImageView/ImageView.cs:377-397 | Terminal.Gui/Views/ImageView/ImageView.cs:415-432 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs:104— Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs:104-122 | Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs:126-143 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs:400— Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs:400-417 | Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs:451-468 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) Terminal.Gui/App/Popovers/Popover.cs:68— Terminal.Gui/App/Popovers/Popover.cs:68-85 | Terminal.Gui/App/Popovers/ToolTipHost.cs:35-52 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) Examples/UICatalog/Scenarios/TableEditor.cs:684— Examples/UICatalog/Scenarios/TableEditor.cs:684-701 | Examples/UICatalog/Scenarios/TableEditor.cs:703-721 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) Examples/UICatalog/Scenarios/Images/Images.cs:414— Examples/UICatalog/Scenarios/Images/Images.cs:414-436 | Examples/UICatalog/Scenarios/MandelbrotImageView.cs:191-208 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×5
Edited copy of a member (31 corresponding lines) Terminal.Gui/Views/Selectors/SelectorBase.cs:66— Terminal.Gui/Views/Selectors/SelectorBase.cs:66-96 | Terminal.Gui/Views/Selectors/SelectorBase.cs:99-140 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) Terminal.Gui/App/Popovers/Popover.cs:104— Terminal.Gui/App/Popovers/Popover.cs:104-139 | Terminal.Gui/App/Popovers/ToolTipHost.cs:61-91 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Movement.cs:226— Terminal.Gui/Views/TextInput/TextView/TextView.Movement.cs:226-261 | Terminal.Gui/Views/TextInput/TextView/TextView.Movement.cs:264-294 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) Examples/UICatalog/Scenarios/CsvEditor.cs:582— Examples/UICatalog/Scenarios/CsvEditor.cs:582-612 | Examples/UICatalog/Scenarios/TableEditor.cs:1200-1230 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) Examples/UICatalog/Scenarios/NumericUpDownDemo.cs:186— Examples/UICatalog/Scenarios/NumericUpDownDemo.cs:186-216 | Examples/UICatalog/Scenarios/NumericUpDownDemo.cs:218-248 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×5
Edited copy of a member (13 corresponding lines) Terminal.Gui/Drivers/AnsiHandling/AnsiResponseParserBase.cs:554— Terminal.Gui/Drivers/AnsiHandling/AnsiResponseParserBase.cs:554-566 | Terminal.Gui/Drivers/AnsiHandling/AnsiResponseParserTInputRecord.cs:81-93 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) Terminal.Gui/ViewBase/Layout/Dim.cs:537— Terminal.Gui/ViewBase/Layout/Dim.cs:537-549 | Terminal.Gui/ViewBase/Layout/Dim.cs:564-576 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) Terminal.Gui/Configuration/Settings/JsonMerge.cs:15— Terminal.Gui/Configuration/Settings/JsonMerge.cs:15-27 | Tools/MigrateConfig/ConfigJsonMigrator.cs:128-140 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) Terminal.Gui/Views/Dialog.cs:126— Terminal.Gui/Views/Dialog.cs:126-139 | Terminal.Gui/Views/Dialog.cs:170-182 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) Terminal.Gui/Views/TextInput/DateTextProvider.cs:84— Terminal.Gui/Views/TextInput/DateTextProvider.cs:84-96 | Terminal.Gui/Views/TextInput/TimeTextProvider.cs:98-111 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×5
Edited copy of a member (11 corresponding lines) Terminal.Gui/Views/Color/ColorPicker.16.cs:54— Terminal.Gui/Views/Color/ColorPicker.16.cs:54-64 | Terminal.Gui/Views/Color/ColorPicker.16.cs:74-84 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) Terminal.Gui/Views/Color/LightnessBar.cs:13— Terminal.Gui/Views/Color/LightnessBar.cs:13-23 | Terminal.Gui/Views/Color/ValueBar.cs:15-25 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) Terminal.Gui/Views/Markdown/MarkdownView.Selection.cs:376— Terminal.Gui/Views/Markdown/MarkdownView.Selection.cs:376-387 | Terminal.Gui/Views/TextInput/TextField/TextField.cs:237-247 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) Examples/UICatalog/Scenarios/AllViewsTester.cs:332— Examples/UICatalog/Scenarios/AllViewsTester.cs:332-342 | Examples/UICatalog/Scenarios/Popovers.cs:365-375 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) Examples/UICatalog/Scenarios/Bars.cs:10— Examples/UICatalog/Scenarios/Bars.cs:10-20 | Examples/UICatalog/Scenarios/CombiningMarks.cs:10-99 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (15 lines × 2) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:2074— Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:2074-2088 | Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:2136-2150 — both copies are in the same file, so extract the 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 `Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:2074` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:548— Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:548-562 | Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:641-655 — both copies are in the same file, so extract the 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) Terminal.Gui/Configuration/ConcurrentDictionaryJsonConverter.cs:23— Terminal.Gui/Configuration/ConcurrentDictionaryJsonConverter.cs:23-37 | Terminal.Gui/Configuration/DictionaryJsonConverter.cs:22-36 — 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 `Terminal.Gui/Configuration/ConcurrentDictionaryJsonConverter.cs:23` 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 (15 lines × 2) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1765— Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1765-1781 | Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1940-1954 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) Examples/UICatalog/Scenarios/GraphViewExample.cs:415— Examples/UICatalog/Scenarios/GraphViewExample.cs:415-430 | Examples/UICatalog/Scenarios/GraphViewExample.cs:724-738 — both copies are in the same file, so extract the 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Examples/UICatalog/Scenarios/GraphViewExample.cs:738` calls `ToString` and `Examples/UICatalog/Scenarios/GraphViewExample.cs:430` 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.
Low cohesion: DriverImpl (LCOM4 5) Terminal.Gui/Drivers/DriverImpl.cs:32— DriverImpl'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: InputProcessorImpl (LCOM4 5) Terminal.Gui/Drivers/Input/InputProcessorImpl.cs:10— InputProcessorImpl'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: View (LCOM4 5) Terminal.Gui/ViewBase/View.Layout.cs:7— View'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: Runnable (LCOM4 5) Terminal.Gui/Views/Runnable/Runnable.cs:19— Runnable'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: LinearRangeOption (LCOM4 4) Terminal.Gui/Views/LinearRange/LinearRangeOption.cs:5— LinearRangeOption'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.
Sync-over-async (deadlock risk) Terminal.Gui/App/ApplicationImpl.Driver.cs:107— 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) Terminal.Gui/App/MainLoop/ApplicationMainLoop.cs:106— 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) Examples/UICatalog/Scenarios/AnimationScenario/AnimationScenario.cs:92— 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) Examples/UICatalog/Scenarios/InlineTranscript.cs:92— 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) Examples/UICatalog/Scenarios/Snake.cs:49— 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.
X18 · Disposal-pattern correctness· Owned disposable field overwritten without releasing the previous instance · ×5
Owned disposable field overwritten without releasing the previous instance Examples/UICatalog/Scenarios/AllViewsTester.cs:81— `_adornmentsEditor` is a `AdornmentsEditor` this type creates itself, and here (line 81) a new instance is written over it — but `Main` itself reads through `_adornmentsEditor` before replacing it, so it expects an instance to be there, and nothing earlier in `Main` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_adornmentsEditor?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Owned disposable field overwritten without releasing the previous instance Examples/UICatalog/Scenarios/CollectionNavigatorTester.cs:98— `_allowMultiSelectionCheckBox` is a `CheckBox` this type creates itself, and here (line 98) a new instance is written over it — but `Main` itself reads through `_allowMultiSelectionCheckBox` before replacing it, so it expects an instance to be there, and nothing earlier in `Main` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_allowMultiSelectionCheckBox?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Owned disposable field overwritten without releasing the previous instance Examples/UICatalog/Scenarios/Deepdives.cs:92— `_statusShortcut` is a `Shortcut` this type creates itself, and here (line 92) a new instance is written over it — but `Main` itself reads through `_statusShortcut` before replacing it, so it expects an instance to be there, and nothing earlier in `Main` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_statusShortcut?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Owned disposable field overwritten without releasing the previous instance Examples/UICatalog/Scenarios/TableViewTest.cs:58— `tableView` is a `TableView` this type creates itself, and here (line 58) a new instance is written over it — but `Main` itself reads through `tableView` before replacing it, so it expects an instance to be there, and nothing earlier in `Main` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`tableView?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Owned disposable field overwritten without releasing the previous instance Examples/UICatalog/Scenarios/Threading.cs:77— `_itemsList` is a `ListView` this type creates itself, and here (line 77) a new instance is written over it — but `Main` itself reads through `_itemsList` before replacing it, so it expects an instance to be there, and nothing earlier in `Main` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_itemsList?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×4
Edited copy of a member (24 corresponding lines) Terminal.Gui/ViewBase/Adornment/ShadowView.cs:89— Terminal.Gui/ViewBase/Adornment/ShadowView.cs:89-112 | Terminal.Gui/ViewBase/Adornment/ShadowView.cs:129-157 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) Terminal.Gui/Views/TextInput/TextModel.cs:915— Terminal.Gui/Views/TextInput/TextModel.cs:915-938 | Terminal.Gui/Views/TextInput/TextModel.cs:941-966 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) Terminal.Gui/ViewBase/Layout/ViewManipulator.cs:176— Terminal.Gui/ViewBase/Layout/ViewManipulator.cs:176-199 | Terminal.Gui/ViewBase/Layout/ViewManipulator.cs:208-231 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:99— Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:99-122 | Terminal.Gui/ViewBase/View.Keyboard.cs:1271-1294 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×4
Edited copy of a member (32 corresponding lines) Terminal.Gui/Views/DropDownList.cs:248— Terminal.Gui/Views/DropDownList.cs:248-279 | Terminal.Gui/Views/DropDownList.cs:283-315 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) Terminal.Gui/Views/TextInput/DateEditor.cs:191— Terminal.Gui/Views/TextInput/DateEditor.cs:191-222 | Terminal.Gui/Views/TextInput/TimeEditor.cs:207-238 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) Terminal.Gui/Configuration/KeyArrayJsonConverter.cs:14— Terminal.Gui/Configuration/KeyArrayJsonConverter.cs:14-45 | Terminal.Gui/Configuration/MouseFlagsArrayJsonConverter.cs:14-46 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) Examples/UICatalog/Scenarios/EditorsAndHelpers/DimEditor.cs:133— Examples/UICatalog/Scenarios/EditorsAndHelpers/DimEditor.cs:133-164 | Examples/UICatalog/Scenarios/EditorsAndHelpers/PosEditor.cs:128-162 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×4
Edited copy of a member (21 corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Movement.cs:397— Terminal.Gui/Views/TextInput/TextView/TextView.Movement.cs:397-417 | Terminal.Gui/Views/TextInput/TextView/TextView.Movement.cs:420-440 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Terminal.Gui/Drivers/WindowsDriver/WindowsOutput.cs:38— Terminal.Gui/Drivers/WindowsDriver/WindowsOutput.cs:38-58 | Terminal.Gui/Drivers/WindowsHelpers/WindowsVTOutputHelper.cs:185-219 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Terminal.Gui/Drivers/WindowsDriver/WindowsInput.cs:61— Terminal.Gui/Drivers/WindowsDriver/WindowsInput.cs:61-91 | Terminal.Gui/Drivers/WindowsDriver/WindowsInput.cs:94-114 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) Terminal.Gui/Views/TextInput/DateTextProvider.cs:361— Terminal.Gui/Views/TextInput/DateTextProvider.cs:361-381 | Terminal.Gui/Views/TextInput/TimeTextProvider.cs:433-453 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×4
Edited copy of a member (23 corresponding lines) Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs:420— Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs:420-448 | Terminal.Gui/Views/TextInput/TextField/TextField.Commands.cs:471-493 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) Terminal.Gui/ViewBase/Layout/ViewManipulator.cs:115— Terminal.Gui/ViewBase/Layout/ViewManipulator.cs:115-137 | Terminal.Gui/ViewBase/Layout/ViewManipulator.cs:145-167 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) Terminal.Gui/Views/FileDialogs/FileDialog.cs:442— Terminal.Gui/Views/FileDialogs/FileDialog.cs:442-464 | Terminal.Gui/Views/FileDialogs/SaveDialog.cs:33-55 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) Examples/UICatalog/Scenarios/EditorsAndHelpers/RectangleEditor.cs:37— Examples/UICatalog/Scenarios/EditorsAndHelpers/RectangleEditor.cs:37-59 | Examples/UICatalog/Scenarios/EditorsAndHelpers/TwoIntEditor.cs:57-79 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×4
Edited copy of a member (19 corresponding lines) Terminal.Gui/Input/CommandBridge.cs:104— Terminal.Gui/Input/CommandBridge.cs:104-122 | Terminal.Gui/Input/CommandBridge.cs:125-143 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) Terminal.Gui/Drivers/Output/InlineOutputLayout.cs:51— Terminal.Gui/Drivers/Output/InlineOutputLayout.cs:51-69 | Terminal.Gui/Views/TextInput/TextModel.cs:321-345 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) Terminal.Gui/ViewBase/View.Layout.cs:1017— Terminal.Gui/ViewBase/View.Layout.cs:1017-1036 | Terminal.Gui/ViewBase/View.Layout.cs:1096-1114 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) Terminal.Gui/Views/TextInput/TimeTextProvider.cs:128— Terminal.Gui/Views/TextInput/TimeTextProvider.cs:128-151 | Terminal.Gui/Views/TextInput/DateTextProvider.cs:113-131 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (20 lines × 2) Terminal.Gui/Views/Label.cs:51— Terminal.Gui/Views/Label.cs:51-70 | Terminal.Gui/Views/Markdown/Markdown.cs:109-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (20 lines × 2) Terminal.Gui/Views/FileDialogs/FileDialog.cs:445— Terminal.Gui/Views/FileDialogs/FileDialog.cs:445-464 | Terminal.Gui/Views/FileDialogs/SaveDialog.cs:36-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Terminal.Gui/Views/FileDialogs/FileDialog.cs:445` 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) Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:187— Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:187-206 | Examples/UICatalog/Scenarios/Popovers.cs:335-354 — 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) Examples/UICatalog/Scenarios/MessageBoxes.cs:56— Examples/UICatalog/Scenarios/MessageBoxes.cs:56-82 | Examples/UICatalog/Scenarios/Wizards.cs:17-36 — 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 `Examples/UICatalog/Scenarios/MessageBoxes.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 (18 lines × 2) Terminal.Gui/Views/TreeView/TreeView.Navigation.cs:85— Terminal.Gui/Views/TreeView/TreeView.Navigation.cs:85-102 | Terminal.Gui/Views/TreeView/TreeView.Navigation.cs:127-144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) Terminal.Gui/ViewBase/View.Command.cs:485— Terminal.Gui/ViewBase/View.Command.cs:485-502 | Terminal.Gui/ViewBase/View.Command.cs:860-877 — both copies are in the same file, so extract the 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 `Terminal.Gui/ViewBase/View.Command.cs:485` 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 lines × 2) Terminal.Gui/Drivers/Output/OutputBase.cs:815— Terminal.Gui/Drivers/Output/OutputBase.cs:815-832 | Terminal.Gui/Drivers/Output/OutputBase.cs:1042-1059 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) Examples/UICatalog/Scenarios/TextInputControls.cs:207— Examples/UICatalog/Scenarios/TextInputControls.cs:207-224 | Examples/UICatalog/Scenarios/TextInputControls.cs:227-255 — both copies are in the same file, so extract the 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) Terminal.Gui/Views/NumericUpDown.cs:106— Terminal.Gui/Views/NumericUpDown.cs:106-116 | Terminal.Gui/Views/NumericUpDown.cs:124-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 `Terminal.Gui/Views/NumericUpDown.cs:106` 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) Terminal.Gui/Views/Code.cs:125— Terminal.Gui/Views/Code.cs:125-135 | Terminal.Gui/Views/Markdown/MarkdownView.Drawing.cs:231-241 — 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 `Terminal.Gui/Views/Code.cs:125` 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) Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:15— Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:15-25 | Examples/UICatalog/Scenarios/EditorsAndHelpers/ThemeViewer.cs:20-31 — before extracting anything, compare `Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs` and `Examples/UICatalog/Scenarios/EditorsAndHelpers/ThemeViewer.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) Examples/UICatalog/Scenarios/TextStyles.cs:89— Examples/UICatalog/Scenarios/TextStyles.cs:89-99 | Examples/UICatalog/Scenarios/TextStyles.cs:172-182 — both copies are in the same file, so extract the 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 `Examples/UICatalog/Scenarios/TextStyles.cs:89` 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) Terminal.Gui/Views/TextInput/DateTextProvider.cs:265— Terminal.Gui/Views/TextInput/DateTextProvider.cs:265-274 | Terminal.Gui/Views/TextInput/TimeTextProvider.cs:339-348 — 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 (10 lines × 2) Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:378— Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:378-387 | Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:388-397 — both copies are in the same file, so extract the 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 `Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:378` 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) Terminal.Gui/ViewBase/Layout/DimCombine.cs:81— Terminal.Gui/ViewBase/Layout/DimCombine.cs:81-90 | Terminal.Gui/ViewBase/Layout/PosCombine.cs:75-84 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) Examples/UICatalog/Scenarios/LineDrawing.cs:371— Examples/UICatalog/Scenarios/LineDrawing.cs:371-380 | Examples/UICatalog/Scenarios/RegionScenario.cs:362-371 — 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 `Examples/UICatalog/Scenarios/LineDrawing.cs:371` 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) Terminal.Gui/Views/TextInput/TextView/TextView.Movement.cs:400— Terminal.Gui/Views/TextInput/TextView/TextView.Movement.cs:400-407 | Terminal.Gui/Views/TextInput/TextView/TextView.Movement.cs:423-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 (8 lines × 2) Examples/UICatalog/Scenarios/Mazing.cs:265— Examples/UICatalog/Scenarios/Mazing.cs:265-272 | Examples/UICatalog/Scenarios/Mazing.cs:295-302 — both copies are in the same file, so extract the 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 `Examples/UICatalog/Scenarios/Mazing.cs:265` 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) Examples/UICatalog/Scenarios/TextFormatterDemo.cs:99— Examples/UICatalog/Scenarios/TextFormatterDemo.cs:99-106 | Examples/UICatalog/Scenarios/TextFormatterDemo.cs:111-118 — both copies are in the same file, so extract the 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) Examples/UICatalog/Scenarios/Images/Images.cs:624— Examples/UICatalog/Scenarios/Images/Images.cs:624-631 | Examples/UICatalog/Scenarios/Mandelbrot.cs:340-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. 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) Terminal.Gui/Views/Selectors/SelectorBase.cs:189— Terminal.Gui/Views/Selectors/SelectorBase.cs:189-197 | Terminal.Gui/Views/Selectors/SelectorBase.cs:209-217 — both copies are in the same file, so extract the 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 `Terminal.Gui/Views/Selectors/SelectorBase.cs:209` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Terminal.Gui/Views/ImageView/ImageView.Drawing.cs:132— Terminal.Gui/Views/ImageView/ImageView.Drawing.cs:132-140 | Terminal.Gui/Views/ImageView/ImageView.Drawing.cs:182-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) Terminal.Gui/App/Popovers/Popover.cs:409— Terminal.Gui/App/Popovers/Popover.cs:409-417 | Terminal.Gui/App/Popovers/ToolTipHost.cs:230-238 — before extracting anything, compare `Terminal.Gui/App/Popovers/Popover.cs` and `Terminal.Gui/App/Popovers/ToolTipHost.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 104 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 (9 lines × 2) Examples/UICatalog/Scenarios/ClassExplorer.cs:291— Examples/UICatalog/Scenarios/ClassExplorer.cs:291-299 | Examples/UICatalog/Scenarios/ClassExplorer.cs:302-310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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, `Examples/UICatalog/Scenarios/ClassExplorer.cs:289` calls `AppendLine` and `Examples/UICatalog/Scenarios/ClassExplorer.cs:301` 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) Examples/UICatalog/Scenarios/DynamicStatusBar.cs:282— Examples/UICatalog/Scenarios/DynamicStatusBar.cs:282-294 | Examples/UICatalog/Scenarios/DynamicStatusBar.cs:313-325 — both copies are in the same file, so extract the 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 (13 lines × 2) Examples/UICatalog/Scenarios/Images/Images.cs:214— Examples/UICatalog/Scenarios/Images/Images.cs:214-226 | Examples/UICatalog/Scenarios/Mandelbrot.cs:295-307 — 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) Examples/UICatalog/Scenarios/GraphViewExample.cs:392— Examples/UICatalog/Scenarios/GraphViewExample.cs:392-404 | Examples/UICatalog/Scenarios/GraphViewExample.cs:406-419 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) Examples/UICatalog/Scenarios/PosAlignDemo.cs:328— Examples/UICatalog/Scenarios/PosAlignDemo.cs:328-340 | Examples/UICatalog/Scenarios/PosAlignDemo.cs:341-353 — both copies are in the same file, so extract the 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 `Examples/UICatalog/Scenarios/PosAlignDemo.cs:328` 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.
Swallowed exception (caught, then discarded) Terminal.Gui/App/Clipboard/Clipboard.cs:42— `catch (Exception)` 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) Terminal.Gui/App/Clipboard/Clipboard.cs:62— `catch (Exception)` 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) Terminal.Gui/Drivers/AnsiDriver/AnsiInput.cs:335— `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) Terminal.Gui/Drivers/WindowsDriver/WindowsOutput.cs:551— `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.
ClassTooLong: NerdFonts Terminal.Gui/Text/NerdFonts.cs— ClassTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 184 over it, 1.46× 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: CharMap Terminal.Gui/Views/CharMap/CharMap.cs— ClassTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 103 over it, 1.26× 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: FileSystemColorProvider Terminal.Gui/FileServices/FileSystemColorProvider.cs— ClassTooLong — 415 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 15 over it, 1.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×3
Edited copy of a member (34 corresponding lines) Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:280— Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:280-313 | Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:457-490 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) Terminal.Gui/Configuration/ConcurrentDictionaryJsonConverter.cs:15— Terminal.Gui/Configuration/ConcurrentDictionaryJsonConverter.cs:15-52 | Terminal.Gui/Configuration/DictionaryJsonConverter.cs:14-47 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) Examples/UICatalog/Scenarios/CsvEditor.cs:271— Examples/UICatalog/Scenarios/CsvEditor.cs:271-304 | Examples/UICatalog/Scenarios/CsvEditor.cs:307-354 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×3
Edited copy of a member (20 corresponding lines) Terminal.Gui/Drawing/Color/Color.cs:292— Terminal.Gui/Drawing/Color/Color.cs:292-311 | Terminal.Gui/Drawing/Color/Color.cs:348-380 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) Terminal.Gui/Views/CharMap/CharMap.cs:506— Terminal.Gui/Views/CharMap/CharMap.cs:506-526 | Terminal.Gui/Views/HexView.cs:224-243 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) Examples/UICatalog/Scenarios/MandelbrotImageView.cs:105— Examples/UICatalog/Scenarios/MandelbrotImageView.cs:105-124 | Examples/UICatalog/Scenarios/MandelbrotImageView.cs:362-382 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×3
Edited copy of a member (22 corresponding lines) Terminal.Gui/Drivers/Output/OutputBase.cs:872— Terminal.Gui/Drivers/Output/OutputBase.cs:872-893 | Terminal.Gui/Drivers/Output/OutputBase.cs:902-925 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) Terminal.Gui/Input/Keyboard/PlatformKeyBinding.cs:60— Terminal.Gui/Input/Keyboard/PlatformKeyBinding.cs:60-81 | Terminal.Gui/Input/Mouse/PlatformMouseBinding.cs:60-81 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) Terminal.Gui/Drawing/Kitty/KittyGraphicsSupportDetector.cs:83— Terminal.Gui/Drawing/Kitty/KittyGraphicsSupportDetector.cs:83-104 | Terminal.Gui/Drawing/Sixel/SixelSupportDetector.cs:70-91 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs:154— Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs:154-168 | Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs:246-260 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) Terminal.Gui/ViewBase/Layout/Aligner.cs:182— Terminal.Gui/ViewBase/Layout/Aligner.cs:182-203 | Terminal.Gui/ViewBase/Layout/Aligner.cs:345-359 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) Terminal.Gui/ViewBase/Layout/DimAuto.cs:356— Terminal.Gui/ViewBase/Layout/DimAuto.cs:356-370 | Terminal.Gui/ViewBase/Layout/DimFill.cs:114-128 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) Terminal.Gui/Text/StringExtensions.cs:14— Terminal.Gui/Text/StringExtensions.cs:14-25 | Terminal.Gui/Text/StringExtensions.cs:34-51 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) Terminal.Gui/Drawing/Sixel/SixelEncoder.cs:255— Terminal.Gui/Drawing/Sixel/SixelEncoder.cs:255-273 | Examples/UICatalog/Scenarios/Images/ImagesTestCard.cs:181-192 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) Terminal.Gui/App/Popovers/Popover.cs:338— Terminal.Gui/App/Popovers/Popover.cs:338-351 | Terminal.Gui/App/Popovers/ToolTipHost.cs:192-203 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×3
Edited copy of a member (27 corresponding lines) Terminal.Gui/Testing/InputInjector.cs:142— Terminal.Gui/Testing/InputInjector.cs:142-168 | Terminal.Gui/Testing/InputInjector.cs:172-203 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Examples/UICatalog/Scenarios/Images/Images.cs:561— Examples/UICatalog/Scenarios/Images/Images.cs:561-588 | Examples/UICatalog/Scenarios/Mandelbrot.cs:310-336 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) Examples/UICatalog/Scenarios/CsvEditor.cs:218— Examples/UICatalog/Scenarios/CsvEditor.cs:218-244 | Examples/UICatalog/Scenarios/MultiColouredTable.cs:67-93 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×3
Edited copy of a member (8 corresponding lines) Terminal.Gui/Views/TextInput/TextField/TextField.Keyboard.cs:29— Terminal.Gui/Views/TextInput/TextField/TextField.Keyboard.cs:29-36 | Terminal.Gui/Views/TextInput/TextView/TextView.Keyboard.cs:217-224 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) Terminal.Gui/ViewBase/Layout/DimCombine.cs:36— Terminal.Gui/ViewBase/Layout/DimCombine.cs:36-43 | Terminal.Gui/ViewBase/Layout/PosCombine.cs:38-45 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) Examples/UICatalog/ScenarioCategory.cs:28— Examples/UICatalog/ScenarioCategory.cs:28-35 | Examples/UICatalog/ScenarioMetadata.cs:31-38 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×3
Edited copy of a member (9 corresponding lines) Terminal.Gui/Views/TextInput/TextField/TextField.Keyboard.cs:53— Terminal.Gui/Views/TextInput/TextField/TextField.Keyboard.cs:53-61 | Terminal.Gui/Views/TextInput/TextView/TextView.Keyboard.cs:113-126 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) Examples/UICatalog/UICatalog.cs:249— Examples/UICatalog/UICatalog.cs:249-259 | Examples/ScenarioRunner/Program.cs:234-242 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) Examples/UICatalog/Scenarios/Images/Images.cs:623— Examples/UICatalog/Scenarios/Images/Images.cs:623-631 | Examples/UICatalog/Scenarios/Mandelbrot.cs:339-347 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17 lines × 2) Terminal.Gui/Text/TextFormatter.cs:86— Terminal.Gui/Text/TextFormatter.cs:86-102 | Terminal.Gui/Text/TextFormatter.cs:929-945 — both copies are in the same file, so extract the 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 lines × 2) Terminal.Gui/Views/TableView/TableView.Selection.cs:612— Terminal.Gui/Views/TableView/TableView.Selection.cs:612-628 | Terminal.Gui/Views/TableView/TableView.Selection.cs:696-712 — both copies are in the same file, so extract the 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 (17 lines × 2) Scripts/BackingFieldReorderer/Program.cs:17— Scripts/BackingFieldReorderer/Program.cs:17-33 | Scripts/PartialSplitter/Program.cs:18-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 `Scripts/BackingFieldReorderer/Program.cs:17` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) Terminal.Gui/App/Popovers/Popover.cs:425— Terminal.Gui/App/Popovers/Popover.cs:425-436 | Terminal.Gui/App/Popovers/ToolTipHost.cs:243-254 — before extracting anything, compare `Terminal.Gui/App/Popovers/Popover.cs` and `Terminal.Gui/App/Popovers/ToolTipHost.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 104 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 (12 lines × 2) Terminal.Gui/ViewBase/Layout/DimCombine.cs:65— Terminal.Gui/ViewBase/Layout/DimCombine.cs:65-76 | Terminal.Gui/ViewBase/Layout/PosCombine.cs:59-70 — 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) Examples/UICatalog/Scenarios/MouseTester.cs:224— Examples/UICatalog/Scenarios/MouseTester.cs:224-235 | Examples/UICatalog/Scenarios/MouseTester.cs:246-257 — both copies are in the same file, so extract the 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 `Examples/UICatalog/Scenarios/MouseTester.cs:224` 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.
Unfinished stub — throws NotImplementedException Terminal.Gui/Drivers/DotNetDriver/NetInput.cs:101— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException Terminal.Gui/ViewBase/Adornment/AdornmentView.cs:47— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException Examples/UICatalog/Scenarios/ListViewWithSelection.cs:218— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Condition was already decided — an earlier guard makes this test constant Terminal.Gui/Text/TextFormatter.cs:1894— Control only reaches here when `graphemes.Count - zeroLength > width` is false, because the guard on line 1831 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 Terminal.Gui/Text/TextFormatter.cs:1903— Control only reaches here when `graphemes.Count - zeroLength > width` is false, because the guard on line 1831 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 Terminal.Gui/ViewBase/View.cs:132— Control only reaches here when `disposing` is true, because the guard on line 107 exits otherwise. This test is therefore always true and its `else`, and any code it is meant to skip, is unreachable. Implement the distinction that was intended, or delete the test.
Test cannot fail: All_View_Subclasses_Have_Null_Data_After_Construction Tests/UnitTestsParallelizable/ViewBase/InitTests.cs:166— This test's act runs inside `catch` at line 192 of this file, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 1 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: All_View_Subclasses_Have_Null_Data_After_Initialization Tests/UnitTestsParallelizable/ViewBase/InitTests.cs:202— This test's act runs inside `catch` at line 231 of this file, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 1 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:9— Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:9-66 | Examples/UICatalog/Scenarios/EditorsAndHelpers/ThemeViewer.cs:8-104 | Examples/UICatalog/Scenarios/ViewportSettings.cs:149-186 | Terminal.Gui/Views/CharMap/CharMap.cs:73-154 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) Examples/UICatalog/Scenarios/AllViewsTester.cs:302— Examples/UICatalog/Scenarios/AllViewsTester.cs:302-310 | Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:170-178 | Examples/UICatalog/Scenarios/KeyBindings.cs:259-298 | Examples/UICatalog/Scenarios/Themes.cs:226-234 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×2
Edited copy of a member (35 corresponding lines) Terminal.Gui/Drawing/Kitty/KittyGraphicsEncoder.cs:91— Terminal.Gui/Drawing/Kitty/KittyGraphicsEncoder.cs:91-125 | Terminal.Gui/Drawing/Kitty/KittyGraphicsEncoder.cs:204-251 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) Terminal.Gui/ViewBase/View.ScrollBars.cs:141— Terminal.Gui/ViewBase/View.ScrollBars.cs:141-175 | Terminal.Gui/ViewBase/View.ScrollBars.cs:178-212 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×2
Edited copy of a member (41 corresponding lines) Terminal.Gui/Views/GraphView/GraphView.cs:374— Terminal.Gui/Views/GraphView/GraphView.cs:374-414 | Examples/UICatalog/Scenarios/GraphViewExample.cs:704-748 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (41 corresponding lines) Terminal.Gui/ViewBase/View.Command.cs:468— Terminal.Gui/ViewBase/View.Command.cs:468-508 | Terminal.Gui/ViewBase/View.Command.cs:833-882 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×2
Edited copy of a member (44 corresponding lines) Terminal.Gui/Views/GraphView/HorizontalAxis.cs:150— Terminal.Gui/Views/GraphView/HorizontalAxis.cs:150-193 | Terminal.Gui/Views/GraphView/VerticalAxis.cs:143-188 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (44 corresponding lines) Terminal.Gui/Drawing/LineCanvas/StraightLine.cs:109— Terminal.Gui/Drawing/LineCanvas/StraightLine.cs:109-152 | Terminal.Gui/Drawing/LineCanvas/StraightLine.cs:155-198 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×2
Edited copy of a member (33 corresponding lines) Terminal.Gui/ViewBase/Layout/Aligner.cs:251— Terminal.Gui/ViewBase/Layout/Aligner.cs:251-288 | Terminal.Gui/ViewBase/Layout/Aligner.cs:310-342 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) Terminal.Gui/App/ApplicationImpl.Run.cs:311— Terminal.Gui/App/ApplicationImpl.Run.cs:311-343 | Terminal.Gui/App/ApplicationImpl.Run.cs:347-396 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) Terminal.Gui/Views/GraphView/HorizontalAxis.cs:58— Terminal.Gui/Views/GraphView/HorizontalAxis.cs:58-87 | Terminal.Gui/Views/GraphView/VerticalAxis.cs:41-75 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:339— Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:339-368 | Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:372-401 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×2
Edited copy of a member (40 corresponding lines) Terminal.Gui/Views/Markdown/MarkdownTable.cs:263— Terminal.Gui/Views/Markdown/MarkdownTable.cs:263-302 | Terminal.Gui/Views/Markdown/MarkdownView.Mouse.cs:155-210 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (40 corresponding lines) Terminal.Gui/Views/StatusBar.cs:99— Terminal.Gui/Views/StatusBar.cs:99-166 | Examples/UICatalog/Scenarios/Bars.cs:249-288 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×2
Edited copy of a member (28 corresponding lines) Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:66— Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:66-96 | Terminal.Gui/ViewBase/View.Keyboard.cs:1241-1268 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) Terminal.Gui/Views/Wizard/Wizard.cs:213— Terminal.Gui/Views/Wizard/Wizard.cs:213-240 | Terminal.Gui/Views/Wizard/Wizard.cs:250-277 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×2
Edited copy of a member (29 corresponding lines) REDACTED:517— REDACTED:517-550 | Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs:169-197 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) Examples/UICatalog/Scenarios/EditorsAndHelpers/DimEditor.cs:96— Examples/UICatalog/Scenarios/EditorsAndHelpers/DimEditor.cs:96-124 | Examples/UICatalog/Scenarios/EditorsAndHelpers/PosEditor.cs:84-119 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×2
Edited copy of a member (25 corresponding lines) Terminal.Gui/Views/TableView/TableView.cs:354— Terminal.Gui/Views/TableView/TableView.cs:354-378 | Terminal.Gui/Views/TextInput/TextField/TextField.Keyboard.cs:65-99 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) Terminal.Gui/Views/TreeView/TreeView.Navigation.cs:265— Terminal.Gui/Views/TreeView/TreeView.Navigation.cs:265-289 | Terminal.Gui/Views/TreeView/TreeView.Navigation.cs:610-641 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×2
Edited copy of a member (7 corresponding lines) Terminal.Gui/Drawing/Color/ColorQuantizer.cs:120— Terminal.Gui/Drawing/Color/ColorQuantizer.cs:120-126 | Terminal.Gui/Drawing/Quant/EuclideanColorDistance.cs:24-30 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) Terminal.Gui/Views/CheckBox.cs:265— Terminal.Gui/Views/CheckBox.cs:265-271 | Terminal.Gui/Views/TreeView/TreeView.Navigation.cs:744-750 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (24 lines × 2) Terminal.Gui/Input/Keyboard/PlatformKeyBinding.cs:30— Terminal.Gui/Input/Keyboard/PlatformKeyBinding.cs:30-53 | Terminal.Gui/Input/Mouse/PlatformMouseBinding.cs:30-53 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (24 lines × 2) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:936— Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:936-959 | Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:961-984 — both copies are in the same file, so extract the 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 × 3) Terminal.Gui/ViewBase/Adornment/Arranger.cs:527— Terminal.Gui/ViewBase/Adornment/Arranger.cs:527-540 | Terminal.Gui/ViewBase/Adornment/Arranger.cs:563-576 | Terminal.Gui/ViewBase/Adornment/Arranger.cs:599-612 — 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 `Terminal.Gui/ViewBase/Adornment/Arranger.cs:527` 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) Examples/UICatalog/Scenarios/AllViewsTester.cs:350— Examples/UICatalog/Scenarios/AllViewsTester.cs:350-363 | Examples/UICatalog/Scenarios/Themes.cs:334-347 | docfx/scripts/OutputView/OutputView.cs:391-404 — 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 (16 lines × 2) Terminal.Gui/Views/Markdown/MarkdownView.Mouse.cs:125— Terminal.Gui/Views/Markdown/MarkdownView.Mouse.cs:125-141 | Terminal.Gui/Views/TextInput/TextField/TextField.cs:177-192 — 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 `Terminal.Gui/Views/Markdown/MarkdownView.Mouse.cs:125` 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) Examples/UICatalog/Scenarios/MenuBars.cs:94— Examples/UICatalog/Scenarios/MenuBars.cs:94-109 | Examples/UICatalog/Scenarios/Menus.cs:104-119 — 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 (14 lines × 2) Terminal.Gui/Drawing/Gradient.cs:187— Terminal.Gui/Drawing/Gradient.cs:187-200 | Terminal.Gui/Drawing/Gradient.cs:201-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) Terminal.Gui/Drawing/Scheme.cs:263— Terminal.Gui/Drawing/Scheme.cs:263-276 | Terminal.Gui/Drawing/Scheme.cs:282-295 — both copies are in the same file, so extract the 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 `Terminal.Gui/Drawing/Scheme.cs:263` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:138— Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:138-159 | Examples/UICatalog/Scenarios/Themes.cs:277-298 — 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 (22 lines × 2) Examples/UICatalog/Scenarios/Scrolling.cs:41— Examples/UICatalog/Scenarios/Scrolling.cs:41-62 | Examples/UICatalog/Scenarios/Scrolling.cs:69-90 — both copies are in the same file, so extract the 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 `Examples/UICatalog/Scenarios/Scrolling.cs:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Hollow method — returns a constant without doing the work Terminal.Gui/App/Tracing/LoggingBackend.cs:38— `FormatNavigation` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work Terminal.Gui/App/Tracing/LoggingBackend.cs:40— `FormatLifecycle` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Outbound HTTP without resilience Examples/UICatalog/Scenarios/Deepdives.cs:17— `new ()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
Outbound HTTP without resilience Terminal.Gui/Views/CharMap/UcdApiClient.cs:9— `new ()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
Sync-over-async (deadlock risk) through `.Wait(…)` Terminal.Gui/Drivers/Input/InputImpl.cs:76— `.Wait(…)` blocks this thread until the task completes or the bound expires — sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters).
Sync-over-async (deadlock risk) through `.Wait(…)` Terminal.Gui/Views/FileDialogs/FileDialog.cs:557— `.Wait(…)` blocks this thread until the task completes or the bound expires — sync-over-async: it can deadlock under a synchronization context and it parks a thread while it waits. `await` the task (with `.WaitAsync(timeout, token)` where the bound matters).
async void method: CallLoadItemsAsync Examples/UICatalog/Scenarios/Threading.cs:223— `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: LoadData Examples/UICatalog/Scenarios/Threading.cs:272— `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.
TextFormatter.Draw (cyclomatic 102) Terminal.Gui/Text/TextFormatter.cs:60— TextFormatter.Draw has cyclomatic complexity 102 (threshold 15). Of this number, 99 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.
TextFormatter.GetDrawRegion (cyclomatic 78) Terminal.Gui/Text/TextFormatter.cs:913— TextFormatter.GetDrawRegion has cyclomatic complexity 78 (threshold 15). Of this number, 77 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.
WindowsKeyHelper.MapKey (cyclomatic 72) Terminal.Gui/Drivers/WindowsDriver/WindowsKeyHelper.cs:51— WindowsKeyHelper.MapKey has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationImpl.LayoutAndDrawCore (cyclomatic 58) Terminal.Gui/App/ApplicationImpl.Screen.cs:183— ApplicationImpl.LayoutAndDrawCore has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextFormatter.WordWrapText (cyclomatic 53) Terminal.Gui/Text/TextFormatter.cs:1533— TextFormatter.WordWrapText has cyclomatic complexity 53 (threshold 15). Of this number, 52 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.
LinearRangeViewBase.DrawLinearRange (cyclomatic 53) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1081— LinearRangeViewBase.DrawLinearRange 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.
EscSeqUtils.MapKey (cyclomatic 52) Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:477— EscSeqUtils.MapKey has cyclomatic complexity 52 (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.
BorderView.DrawLegacyBorder (cyclomatic 49) Terminal.Gui/ViewBase/Adornment/BorderView.cs:235— BorderView.DrawLegacyBorder has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CharMap.OnDrawingContent (cyclomatic 49) Terminal.Gui/Views/CharMap/CharMap.cs:743— CharMap.OnDrawingContent has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextModel.WordBackward (cyclomatic 45) Terminal.Gui/Views/TextInput/TextModel.cs:347— TextModel.WordBackward has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Key.TryParse (cyclomatic 44) Terminal.Gui/Input/Keyboard/Key.cs:881— Key.TryParse has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HistoryText.ProcessChanges (cyclomatic 42) Terminal.Gui/Views/TextInput/HistoryText.cs:140— HistoryText.ProcessChanges has cyclomatic complexity 42 (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.
TextView.OnMouseEvent (cyclomatic 42) Terminal.Gui/Views/TextInput/TextView/TextView.Mouse.cs:18— TextView.OnMouseEvent has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextView.ProcessMouseClick (cyclomatic 41) Terminal.Gui/Views/TextInput/TextView/TextView.Mouse.cs:212— TextView.ProcessMouseClick has cyclomatic complexity 41 (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.
LinearRangeViewBase.SetFocusedOption (cyclomatic 40) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1976— LinearRangeViewBase.SetFocusedOption has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OutputBase.WriteFrame (cyclomatic 39) Terminal.Gui/Drivers/Output/OutputBase.cs:321— OutputBase.WriteFrame 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.
ApplicationMouse.RaiseMouseEvent (cyclomatic 36) Terminal.Gui/App/Mouse/ApplicationMouse.cs:133— ApplicationMouse.RaiseMouseEvent has cyclomatic complexity 36 (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.
View.RenderLineCanvas (cyclomatic 36) Terminal.Gui/ViewBase/View.Drawing.LineCanvas.cs:30— View.RenderLineCanvas has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PosAlignDemo.SetupControls (cyclomatic 36) Examples/UICatalog/Scenarios/PosAlignDemo.cs:33— PosAlignDemo.SetupControls has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 15 of the 36 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 233, 84, 118, …). 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.
Branch.Draw (cyclomatic 35) Terminal.Gui/Views/TreeView/Branch.cs:79— Branch.Draw 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.
DimAuto.Calculate (cyclomatic 34) Terminal.Gui/ViewBase/Layout/DimAuto.cs:161— DimAuto.Calculate 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.
ListView.OnDrawingContent (cyclomatic 34) Terminal.Gui/Views/ListView/ListView.Drawing.cs:6— ListView.OnDrawingContent 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.
MarkdownTableLayoutEngine.Build (cyclomatic 34) Terminal.Gui/Views/Markdown/MarkdownTableLayoutEngine.cs:6— MarkdownTableLayoutEngine.Build 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.
top-level statements (cyclomatic 33) docfx/scripts/OutputView/OutputView.cs:11— top-level statements has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApplicationImpl.DrainInlineOutput (cyclomatic 32) Terminal.Gui/App/ApplicationImpl.InlineOutput.cs:162— ApplicationImpl.DrainInlineOutput has cyclomatic complexity 32 (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.
SchemeJsonConverter.Read (cyclomatic 31) Terminal.Gui/Configuration/SchemeJsonConverter.cs:11— SchemeJsonConverter.Read 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.
View.AdvanceFocus (cyclomatic 31) Terminal.Gui/ViewBase/View.Navigation.cs:29— View.AdvanceFocus 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.
TextView.OnDrawingContent (cyclomatic 30) Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs:18— TextView.OnDrawingContent 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.
TextView.ProcessInheritsPreviousScheme (cyclomatic 30) Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs:320— TextView.ProcessInheritsPreviousScheme has cyclomatic complexity 30 (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.
View.SetHasFocusFalse (cyclomatic 29) Terminal.Gui/ViewBase/View.Navigation.cs:775— View.SetHasFocusFalse 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.
Markdown.GetSelectedText (cyclomatic 29) Terminal.Gui/Views/Markdown/MarkdownView.Selection.cs:115— Markdown.GetSelectedText 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.
TableView.RenderRow (cyclomatic 29) Terminal.Gui/Views/TableView/TableView.Drawing.cs:385— TableView.RenderRow 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.
TextField.OnMouseEvent (cyclomatic 29) Terminal.Gui/Views/TextInput/TextField/TextField.Mouse.cs:83— TextField.OnMouseEvent 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.
TextModel.WordForward (cyclomatic 29) Terminal.Gui/Views/TextInput/TextModel.cs:498— TextModel.WordForward 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.
DynamicStatusBarSample.DynamicStatusBarSample.ctor (cyclomatic 29) Examples/UICatalog/Scenarios/DynamicStatusBar.cs:229— DynamicStatusBarSample.DynamicStatusBarSample.ctor has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 280, 311, 355, …). 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.
View.NewMouseEvent (cyclomatic 28) Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:482— View.NewMouseEvent 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.
BorderView.AddTabSideContentBorder (cyclomatic 27) Terminal.Gui/ViewBase/Adornment/BorderView.cs:942— BorderView.AddTabSideContentBorder 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.
View.GetViewsUnderLocation (cyclomatic 27) Terminal.Gui/ViewBase/View.Layout.cs:1463— View.GetViewsUnderLocation has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1481, 1532). 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.
PopupAutocomplete.RenderOverlay (cyclomatic 27) Terminal.Gui/Views/Autocomplete/PopupAutocomplete.cs:273— PopupAutocomplete.RenderOverlay 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.
MarkdownTableSource.Extract (cyclomatic 27) Terminal.Gui/Views/Markdown/MarkdownTableSource.cs:9— MarkdownTableSource.Extract 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.
MenuItem.OpenAndSelect (cyclomatic 27) Terminal.Gui/Views/Menu/MenuItem.cs:163— MenuItem.OpenAndSelect 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.
ApplicationImpl.TryShrinkInlineRegion (cyclomatic 26) Terminal.Gui/App/ApplicationImpl.InlineSizing.cs:9— ApplicationImpl.TryShrinkInlineRegion 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.
ViewportSettingsEditor.ViewportSettingsEditor_Initialized (cyclomatic 26) Examples/UICatalog/Scenarios/EditorsAndHelpers/ViewportSettingsEditor.cs:126— ViewportSettingsEditor.ViewportSettingsEditor_Initialized 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.
ConsoleKeyMapping.MapToConsoleKeyAndChar (cyclomatic 25) Terminal.Gui/Drivers/Keyboard/ConsoleKeyMapping.cs:301— ConsoleKeyMapping.MapToConsoleKeyAndChar 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. This is NOT this file's highest cyclomatic complexity: ConsoleKeyMapping.MapConsoleKeyInfoToKeyCode (cyclomatic 41) 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.
View.AssignHotKeyToView (cyclomatic 25) Terminal.Gui/ViewBase/View.Keyboard.cs:655— View.AssignHotKeyToView 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.
TextField.SetInsertionPointFromMouse (cyclomatic 25) Terminal.Gui/Views/TextInput/TextField/TextField.Mouse.cs:11— TextField.SetInsertionPointFromMouse has cyclomatic complexity 25 (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.
ApplicationImpl.CompleteInlineResize (cyclomatic 24) Terminal.Gui/App/ApplicationImpl.InlineResize.cs:91— ApplicationImpl.CompleteInlineResize has cyclomatic complexity 24 (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.
Arranger.DetermineArrangeModeFromClick (cyclomatic 24) Terminal.Gui/ViewBase/Adornment/Arranger.cs:824— Arranger.DetermineArrangeModeFromClick 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.
BorderView.DrawTabBorder (cyclomatic 24) Terminal.Gui/ViewBase/Adornment/BorderView.cs:786— BorderView.DrawTabBorder 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.
HexView.OnDrawingContent (cyclomatic 24) Terminal.Gui/Views/HexView.cs:467— HexView.OnDrawingContent 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.
LinearRangeViewBase.OnMouseEvent (cyclomatic 24) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1469— LinearRangeViewBase.OnMouseEvent 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.
Markdown.WrapBlock (cyclomatic 24) Terminal.Gui/Views/Markdown/MarkdownView.Layout.cs:273— Markdown.WrapBlock 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.
Markdown.AppendInlineSource (cyclomatic 24) Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs:462— Markdown.AppendInlineSource 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.
MouseTester.Main (cyclomatic 24) Examples/UICatalog/Scenarios/MouseTester.cs:10— MouseTester.Main has cyclomatic 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 17 function literals inside it that branch (lines 100, 119, 155, …). 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.
Shortcuts.HandleOnIsRunningChanged (cyclomatic 24) Examples/UICatalog/Scenarios/Shortcuts.cs:27— Shortcuts.HandleOnIsRunningChanged has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 99, 456, 396, …). 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.
Scheme.Scheme.ctor (cyclomatic 23) Terminal.Gui/Drawing/Scheme.cs:248— Scheme.Scheme.ctor 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. This is NOT this file's highest cyclomatic complexity: Scheme.GetAttributeForRoleCore (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
KittyKeyboardPattern.GetKeyImpl (cyclomatic 23) Terminal.Gui/Drivers/AnsiHandling/KittyKeyboardPattern.cs:73— KittyKeyboardPattern.GetKeyImpl has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Markdown.DrawSelectionOverlayOnSubViewRows (cyclomatic 23) Terminal.Gui/Views/Markdown/MarkdownView.Drawing.cs:76— Markdown.DrawSelectionOverlayOnSubViewRows 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.
Markdown.WalkInlines (cyclomatic 23) Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs:684— Markdown.WalkInlines 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.
TextField.OnDrawingContent (cyclomatic 23) Terminal.Gui/Views/TextInput/TextField/TextField.Drawing.cs:24— TextField.OnDrawingContent 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.
TextAlignmentAndDirection.Main (cyclomatic 23) Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:10— TextAlignmentAndDirection.Main has cyclomatic complexity 23 (threshold 15). Of this number, 15 points are the body's own statements and 8 belong to 3 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.
LineCanvas.GetRuneForIntersects (cyclomatic 22) Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:757— LineCanvas.GetRuneForIntersects has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 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.
OutputBase.RenderRasterImages (cyclomatic 22) Terminal.Gui/Drivers/Output/OutputBase.cs:1259— OutputBase.RenderRasterImages 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.
Aligner.Align (cyclomatic 22) Terminal.Gui/ViewBase/Layout/Aligner.cs:77— Aligner.Align has cyclomatic complexity 22 (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.
LinearRangeViewBase.DrawLegends (cyclomatic 22) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1285— LinearRangeViewBase.DrawLegends 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.
LinearRangeViewBase.ApplyMouseSelectionSpan (cyclomatic 22) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1805— LinearRangeViewBase.ApplyMouseSelectionSpan 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.
MarkdownTableCellParser.Lower (cyclomatic 22) Terminal.Gui/Views/Markdown/MarkdownTableCellParser.cs:16— MarkdownTableCellParser.Lower 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.
Markdown.BuildRenderedLines (cyclomatic 22) Terminal.Gui/Views/Markdown/MarkdownView.Layout.cs:5— Markdown.BuildRenderedLines has cyclomatic 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Markdown.WalkBlock (cyclomatic 22) Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs:94— Markdown.WalkBlock has cyclomatic complexity 22 (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.
UICatalogRunnable.CreateMenuBar (cyclomatic 22) Examples/UICatalog/UICatalogRunnable.cs:147— UICatalogRunnable.CreateMenuBar has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 belong to 8 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.
AnsiResponseParserBase.ProcessInputBaseImpl (cyclomatic 21) Terminal.Gui/Drivers/AnsiHandling/AnsiResponseParserBase.cs:150— AnsiResponseParserBase.ProcessInputBaseImpl 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.
TerminalDevice.InitializeWindows (cyclomatic 21) Terminal.Gui/Drivers/TerminalDevice.cs:291— TerminalDevice.InitializeWindows has cyclomatic complexity 21 (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.
TextFormatter.ClipAndJustify (cyclomatic 21) Terminal.Gui/Text/TextFormatter.cs:1810— TextFormatter.ClipAndJustify has cyclomatic 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
View.GetAttributeForRole (cyclomatic 21) Terminal.Gui/ViewBase/View.Drawing.Attribute.cs:40— View.GetAttributeForRole has cyclomatic complexity 21 (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.
View.GetViewsAtLocation (cyclomatic 21) Terminal.Gui/ViewBase/View.Layout.cs:1560— View.GetViewsAtLocation 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.
View.SetHasFocusTrue (cyclomatic 21) Terminal.Gui/ViewBase/View.Navigation.cs:583— View.SetHasFocusTrue 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.
Button.OnDrawingText (cyclomatic 21) Terminal.Gui/Views/Button.cs:229— Button.OnDrawingText 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.
MarkdownTable.WrapSegments (cyclomatic 21) Terminal.Gui/Views/Markdown/MarkdownTable.cs:472— MarkdownTable.WrapSegments 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.
TextModel.CalculateLeftColumn (cyclomatic 21) Terminal.Gui/Views/TextInput/TextModel.cs:680— TextModel.CalculateLeftColumn 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.
TextView.AdjustViewport (cyclomatic 21) Terminal.Gui/Views/TextInput/TextView/TextView.Scrolling.cs:91— TextView.AdjustViewport 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.
LineCanvas.GetRuneTypeForIntersects (cyclomatic 20) Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:850— LineCanvas.GetRuneTypeForIntersects 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.
StraightLineExtensions.Exclude (cyclomatic 20) Terminal.Gui/Drawing/LineCanvas/StraightLineExtensions.cs:16— StraightLineExtensions.Exclude 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.
Region.MergeRectangles (cyclomatic 20) Terminal.Gui/Drawing/Region.cs:568— Region.MergeRectangles has cyclomatic complexity 20 (threshold 15). Of this number, 16 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.
AnsiMouseEncoder.GetButtonCode (cyclomatic 20) Terminal.Gui/Drivers/AnsiHandling/AnsiMouseEncoder.cs:82— AnsiMouseEncoder.GetButtonCode 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.
View.SetViewport (cyclomatic 20) Terminal.Gui/ViewBase/View.Content.cs:517— View.SetViewport 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.
ListView.OnActivated (cyclomatic 20) Terminal.Gui/Views/ListView/ListView.Commands.cs:102— ListView.OnActivated has cyclomatic 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.
WordWrapManager.WrapModel (cyclomatic 20) Terminal.Gui/Views/TextInput/TextView/WordWrapManager.cs:150— WordWrapManager.WrapModel 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.
KeyCodeJsonConverter.Read (cyclomatic 19) Terminal.Gui/Configuration/KeyCodeJsonConverter.cs:9— KeyCodeJsonConverter.Read 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.
EscSeqUtils.ComputeTextStyleSgrCodes (cyclomatic 19) Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:846— EscSeqUtils.ComputeTextStyleSgrCodes 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.
View.DoDrawAdornmentsSubViews (cyclomatic 19) Terminal.Gui/ViewBase/View.Drawing.Adornments.cs:5— View.DoDrawAdornmentsSubViews has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
View.TryAssignTitleHotKey (cyclomatic 19) Terminal.Gui/ViewBase/View.Keyboard.cs:769— View.TryAssignTitleHotKey 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.
Menu.MoveFocus (cyclomatic 19) Terminal.Gui/Views/Menu/Menu.cs:202— Menu.MoveFocus 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.
TextModel.ProcessDoubleClickSelection (cyclomatic 19) Terminal.Gui/Views/TextInput/TextModel.cs:602— TextModel.ProcessDoubleClickSelection 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.
SemanticGroupAnalyzer.AnalyzeClass (cyclomatic 19) Scripts/PartialSplitter/Program.cs:98— SemanticGroupAnalyzer.AnalyzeClass 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.
MainLoopCoordinator.BuildDriverIfPossible (cyclomatic 18) Terminal.Gui/App/MainLoop/MainLoopCoordinator.cs:192— MainLoopCoordinator.BuildDriverIfPossible has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 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.
Region.SubtractRectangle (cyclomatic 18) Terminal.Gui/Drawing/Region.cs:848— Region.SubtractRectangle 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.
TextFormatter.FindHotKey (cyclomatic 18) Terminal.Gui/Text/TextFormatter.cs:2448— TextFormatter.FindHotKey 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.
View.CheckDimAuto (cyclomatic 18) Terminal.Gui/ViewBase/View.Layout.cs:1657— View.CheckDimAuto has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to one function item inside it that branches. 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.
MarkdownTable.OnDrawingContent (cyclomatic 18) Terminal.Gui/Views/Markdown/MarkdownTable.cs:392— MarkdownTable.OnDrawingContent 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.
MarkdownTableSerializer.Serialize (cyclomatic 18) Terminal.Gui/Views/Markdown/MarkdownTableSerializer.cs:6— MarkdownTableSerializer.Serialize has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Markdown.OnActivated (cyclomatic 18) Terminal.Gui/Views/Markdown/MarkdownView.Mouse.cs:213— Markdown.OnActivated 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.
TextField.PrepareSelection (cyclomatic 18) Terminal.Gui/Views/TextInput/TextField/TextField.Selection.cs:174— TextField.PrepareSelection 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.
TextView.PositionCursor (cyclomatic 18) Terminal.Gui/Views/TextInput/TextView/TextView.cs:236— TextView.PositionCursor 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.
TimeTextProvider.TryManualParse (cyclomatic 18) Terminal.Gui/Views/TextInput/TimeTextProvider.cs:458— TimeTextProvider.TryManualParse 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.
CharacterMap.Main (cyclomatic 18) Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs:55— CharacterMap.Main has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to 5 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.
ClassExplorer.TreeView_SelectionChanged (cyclomatic 18) Examples/UICatalog/Scenarios/ClassExplorer.cs:225— ClassExplorer.TreeView_SelectionChanged 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.
RegionScenario.Main (cyclomatic 18) Examples/UICatalog/Scenarios/RegionScenario.cs:24— RegionScenario.Main has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 86, 52). 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.
SpinnerViewStyles.Main (cyclomatic 18) Examples/UICatalog/Scenarios/SpinnerStyles.cs:13— SpinnerViewStyles.Main has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 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.
TableEditor.CreateViewMenu (cyclomatic 18) Examples/UICatalog/Scenarios/TableEditor.cs:403— TableEditor.CreateViewMenu has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 509, 626, 641, …). 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.
BackingFieldReordererRewriter.VisitClassDeclaration (cyclomatic 18) Scripts/BackingFieldReorderer/Program.cs:59— BackingFieldReordererRewriter.VisitClassDeclaration 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.
ApplicationImpl.End (cyclomatic 17) Terminal.Gui/App/ApplicationImpl.Run.cs:449— ApplicationImpl.End 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.
ApplicationImpl.LayoutAndDrawGuarded (cyclomatic 17) Terminal.Gui/App/ApplicationImpl.Screen.cs:133— ApplicationImpl.LayoutAndDrawGuarded 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.
ApplicationMouse.RaiseMouseEnterLeaveEvents (cyclomatic 17) Terminal.Gui/App/Mouse/ApplicationMouse.cs:359— ApplicationMouse.RaiseMouseEnterLeaveEvents has cyclomatic complexity 17 (threshold 15). Of this number, 16 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.
Region.CombineInternal (cyclomatic 17) Terminal.Gui/Drawing/Region.cs:127— Region.CombineInternal 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.
Osc8UrlLinker.WrapPlainText (cyclomatic 17) Terminal.Gui/Drivers/AnsiHandling/Osc8UrlLinker.cs:235— Osc8UrlLinker.WrapPlainText 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.
DimAuto.CategorizeViews (cyclomatic 17) Terminal.Gui/ViewBase/Layout/DimAuto.cs:61— DimAuto.CategorizeViews 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.
Markdown.HandleTableBlock (cyclomatic 17) Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs:309— Markdown.HandleTableBlock has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TableView.CalculateContentSize (cyclomatic 17) Terminal.Gui/Views/TableView/TableView.Content.cs:155— TableView.CalculateContentSize 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.
TableView.OnDrawingContent (cyclomatic 17) Terminal.Gui/Views/TableView/TableView.Drawing.cs:49— TableView.OnDrawingContent 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.
TableView.RenderHeaderUnderline (cyclomatic 17) Terminal.Gui/Views/TableView/TableView.Drawing.cs:334— TableView.RenderHeaderUnderline has cyclomatic complexity 17 (threshold 15). Of this number, 16 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.
TableView.EnsureCursorIsVisible (cyclomatic 17) Terminal.Gui/Views/TableView/TableView.Selection.cs:120— TableView.EnsureCursorIsVisible 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.
InlineTranscript.Main (cyclomatic 17) Examples/UICatalog/Scenarios/InlineTranscript.cs:12— InlineTranscript.Main has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 28, 71). 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.
WideGlyphs.Main (cyclomatic 17) Examples/UICatalog/Scenarios/WideGlyphs.cs:14— WideGlyphs.Main has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 72, 43, 149). 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.
ApplicationImpl.PrepareInlineOutput (cyclomatic 16) Terminal.Gui/App/ApplicationImpl.InlineOutput.cs:43— ApplicationImpl.PrepareInlineOutput 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.
RuneJsonConverter.ParseString (cyclomatic 16) Terminal.Gui/Configuration/RuneJsonConverter.cs:90— RuneJsonConverter.ParseString 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.
Region.MinimizeRectangles (cyclomatic 16) Terminal.Gui/Drawing/Region.cs:774— Region.MinimizeRectangles 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 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.
Thickness.Draw (cyclomatic 16) Terminal.Gui/Drawing/Thickness.cs:88— Thickness.Draw 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.
AnsiResponseParserBase.HandleHeldContent (cyclomatic 16) Terminal.Gui/Drivers/AnsiHandling/AnsiResponseParserBase.cs:390— AnsiResponseParserBase.HandleHeldContent 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.
InlineOutputLayout.Rows (cyclomatic 16) Terminal.Gui/Drivers/Output/InlineOutputLayout.cs:113— InlineOutputLayout.Rows 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.
View.HandleAutoGrabPress (cyclomatic 16) Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:735— View.HandleAutoGrabPress 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.
View.TryBubbleUp (cyclomatic 16) Terminal.Gui/ViewBase/View.Command.cs:1384— View.TryBubbleUp 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.
View.DrawSubViews (cyclomatic 16) Terminal.Gui/ViewBase/View.Drawing.cs:695— View.DrawSubViews 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.
View.DoDrawComplete (cyclomatic 16) Terminal.Gui/ViewBase/View.Drawing.cs:957— View.DoDrawComplete 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.
View.GetLocationEnsuringFullVisibility (cyclomatic 16) Terminal.Gui/ViewBase/View.Layout.cs:1312— View.GetLocationEnsuringFullVisibility 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.
Bar.LayoutBarItems (cyclomatic 16) Terminal.Gui/Views/Bar.cs:227— Bar.LayoutBarItems 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.
BarSeries.DrawSeries (cyclomatic 16) Terminal.Gui/Views/GraphView/Series.cs:34— BarSeries.DrawSeries 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.
HexView.OnKeyDownNotHandled (cyclomatic 16) Terminal.Gui/Views/HexView.cs:650— HexView.OnKeyDownNotHandled 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.
LinearRange.IndicesForValue (cyclomatic 16) Terminal.Gui/Views/LinearRange/LinearRangeT.cs:190— LinearRange.IndicesForValue 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.
ListView.SetSelection (cyclomatic 16) Terminal.Gui/Views/ListView/ListView.Selection.cs:242— ListView.SetSelection 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.
Markdown.DrawRenderedLine (cyclomatic 16) Terminal.Gui/Views/Markdown/MarkdownView.Drawing.cs:207— Markdown.DrawRenderedLine 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.
TextField.OnHasFocusChanged (cyclomatic 16) Terminal.Gui/Views/TextInput/TextField/TextField.cs:144— TextField.OnHasFocusChanged 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.
TextField.Adjust (cyclomatic 16) Terminal.Gui/Views/TextInput/TextField/TextField.Text.cs:530— TextField.Adjust 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.
ViewportSettingsEditor.OnViewToEditChanged (cyclomatic 16) Examples/UICatalog/Scenarios/EditorsAndHelpers/ViewportSettingsEditor.cs:19— ViewportSettingsEditor.OnViewToEditChanged 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.
TableViewColors.RenderCell (cyclomatic 16) Examples/UICatalog/Scenarios/MultiColouredTable.cs:119— TableViewColors.RenderCell 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.
ScrollBarDemo.Main (cyclomatic 16) Examples/UICatalog/Scenarios/ScrollBarDemo.cs:10— ScrollBarDemo.Main has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 61, 188, 130, …). 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.
Selectors.Main (cyclomatic 16) Examples/UICatalog/Scenarios/Selectors.cs:10— Selectors.Main 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.
Skipped test: InputProcessor_ProcessQueue_DrainsPendingMouseEvents Tests/UnitTestsParallelizable/Input/InjectMouseEventTests.cs:405— Skipped — Skip for now
D10 · Test Quality· Fixed-sleep synchronisation · ×1
Fixed-sleep synchronisation: Dispose_WhileOperationsInProgress_NoExceptions Tests/UnitTests.NonParallelizable/Application/Keyboard/ApplicationKeyboardThreadSafetyTests.cs:57— This test starts a background task and then orders itself against it with `Thread.Sleep(10)` — 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.
Races the wall clock: Constructor_Defaults Tests/UnitTestsParallelizable/Views/DateEditorTests.cs:9— This test reads `DateTime.Today` and compares it against the value the code under test computed from its own clock read, compared exactly in `Assert.Equal (DateTime.Today, de.Value)`. Those are two independent clock reads, so the test passes only while no boundary falls between them — a second ticking over between the code's read and the test's, or, for a date, a day that differs between the machine's local zone and UTC. It passes or fails on the time of day and the build agent's time zone, and re-running the suite on one machine cannot reveal it. Read the clock once: give the code under test a clock the test controls (a fake time provider, fake timers with a fixed system time) and build the expectation from that same instant, or assert a range rather than an exact value.
BareSuppressMessage Tests/TestEnvironmentSetup.cs:13— 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.
TextFormatter.Draw (cognitive 237) Terminal.Gui/Text/TextFormatter.cs:60— TextFormatter.Draw has cognitive complexity 237 (threshold 15). Of this number, 232 points are the body's own statements and 5 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.
TextFormatter.GetDrawRegion (cognitive 117) Terminal.Gui/Text/TextFormatter.cs:913— TextFormatter.GetDrawRegion has cognitive complexity 117 (threshold 15). Of this number, 114 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.
LinearRangeViewBase.DrawLinearRange (cognitive 109) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1081— LinearRangeViewBase.DrawLinearRange has cognitive complexity 109 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextFormatter.WordWrapText (cognitive 102) Terminal.Gui/Text/TextFormatter.cs:1533— TextFormatter.WordWrapText has cognitive complexity 102 (threshold 15). Of this number, 98 points are the body's own statements and 4 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.
DimAuto.Calculate (cognitive 101) Terminal.Gui/ViewBase/Layout/DimAuto.cs:161— DimAuto.Calculate has cognitive complexity 101 (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.
View.RenderLineCanvas (cognitive 100) Terminal.Gui/ViewBase/View.Drawing.LineCanvas.cs:30— View.RenderLineCanvas has cognitive complexity 100 (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.
ListView.OnDrawingContent (cognitive 94) Terminal.Gui/Views/ListView/ListView.Drawing.cs:6— ListView.OnDrawingContent has cognitive complexity 94 (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.
ApplicationImpl.LayoutAndDrawCore (cognitive 88) Terminal.Gui/App/ApplicationImpl.Screen.cs:183— ApplicationImpl.LayoutAndDrawCore has cognitive complexity 88 (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.
CharMap.OnDrawingContent (cognitive 84) Terminal.Gui/Views/CharMap/CharMap.cs:743— CharMap.OnDrawingContent 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.
LinearRangeViewBase.SetFocusedOption (cognitive 83) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1976— LinearRangeViewBase.SetFocusedOption has cognitive complexity 83 (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.
OutputBase.WriteFrame (cognitive 81) Terminal.Gui/Drivers/Output/OutputBase.cs:321— OutputBase.WriteFrame has cognitive complexity 81 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KeyCodeJsonConverter.Read (cognitive 77) Terminal.Gui/Configuration/KeyCodeJsonConverter.cs:9— KeyCodeJsonConverter.Read has cognitive complexity 77 (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.
Branch.Draw (cognitive 74) Terminal.Gui/Views/TreeView/Branch.cs:79— Branch.Draw 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.
Markdown.WrapBlock (cognitive 68) Terminal.Gui/Views/Markdown/MarkdownView.Layout.cs:273— Markdown.WrapBlock has cognitive complexity 68 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StraightLineExtensions.Exclude (cognitive 66) Terminal.Gui/Drawing/LineCanvas/StraightLineExtensions.cs:16— StraightLineExtensions.Exclude 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.
HexView.OnDrawingContent (cognitive 66) Terminal.Gui/Views/HexView.cs:467— HexView.OnDrawingContent has cognitive complexity 66 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PosAlignDemo.SetupControls (cognitive 66) Examples/UICatalog/Scenarios/PosAlignDemo.cs:33— PosAlignDemo.SetupControls has cognitive complexity 66 (threshold 15). Of this number, 26 points are the body's own statements and 40 belong to 6 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.
BorderView.DrawLegacyBorder (cognitive 62) Terminal.Gui/ViewBase/Adornment/BorderView.cs:235— BorderView.DrawLegacyBorder has cognitive complexity 62 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextView.OnDrawingContent (cognitive 60) Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs:18— TextView.OnDrawingContent 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.
Key.TryParse (cognitive 56) Terminal.Gui/Input/Keyboard/Key.cs:881— Key.TryParse has cognitive complexity 56 (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.
BorderView.AddTabSideContentBorder (cognitive 55) Terminal.Gui/ViewBase/Adornment/BorderView.cs:942— BorderView.AddTabSideContentBorder has cognitive complexity 55 (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.
MarkdownTableLayoutEngine.Build (cognitive 55) Terminal.Gui/Views/Markdown/MarkdownTableLayoutEngine.cs:6— MarkdownTableLayoutEngine.Build has cognitive complexity 55 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TableView.RenderRow (cognitive 55) Terminal.Gui/Views/TableView/TableView.Drawing.cs:385— TableView.RenderRow has cognitive complexity 55 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HistoryText.ProcessChanges (cognitive 55) Terminal.Gui/Views/TextInput/HistoryText.cs:140— HistoryText.ProcessChanges has cognitive complexity 55 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextModel.WordBackward (cognitive 55) Terminal.Gui/Views/TextInput/TextModel.cs:347— TextModel.WordBackward has cognitive complexity 55 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WindowsKeyHelper.MapKey (cognitive 53) Terminal.Gui/Drivers/WindowsDriver/WindowsKeyHelper.cs:51— WindowsKeyHelper.MapKey has cognitive complexity 53 (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.
Markdown.GetSelectedText (cognitive 52) Terminal.Gui/Views/Markdown/MarkdownView.Selection.cs:115— Markdown.GetSelectedText 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.
TextView.OnMouseEvent (cognitive 52) Terminal.Gui/Views/TextInput/TextView/TextView.Mouse.cs:18— TextView.OnMouseEvent 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.
AnsiResponseParserBase.ProcessInputBaseImpl (cognitive 51) Terminal.Gui/Drivers/AnsiHandling/AnsiResponseParserBase.cs:150— AnsiResponseParserBase.ProcessInputBaseImpl has cognitive complexity 51 (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.
MenuItem.OpenAndSelect (cognitive 51) Terminal.Gui/Views/Menu/MenuItem.cs:163— MenuItem.OpenAndSelect has cognitive complexity 51 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
View.SetHasFocusFalse (cognitive 47) Terminal.Gui/ViewBase/View.Navigation.cs:775— View.SetHasFocusFalse has cognitive complexity 47 (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.
View.AdvanceFocus (cognitive 46) Terminal.Gui/ViewBase/View.Navigation.cs:29— View.AdvanceFocus 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.
Bar.LayoutBarItems (cognitive 46) Terminal.Gui/Views/Bar.cs:227— Bar.LayoutBarItems has cognitive complexity 46 (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.
PopupAutocomplete.RenderOverlay (cognitive 45) Terminal.Gui/Views/Autocomplete/PopupAutocomplete.cs:273— PopupAutocomplete.RenderOverlay has cognitive complexity 45 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
top-level statements (cognitive 44) docfx/scripts/OutputView/OutputView.cs:11— top-level statements 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.
TextView.ProcessInheritsPreviousScheme (cognitive 43) Terminal.Gui/Views/TextInput/TextView/TextView.Drawing.cs:320— TextView.ProcessInheritsPreviousScheme has cognitive complexity 43 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WordWrapManager.WrapModel (cognitive 42) Terminal.Gui/Views/TextInput/TextView/WordWrapManager.cs:150— WordWrapManager.WrapModel 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.
View.GetViewsAtLocation (cognitive 40) Terminal.Gui/ViewBase/View.Layout.cs:1560— View.GetViewsAtLocation 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.
Markdown.DrawSelectionOverlayOnSubViewRows (cognitive 40) Terminal.Gui/Views/Markdown/MarkdownView.Drawing.cs:76— Markdown.DrawSelectionOverlayOnSubViewRows has cognitive complexity 40 (threshold 15). Of this number, 39 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.
LineCanvas.GetRuneForIntersects (cognitive 39) Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:757— LineCanvas.GetRuneForIntersects has cognitive complexity 39 (threshold 15). Of this number, 33 points are the body's own statements and 6 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.
InlineOutputLayout.Rows (cognitive 39) Terminal.Gui/Drivers/Output/InlineOutputLayout.cs:113— InlineOutputLayout.Rows 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.
TableView.RenderHeaderUnderline (cognitive 39) Terminal.Gui/Views/TableView/TableView.Drawing.cs:334— TableView.RenderHeaderUnderline has cognitive complexity 39 (threshold 15). Of this number, 38 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.
Markdown.BuildRenderedLines (cognitive 38) Terminal.Gui/Views/Markdown/MarkdownView.Layout.cs:5— Markdown.BuildRenderedLines has cognitive complexity 38 (threshold 15). Of this number, 32 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.
TextView.ProcessMouseClick (cognitive 38) Terminal.Gui/Views/TextInput/TextView/TextView.Mouse.cs:212— TextView.ProcessMouseClick has cognitive 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.
View.AssignHotKeyToView (cognitive 37) Terminal.Gui/ViewBase/View.Keyboard.cs:655— View.AssignHotKeyToView 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.
LinearRangeViewBase.DrawLegends (cognitive 37) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1285— LinearRangeViewBase.DrawLegends 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.
MarkdownTable.WrapSegments (cognitive 37) Terminal.Gui/Views/Markdown/MarkdownTable.cs:472— MarkdownTable.WrapSegments 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.
MarkdownTableSource.Extract (cognitive 37) Terminal.Gui/Views/Markdown/MarkdownTableSource.cs:9— MarkdownTableSource.Extract 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.
TextModel.WordForward (cognitive 37) Terminal.Gui/Views/TextInput/TextModel.cs:498— TextModel.WordForward 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.
SemanticGroupAnalyzer.AnalyzeClass (cognitive 37) Scripts/PartialSplitter/Program.cs:98— SemanticGroupAnalyzer.AnalyzeClass 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.
EscSeqUtils.ComputeTextStyleSgrCodes (cognitive 36) Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:846— EscSeqUtils.ComputeTextStyleSgrCodes 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.
TextFormatter.ClipAndJustify (cognitive 36) Terminal.Gui/Text/TextFormatter.cs:1810— TextFormatter.ClipAndJustify has cognitive complexity 36 (threshold 15). Of this number, 35 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.
View.NewMouseEvent (cognitive 36) Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:482— View.NewMouseEvent 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.
LinearRangeViewBase.OnMouseEvent (cognitive 36) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1469— LinearRangeViewBase.OnMouseEvent has cognitive complexity 36 (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.
LinearRangeViewBase.ApplyMouseSelectionSpan (cognitive 36) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1805— LinearRangeViewBase.ApplyMouseSelectionSpan 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.
TableView.CalculateContentSize (cognitive 36) Terminal.Gui/Views/TableView/TableView.Content.cs:155— TableView.CalculateContentSize 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.
TextAlignmentAndDirection.Main (cognitive 36) Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:10— TextAlignmentAndDirection.Main has cognitive complexity 36 (threshold 15). Of this number, 25 points are the body's own statements and 11 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.
MarkdownTableCellParser.Lower (cognitive 35) Terminal.Gui/Views/Markdown/MarkdownTableCellParser.cs:16— MarkdownTableCellParser.Lower 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.
BackingFieldReordererRewriter.VisitClassDeclaration (cognitive 35) Scripts/BackingFieldReorderer/Program.cs:59— BackingFieldReordererRewriter.VisitClassDeclaration 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.
ApplicationMouse.RaiseMouseEvent (cognitive 34) Terminal.Gui/App/Mouse/ApplicationMouse.cs:133— ApplicationMouse.RaiseMouseEvent has cognitive complexity 34 (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.
OutputBase.RenderRasterImages (cognitive 34) Terminal.Gui/Drivers/Output/OutputBase.cs:1259— OutputBase.RenderRasterImages 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.
Region.MergeRectangles (cognitive 33) Terminal.Gui/Drawing/Region.cs:568— Region.MergeRectangles has cognitive complexity 33 (threshold 15). Of this number, 29 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OutputBase.BuildAnsiForRegionSkippingRasterCoveredBlanks (cognitive 33) Terminal.Gui/Drivers/Output/OutputBase.cs:1000— OutputBase.BuildAnsiForRegionSkippingRasterCoveredBlanks 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.
Markdown.HandleListBlock (cognitive 33) Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs:251— Markdown.HandleListBlock 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.
ViewportSettingsEditor.ViewportSettingsEditor_Initialized (cognitive 32) Examples/UICatalog/Scenarios/EditorsAndHelpers/ViewportSettingsEditor.cs:126— ViewportSettingsEditor.ViewportSettingsEditor_Initialized has cognitive complexity 32 (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.
Arranger.DetermineArrangeModeFromClick (cognitive 31) Terminal.Gui/ViewBase/Adornment/Arranger.cs:824— Arranger.DetermineArrangeModeFromClick 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.
BorderView.DrawTabBorder (cognitive 31) Terminal.Gui/ViewBase/Adornment/BorderView.cs:786— BorderView.DrawTabBorder 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.
DynamicStatusBarSample.DynamicStatusBarSample.ctor (cognitive 31) Examples/UICatalog/Scenarios/DynamicStatusBar.cs:229— DynamicStatusBarSample.DynamicStatusBarSample.ctor has cognitive complexity 31 (threshold 15). Most of this is not in the body itself: 9 of the 31 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 355, 280, 311, …). 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.
KeyBindingConfiguration.OverlayViewKeyBindings (cognitive 30) Terminal.Gui/Configuration/Settings/KeyBindingConfiguration.cs:107— KeyBindingConfiguration.OverlayViewKeyBindings 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.
Markdown.HandleTableBlock (cognitive 30) Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs:309— Markdown.HandleTableBlock 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.
SixelEncoder.ProcessBand (cognitive 29) Terminal.Gui/Drawing/Sixel/SixelEncoder.cs:105— SixelEncoder.ProcessBand 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.
TextFormatter.FindHotKey (cognitive 29) Terminal.Gui/Text/TextFormatter.cs:2448— TextFormatter.FindHotKey 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.
BarSeries.DrawSeries (cognitive 29) Terminal.Gui/Views/GraphView/Series.cs:34— BarSeries.DrawSeries 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.
Markdown.DrawRenderedLine (cognitive 29) Terminal.Gui/Views/Markdown/MarkdownView.Drawing.cs:207— Markdown.DrawRenderedLine 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.
Markdown.AppendInlineSource (cognitive 29) Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs:462— Markdown.AppendInlineSource 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.
TableView.OnDrawingContent (cognitive 29) Terminal.Gui/Views/TableView/TableView.Drawing.cs:49— TableView.OnDrawingContent 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.
View.SetViewport (cognitive 28) Terminal.Gui/ViewBase/View.Content.cs:517— View.SetViewport 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.
View.TopologicalSort (cognitive 28) Terminal.Gui/ViewBase/View.Layout.cs:1179— View.TopologicalSort 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.
Menu.MoveFocus (cognitive 28) Terminal.Gui/Views/Menu/Menu.cs:202— Menu.MoveFocus 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.
TextField.OnDrawingContent (cognitive 28) Terminal.Gui/Views/TextInput/TextField/TextField.Drawing.cs:24— TextField.OnDrawingContent 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.
TextField.OnMouseEvent (cognitive 28) Terminal.Gui/Views/TextInput/TextField/TextField.Mouse.cs:83— TextField.OnMouseEvent 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.
TextModel.ProcessDoubleClickSelection (cognitive 28) Terminal.Gui/Views/TextInput/TextModel.cs:602— TextModel.ProcessDoubleClickSelection 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.
TextModel.CalculateLeftColumn (cognitive 28) Terminal.Gui/Views/TextInput/TextModel.cs:680— TextModel.CalculateLeftColumn 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.
MazeGenerator.BuildWallLinesFromMaze (cognitive 28) Examples/UICatalog/Scenarios/Mazing.cs:251— MazeGenerator.BuildWallLinesFromMaze has cognitive complexity 28 (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.
SpinnerViewStyles.Main (cognitive 28) Examples/UICatalog/Scenarios/SpinnerStyles.cs:13— SpinnerViewStyles.Main has cognitive complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 138, 125, 92). 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.
UICatalogRunnable.CreateMenuBar (cognitive 28) Examples/UICatalog/UICatalogRunnable.cs:147— UICatalogRunnable.CreateMenuBar has cognitive complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 189, 309, 331, …). 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.
ApplicationMouse.RaiseMouseEnterLeaveEvents (cognitive 27) Terminal.Gui/App/Mouse/ApplicationMouse.cs:359— ApplicationMouse.RaiseMouseEnterLeaveEvents has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Gradient.BuildCoordinateColorMapping (cognitive 27) Terminal.Gui/Drawing/Gradient.cs:180— Gradient.BuildCoordinateColorMapping has cognitive complexity 27 (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.
ClassExplorer.TreeView_SelectionChanged (cognitive 27) Examples/UICatalog/Scenarios/ClassExplorer.cs:225— ClassExplorer.TreeView_SelectionChanged 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.
AttributeJsonConverter.Read (cognitive 26) Terminal.Gui/Configuration/AttributeJsonConverter.cs:25— AttributeJsonConverter.Read 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.
DimAuto.CategorizeViews (cognitive 26) Terminal.Gui/ViewBase/Layout/DimAuto.cs:61— DimAuto.CategorizeViews 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.
View.GetViewsUnderLocation (cognitive 26) Terminal.Gui/ViewBase/View.Layout.cs:1463— View.GetViewsUnderLocation has cognitive complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1481, 1532). 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.
MarkdownTable.CollapseWidths (cognitive 26) Terminal.Gui/Views/Markdown/MarkdownTable.cs:614— MarkdownTable.CollapseWidths 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.
MarkdownTableCellParser.Serialize (cognitive 26) Terminal.Gui/Views/Markdown/MarkdownTableCellParser.cs:127— MarkdownTableCellParser.Serialize 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.
SpinnerView.AdvanceAnimation (cognitive 26) Terminal.Gui/Views/SpinnerView/SpinnerView.cs:130— SpinnerView.AdvanceAnimation 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.
TextField.PrepareSelection (cognitive 26) Terminal.Gui/Views/TextInput/TextField/TextField.Selection.cs:174— TextField.PrepareSelection 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.
Shortcuts.HandleOnIsRunningChanged (cognitive 26) Examples/UICatalog/Scenarios/Shortcuts.cs:27— Shortcuts.HandleOnIsRunningChanged has cognitive complexity 26 (threshold 15). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 99, 456, 396, …). 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.
AnsiInput.FlushInput (cognitive 25) Terminal.Gui/Drivers/AnsiDriver/AnsiInput.cs:283— AnsiInput.FlushInput 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.
Osc8UrlLinker.WrapPlainText (cognitive 25) Terminal.Gui/Drivers/AnsiHandling/Osc8UrlLinker.cs:235— Osc8UrlLinker.WrapPlainText 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.
TextFormatter.Format (cognitive 25) Terminal.Gui/Text/TextFormatter.cs:2081— TextFormatter.Format 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.
View.DoDrawAdornmentsSubViews (cognitive 25) Terminal.Gui/ViewBase/View.Drawing.Adornments.cs:5— View.DoDrawAdornmentsSubViews has cognitive complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Markdown.WalkInlines (cognitive 25) Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs:684— Markdown.WalkInlines 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.
TextView.PositionCursor (cognitive 25) Terminal.Gui/Views/TextInput/TextView/TextView.cs:236— TextView.PositionCursor 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.
OutputBase.ClearKittyRasterBlankCells (cognitive 24) Terminal.Gui/Drivers/Output/OutputBase.cs:1072— OutputBase.ClearKittyRasterBlankCells 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.
View.TryAssignTitleHotKey (cognitive 24) Terminal.Gui/ViewBase/View.Keyboard.cs:769— View.TryAssignTitleHotKey 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.
HexView.OnKeyDownNotHandled (cognitive 24) Terminal.Gui/Views/HexView.cs:650— HexView.OnKeyDownNotHandled has cognitive complexity 24 (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.
ProgressBar.OnDrawingContent (cognitive 24) Terminal.Gui/Views/ProgressBar.cs:236— ProgressBar.OnDrawingContent 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.
TextView.CutToStartOfLine (cognitive 24) Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:639— TextView.CutToStartOfLine 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.
WideGlyphs.Main (cognitive 24) Examples/UICatalog/Scenarios/WideGlyphs.cs:14— WideGlyphs.Main has cognitive complexity 24 (threshold 15). None of this is in the body itself: all 24 points belong to 3 function literals inside it that branch (lines 72, 43, 149). 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.
PartialFileGenerator.GeneratePartials (cognitive 24) Scripts/PartialSplitter/Program.cs:284— PartialFileGenerator.GeneratePartials 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.
ApplicationKeyboard.RaiseKeyDownEvent (cognitive 23) Terminal.Gui/App/Keyboard/ApplicationKeyboard.cs:94— ApplicationKeyboard.RaiseKeyDownEvent 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.
RuneJsonConverter.ParseString (cognitive 23) Terminal.Gui/Configuration/RuneJsonConverter.cs:90— RuneJsonConverter.ParseString 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.
TextFormatter.StripCRLF (cognitive 23) Terminal.Gui/Text/TextFormatter.cs:1249— TextFormatter.StripCRLF 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.
View.HandleAutoGrabPress (cognitive 23) Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:735— View.HandleAutoGrabPress 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.
MarkdownTableSerializer.Serialize (cognitive 23) Terminal.Gui/Views/Markdown/MarkdownTableSerializer.cs:6— MarkdownTableSerializer.Serialize 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.
TableData.TableData.ctor (cognitive 23) Terminal.Gui/Views/Markdown/TableData.Grid.cs:42— TableData.TableData.ctor has cognitive complexity 23 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TableView.RenderHeaderOverline (cognitive 23) Terminal.Gui/Views/TableView/TableView.Drawing.cs:286— TableView.RenderHeaderOverline 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.
TextView.HistoryText_ChangeText (cognitive 23) Terminal.Gui/Views/TextInput/TextView/TextView.History.cs:16— TextView.HistoryText_ChangeText 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.
TextView.AdjustViewport (cognitive 23) Terminal.Gui/Views/TextInput/TextView/TextView.Scrolling.cs:91— TextView.AdjustViewport 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.
MouseTester.Main (cognitive 23) Examples/UICatalog/Scenarios/MouseTester.cs:10— MouseTester.Main has cognitive complexity 23 (threshold 15). None of this is in the body itself: all 23 points belong to 17 function literals inside it that branch (lines 100, 119, 155, …). 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.
ApplicationImpl.DrainInlineOutput (cognitive 22) Terminal.Gui/App/ApplicationImpl.InlineOutput.cs:162— ApplicationImpl.DrainInlineOutput 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.
IntersectionRuneResolver.GetRuneForIntersects (cognitive 22) Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:1024— IntersectionRuneResolver.GetRuneForIntersects has cognitive complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 2 function items inside it that branch (AnyWithOrientationAndAnyLineStyle, UseRounded). 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.
TextMateSyntaxHighlighter.TryLoadGrammar (cognitive 22) Terminal.Gui/Drawing/Markdown/TextMateSyntaxHighlighter.cs:351— TextMateSyntaxHighlighter.TryLoadGrammar 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.
Scheme.Scheme.ctor (cognitive 22) Terminal.Gui/Drawing/Scheme.cs:248— Scheme.Scheme.ctor 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.
EscSeqUtils.MapKey (cognitive 22) Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:477— EscSeqUtils.MapKey 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.
Osc8UrlLinker.ParseEscapeSequence (cognitive 22) Terminal.Gui/Drivers/AnsiHandling/Osc8UrlLinker.cs:183— Osc8UrlLinker.ParseEscapeSequence 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.
OutputBase.BuildAnsiForRegion (cognitive 22) Terminal.Gui/Drivers/Output/OutputBase.cs:790— OutputBase.BuildAnsiForRegion 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.
View.SetHasFocusTrue (cognitive 22) Terminal.Gui/ViewBase/View.Navigation.cs:583— View.SetHasFocusTrue has cognitive complexity 22 (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.
LinearRangeViewBase.SetContentSize (cognitive 22) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:695— LinearRangeViewBase.SetContentSize 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.
MarkdownTableLayoutEngine.LayoutBlocks (cognitive 22) Terminal.Gui/Views/Markdown/MarkdownTableLayoutEngine.cs:380— MarkdownTableLayoutEngine.LayoutBlocks 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.
Markdown.OnActivated (cognitive 22) Terminal.Gui/Views/Markdown/MarkdownView.Mouse.cs:213— Markdown.OnActivated 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.
Shortcut.ShowHide (cognitive 22) Terminal.Gui/Views/Shortcut.cs:258— Shortcut.ShowHide 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.
CharacterMap.Main (cognitive 22) Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs:55— CharacterMap.Main has cognitive complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 5 function literals inside it that branch. 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.
RegionScenario.Main (cognitive 22) Examples/UICatalog/Scenarios/RegionScenario.cs:24— RegionScenario.Main has cognitive complexity 22 (threshold 15). None of this is in the body itself: all 22 points belong to 2 function literals inside it that branch (lines 52, 86). 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.
MainLoopCoordinator.BuildDriverIfPossible (cognitive 21) Terminal.Gui/App/MainLoop/MainLoopCoordinator.cs:192— MainLoopCoordinator.BuildDriverIfPossible has cognitive complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 2 function literals inside it that branch. 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.
LineCanvas.GetCellMapWithRegion (cognitive 21) Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:321— LineCanvas.GetCellMapWithRegion 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.
TextFormatter.Justify (cognitive 21) Terminal.Gui/Text/TextFormatter.cs:1932— TextFormatter.Justify 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.
LinearRange.IndicesForValue (cognitive 21) Terminal.Gui/Views/LinearRange/LinearRangeT.cs:190— LinearRange.IndicesForValue has cognitive complexity 21 (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.
MarkdownTable.OnDrawingContent (cognitive 21) Terminal.Gui/Views/Markdown/MarkdownTable.cs:392— MarkdownTable.OnDrawingContent 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.
MarkdownTableLayoutEngine.AllocateWidths (cognitive 21) Terminal.Gui/Views/Markdown/MarkdownTableLayoutEngine.cs:194— MarkdownTableLayoutEngine.AllocateWidths 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.
ProgressBar.Pulse (cognitive 21) Terminal.Gui/Views/ProgressBar.cs:334— ProgressBar.Pulse 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.
TableView.RenderBottomLine (cognitive 21) Terminal.Gui/Views/TableView/TableView.Drawing.cs:184— TableView.RenderBottomLine 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TableView.GetAllSelectedCells (cognitive 21) Terminal.Gui/Views/TableView/TableView.Selection.cs:282— TableView.GetAllSelectedCells 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.
TextModel.ReplaceAllText (cognitive 21) Terminal.Gui/Views/TextInput/TextModel.cs:1011— TextModel.ReplaceAllText 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.
TextView.CutToEndOfLine (cognitive 21) Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:546— TextView.CutToEndOfLine 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.
TimeTextProvider.TryManualParse (cognitive 21) Terminal.Gui/Views/TextInput/TimeTextProvider.cs:458— TimeTextProvider.TryManualParse has cognitive complexity 21 (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.
Region.CombineInternal (cognitive 20) Terminal.Gui/Drawing/Region.cs:127— Region.CombineInternal has cognitive complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Thickness.Draw (cognitive 20) Terminal.Gui/Drawing/Thickness.cs:88— Thickness.Draw 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.
Osc8UrlLinker.WrapOsc8 (cognitive 20) Terminal.Gui/Drivers/AnsiHandling/Osc8UrlLinker.cs:40— Osc8UrlLinker.WrapOsc8 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.
OutputBufferImpl.SyncAutoUrlsForRowCore (cognitive 20) Terminal.Gui/Drivers/Output/OutputBufferImpl.cs:671— OutputBufferImpl.SyncAutoUrlsForRowCore 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.
TextFormatter.GetStringWidth (cognitive 20) Terminal.Gui/Text/TextFormatter.cs:2368— TextFormatter.GetStringWidth 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.
View.TryBubbleUp (cognitive 20) Terminal.Gui/ViewBase/View.Command.cs:1384— View.TryBubbleUp 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.
View.DoDrawComplete (cognitive 20) Terminal.Gui/ViewBase/View.Drawing.cs:957— View.DoDrawComplete 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.
View.HotKey.set (cognitive 20) Terminal.Gui/ViewBase/View.Keyboard.cs:107— View.HotKey.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.
View.GetLocationEnsuringFullVisibility (cognitive 20) Terminal.Gui/ViewBase/View.Layout.cs:1312— View.GetLocationEnsuringFullVisibility 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.
View.GetViewsUnderLocation (cognitive 20) Terminal.Gui/ViewBase/View.Layout.cs:1390— View.GetViewsUnderLocation 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.
Button.OnDrawingText (cognitive 20) Terminal.Gui/Views/Button.cs:229— Button.OnDrawingText 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.
CharMap.RebuildVisibleRows (cognitive 20) Terminal.Gui/Views/CharMap/CharMap.cs:160— CharMap.RebuildVisibleRows 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.
TextField.SetInsertionPointFromMouse (cognitive 20) Terminal.Gui/Views/TextInput/TextField/TextField.Mouse.cs:11— TextField.SetInsertionPointFromMouse 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.
DrawLineTool.OnMouseEvent (cognitive 20) Examples/UICatalog/Scenarios/LineDrawing.cs:16— DrawLineTool.OnMouseEvent 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.
Notepad.Quit (cognitive 20) Examples/UICatalog/Scenarios/Notepad.cs:284— Notepad.Quit 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.
ApplicationImpl.CreateDriver (cognitive 19) Terminal.Gui/App/ApplicationImpl.Driver.cs:27— ApplicationImpl.CreateDriver 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.
LineCanvas.GetRuneTypeForIntersects (cognitive 19) Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:850— LineCanvas.GetRuneTypeForIntersects has cognitive complexity 19 (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.
Region.MinimizeRectangles (cognitive 19) Terminal.Gui/Drawing/Region.cs:774— Region.MinimizeRectangles has cognitive complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnsiKeyboardEncoder.Encode (cognitive 19) Terminal.Gui/Drivers/AnsiHandling/AnsiKeyboardEncoder.cs:36— AnsiKeyboardEncoder.Encode 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.
AnsiMouseEncoder.GetButtonCode (cognitive 19) Terminal.Gui/Drivers/AnsiHandling/AnsiMouseEncoder.cs:82— AnsiMouseEncoder.GetButtonCode has cognitive complexity 19 (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.
Osc8UrlLinker.FindUrls (cognitive 19) Terminal.Gui/Drivers/AnsiHandling/Osc8UrlLinker.cs:113— Osc8UrlLinker.FindUrls 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.
View.GetAttributeForRole (cognitive 19) Terminal.Gui/ViewBase/View.Drawing.Attribute.cs:40— View.GetAttributeForRole 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.
ListView.SetSelection (cognitive 19) Terminal.Gui/Views/ListView/ListView.Selection.cs:242— ListView.SetSelection 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.
ApplicationImpl.CompleteInlineResize (cognitive 18) Terminal.Gui/App/ApplicationImpl.InlineResize.cs:91— ApplicationImpl.CompleteInlineResize has cognitive complexity 18 (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.
ApplicationImpl.End (cognitive 18) Terminal.Gui/App/ApplicationImpl.Run.cs:449— ApplicationImpl.End has cognitive complexity 18 (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.
LineCanvas.ClipLine (cognitive 18) Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:556— LineCanvas.ClipLine 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.
TextMateSyntaxHighlighter.CacheThemeDefaults (cognitive 18) Terminal.Gui/Drawing/Markdown/TextMateSyntaxHighlighter.cs:227— TextMateSyntaxHighlighter.CacheThemeDefaults 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.
KittyKeyboardPattern.GetKeyImpl (cognitive 18) Terminal.Gui/Drivers/AnsiHandling/KittyKeyboardPattern.cs:73— KittyKeyboardPattern.GetKeyImpl has cognitive complexity 18 (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.
TerminalDevice.InitializeWindows (cognitive 18) Terminal.Gui/Drivers/TerminalDevice.cs:291— TerminalDevice.InitializeWindows 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.
View.Draw (cognitive 18) Terminal.Gui/ViewBase/View.Drawing.cs:118— View.Draw 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.
PopupAutocomplete.OnMouseEvent (cognitive 18) Terminal.Gui/Views/Autocomplete/PopupAutocomplete.cs:114— PopupAutocomplete.OnMouseEvent 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.
ImageView.CreateRenderRequest (cognitive 18) Terminal.Gui/Views/ImageView/ImageView.Render.cs:68— ImageView.CreateRenderRequest 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.
LinearRangeViewBase.TryGetOptionByPosition (cognitive 18) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:931— LinearRangeViewBase.TryGetOptionByPosition 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.
ListView.OnActivated (cognitive 18) Terminal.Gui/Views/ListView/ListView.Commands.cs:102— ListView.OnActivated has cognitive 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.
Markdown.WalkBlock (cognitive 18) Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs:94— Markdown.WalkBlock has cognitive complexity 18 (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.
ScrollSlider.OnMouseEvent (cognitive 18) Terminal.Gui/Views/ScrollBar/ScrollSlider.cs:326— ScrollSlider.OnMouseEvent 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.
FileDialogExamples.CreateDialog (cognitive 18) Examples/UICatalog/Scenarios/FileDialogExamples.cs:163— FileDialogExamples.CreateDialog has cognitive complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 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.
ApplicationImpl.LayoutAndDrawGuarded (cognitive 17) Terminal.Gui/App/ApplicationImpl.Screen.cs:133— ApplicationImpl.LayoutAndDrawGuarded 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.
TraceCategoryJsonConverter.Read (cognitive 17) Terminal.Gui/Configuration/TraceCategoryJsonConverter.cs:12— TraceCategoryJsonConverter.Read 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.
Cell.SplitNewLines (cognitive 17) Terminal.Gui/Drawing/Cell.cs:187— Cell.SplitNewLines 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.
AnsiOutput.InsertAbove (cognitive 17) Terminal.Gui/Drivers/AnsiDriver/AnsiOutput.InlineOutput.cs:28— AnsiOutput.InsertAbove 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.
ConsoleKeyInfoExtensions.ToString (cognitive 17) Terminal.Gui/Drivers/Keyboard/ConsoleKeyInfoExtensions.cs:28— ConsoleKeyInfoExtensions.ToString 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.
InlineOutputLayout.CountRows (cognitive 17) Terminal.Gui/Drivers/Output/InlineOutputLayout.cs:72— InlineOutputLayout.CountRows 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.
UnixIOHelper.TryWriteAll (cognitive 17) Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs:368— UnixIOHelper.TryWriteAll 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.
View.DrawAdornments (cognitive 17) Terminal.Gui/ViewBase/View.Drawing.Adornments.cs:166— View.DrawAdornments 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, 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.
View.DrawSubViews (cognitive 17) Terminal.Gui/ViewBase/View.Drawing.cs:695— View.DrawSubViews 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.
View.AddKeyBindingsForHotKey (cognitive 17) Terminal.Gui/ViewBase/View.Keyboard.cs:220— View.AddKeyBindingsForHotKey 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.
TableView.EnsureCursorIsVisible (cognitive 17) Terminal.Gui/Views/TableView/TableView.Selection.cs:120— TableView.EnsureCursorIsVisible 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.
Tabs.EnableForDesign (cognitive 17) Terminal.Gui/Views/Tabs.cs:972— Tabs.EnableForDesign has cognitive complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 1020, 1046, 1139, …). 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.
TextField.GetActualPastedTextFromEditOperations (cognitive 17) Terminal.Gui/Views/TextInput/TextField/TextField.Text.cs:150— TextField.GetActualPastedTextFromEditOperations 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.
Program.Main (cognitive 17) Examples/ScenarioRunner/Program.cs:26— Program.Main has cognitive complexity 17 (threshold 15). None of this is in the body itself: all 17 points belong to 3 function literals inside it that branch (lines 137, 90, 67). 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.
BitmapToBraille.GenerateImage (cognitive 17) Examples/UICatalog/Scenarios/AnimationScenario/AnimationScenario.cs:112— BitmapToBraille.GenerateImage has cognitive 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.
AllViewsView.CreateView (cognitive 17) Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:100— AllViewsView.CreateView 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.
top-level statements (cognitive 17) Scripts/DocSnippetValidator/Program.cs:9— top-level statements 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.
ApplicationKeyboard.RaiseKeyUpEvent (cognitive 16) Terminal.Gui/App/Keyboard/ApplicationKeyboard.cs:53— ApplicationKeyboard.RaiseKeyUpEvent 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.
SchemeManager.ApplyFromConfiguration (cognitive 16) Terminal.Gui/Configuration/SchemeManager.cs:193— SchemeManager.ApplyFromConfiguration 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.
View.SetNeedsDraw (cognitive 16) Terminal.Gui/ViewBase/View.NeedsDraw.cs:76— View.SetNeedsDraw 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: 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.
ColorPicker16.OnDrawingContent (cognitive 16) Terminal.Gui/Views/Color/ColorPicker.16.cs:174— ColorPicker16.OnDrawingContent 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.
FileDialog.IsCompatibleWithOpenMode (cognitive 16) Terminal.Gui/Views/FileDialogs/FileDialog.Commands.cs:188— FileDialog.IsCompatibleWithOpenMode 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.
ImageView.DrawRasterImage (cognitive 16) Terminal.Gui/Views/ImageView/ImageView.Drawing.cs:115— ImageView.DrawRasterImage 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.
TextField.OnHasFocusChanged (cognitive 16) Terminal.Gui/Views/TextInput/TextField/TextField.cs:144— TextField.OnHasFocusChanged 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.
TextModel.GetFoundNextTextPoint (cognitive 16) Terminal.Gui/Views/TextInput/TextModel.cs:1126— TextModel.GetFoundNextTextPoint 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.
TreeView.AdjustSelection (cognitive 16) Terminal.Gui/Views/TreeView/TreeView.Navigation.cs:26— TreeView.AdjustSelection 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.
ViewDemoWindow.CreateView (cognitive 16) docfx/scripts/OutputView/OutputView.cs:308— ViewDemoWindow.CreateView 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.
AdornmentEditor.AdornmentEditor_Initialized (cognitive 16) Examples/UICatalog/Scenarios/EditorsAndHelpers/AdornmentEditor.cs:95— AdornmentEditor.AdornmentEditor_Initialized has cognitive complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ViewportSettingsEditor.OnViewToEditChanged (cognitive 16) Examples/UICatalog/Scenarios/EditorsAndHelpers/ViewportSettingsEditor.cs:19— ViewportSettingsEditor.OnViewToEditChanged 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.
InlineTranscript.Main (cognitive 16) Examples/UICatalog/Scenarios/InlineTranscript.cs:12— InlineTranscript.Main has cognitive complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 28, 71). 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.
AttributeView.OnDrawingContent (cognitive 16) Examples/UICatalog/Scenarios/LineDrawing.cs:313— AttributeView.OnDrawingContent 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.
RegionAttributeView.OnDrawingContent (cognitive 16) Examples/UICatalog/Scenarios/RegionScenario.cs:307— RegionAttributeView.OnDrawingContent 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.
ScrollBarDemo.Main (cognitive 16) Examples/UICatalog/Scenarios/ScrollBarDemo.cs:10— ScrollBarDemo.Main has cognitive complexity 16 (threshold 15). None of this is in the body itself: all 16 points belong to 7 function literals inside it that branch (lines 61, 188, 96, …). 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.
Selectors.Main (cognitive 16) Examples/UICatalog/Scenarios/Selectors.cs:10— Selectors.Main 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.
ConfigJsonMigrator.MigrateValue (cognitive 16) Tools/MigrateConfig/ConfigJsonMigrator.cs:30— ConfigJsonMigrator.MigrateValue 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 (91 corresponding lines) · ×1
Edited copy of a member (91 corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:547— Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:547-637 | Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:640-735 — These two members are one piece of code written twice and then edited apart: 91 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (56 corresponding lines) · ×1
Edited copy of a member (56 corresponding lines) Terminal.Gui/Text/TextFormatter.cs:1250— Terminal.Gui/Text/TextFormatter.cs:1250-1314 | Terminal.Gui/Text/TextFormatter.cs:1318-1373 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 43+ corresponding lines) · ×1
Edited copies of one member (3 members, 43+ corresponding lines) Terminal.Gui/Views/TableView/TableView.Drawing.cs:185— Terminal.Gui/Views/TableView/TableView.Drawing.cs:185-227 | Terminal.Gui/Views/TableView/TableView.Drawing.cs:287-332 | Terminal.Gui/Views/TableView/TableView.Drawing.cs:335-383 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 43 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 31+ corresponding lines) · ×1
Edited copies of one member (4 members, 31+ corresponding lines) Terminal.Gui/ViewBase/Adornment/Arranger.cs:490— Terminal.Gui/ViewBase/Adornment/Arranger.cs:490-520 | Terminal.Gui/ViewBase/Adornment/Arranger.cs:526-556 | Terminal.Gui/ViewBase/Adornment/Arranger.cs:562-592 | Terminal.Gui/ViewBase/Adornment/Arranger.cs:598-628 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (51 corresponding lines) · ×1
Edited copy of a member (51 corresponding lines) Terminal.Gui/Views/ListView/ListView.Movement.cs:20— Terminal.Gui/Views/ListView/ListView.Movement.cs:20-70 | Terminal.Gui/Views/ListView/ListView.Movement.cs:212-266 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (39 corresponding lines) · ×1
Edited copy of a member (39 corresponding lines) Terminal.Gui/Views/TreeView/TreeView.Navigation.cs:84— Terminal.Gui/Views/TreeView/TreeView.Navigation.cs:84-122 | Terminal.Gui/Views/TreeView/TreeView.Navigation.cs:126-165 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs:121— Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs:121-160 | Terminal.Gui/Drivers/WindowsDriver/WindowsOutput.cs:399-434 — 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· Edited copies of one member (5 members, 29+ corresponding lines) · ×1
Edited copies of one member (5 members, 29+ corresponding lines) Terminal.Gui/Views/CheckBox.cs:165— Terminal.Gui/Views/CheckBox.cs:165-198 | Terminal.Gui/Views/Menu/Menu.cs:571-600 | Terminal.Gui/Views/NumericUpDown.cs:194-222 | Terminal.Gui/Views/TableView/TableView.Selection.cs:762-793 | Terminal.Gui/Views/Tabs.cs:286-328 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 24+ corresponding lines) · ×1
Edited copies of one member (3 members, 24+ corresponding lines) Terminal.Gui/Views/Color/ColorPicker.16.cs:215— Terminal.Gui/Views/Color/ColorPicker.16.cs:215-250 | Terminal.Gui/Views/Color/ColorPicker.cs:278-317 | Terminal.Gui/Views/TextInput/TextValidateField.cs:322-345 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) Terminal.Gui/Drivers/AnsiHandling/CsiCursorPattern.cs:44— Terminal.Gui/Drivers/AnsiHandling/CsiCursorPattern.cs:44-69 | Terminal.Gui/Drivers/AnsiHandling/CsiKeyPattern.cs:42-75 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) Terminal.Gui/Views/TextInput/DateTextProvider.cs:179— Terminal.Gui/Views/TextInput/DateTextProvider.cs:179-199 | Terminal.Gui/Views/TextInput/DateTextProvider.cs:203-229 | Terminal.Gui/Views/TextInput/TimeTextProvider.cs:224-250 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×1
Edited copy of a member (14 corresponding lines) Terminal.Gui/Views/Tabs.cs:687— Terminal.Gui/Views/Tabs.cs:687-700 | Terminal.Gui/Views/Tabs.cs:703-716 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) Terminal.Gui/Views/TextInput/TextView/TextView.Find.cs:19— Terminal.Gui/Views/TextInput/TextView/TextView.Find.cs:19-33 | Terminal.Gui/Views/TextInput/TextView/TextView.Find.cs:49-63 | Terminal.Gui/Views/TextInput/TextView/TextView.Text.cs:411-424 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:26— Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:26-29 | Terminal.Gui/ViewBase/View.Keyboard.cs:1181-1184 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×1
Edited copy of a member (10 corresponding lines) Terminal.Gui/Views/TextInput/DateEditor.cs:64— Terminal.Gui/Views/TextInput/DateEditor.cs:64-73 | Terminal.Gui/Views/TextInput/TimeEditor.cs:79-88 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:574— Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:574-579 | Terminal.Gui/Views/Selectors/SelectorBase.cs:263-268 | Terminal.Gui/Views/TextInput/TextField/TextField.cs:285-290 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×1
Edited copy of a member (6 corresponding lines) Terminal.Gui/Views/TextInput/DateTextProvider.cs:59— Terminal.Gui/Views/TextInput/DateTextProvider.cs:59-64 | Terminal.Gui/Views/TextInput/TimeTextProvider.cs:69-74 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (66–67 lines × 2) Examples/UICatalog/Scenarios/MouseTester.cs:434— Examples/UICatalog/Scenarios/MouseTester.cs:434-500 | Terminal.Gui/Input/Mouse/MouseFlags.cs:19-84 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/UICatalog/Scenarios/MouseTester.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 (35–36 lines × 2) Examples/UICatalog/Scenarios/MandelbrotImageView.cs:211— Examples/UICatalog/Scenarios/MandelbrotImageView.cs:211-246 | Terminal.Gui/Views/ImageView/ImageView.Input.cs:147-181 — 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 (31–32 lines × 2) Terminal.Gui/Text/TextFormatter.cs:119— Terminal.Gui/Text/TextFormatter.cs:119-150 | Terminal.Gui/Text/TextFormatter.cs:961-991 — both copies are in the same file, so extract the 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 `Terminal.Gui/Text/TextFormatter.cs:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29–30 lines × 2) Terminal.Gui/App/Popovers/Popover.cs:260— Terminal.Gui/App/Popovers/Popover.cs:260-289 | Terminal.Gui/App/Popovers/ToolTipHost.cs:128-156 — before extracting anything, compare `Terminal.Gui/App/Popovers/Popover.cs` and `Terminal.Gui/App/Popovers/ToolTipHost.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (27–30 lines × 2) Terminal.Gui/App/Popovers/Popover.cs:301— Terminal.Gui/App/Popovers/Popover.cs:301-330 | Terminal.Gui/App/Popovers/ToolTipHost.cs:162-188 — before extracting anything, compare `Terminal.Gui/App/Popovers/Popover.cs` and `Terminal.Gui/App/Popovers/ToolTipHost.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (27–28 lines × 2) Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs:128— Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs:128-154 | Terminal.Gui/Drivers/WindowsDriver/WindowsOutput.cs:400-427 — 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 (27 lines × 2) Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:881— Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:881-907 | Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:919-945 — both copies are in the same file, so extract the 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 `Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:881` 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 (21 lines × 2) Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:340— Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:340-360 | Terminal.Gui/Views/TextInput/TextView/TextView.Commands.cs:373-393 — both copies are in the same file, so extract the 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–23 lines × 2) Terminal.Gui/App/Popovers/Popover.cs:117— Terminal.Gui/App/Popovers/Popover.cs:117-139 | Terminal.Gui/App/Popovers/ToolTipHost.cs:72-91 — before extracting anything, compare `Terminal.Gui/App/Popovers/Popover.cs` and `Terminal.Gui/App/Popovers/ToolTipHost.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 104 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 `Terminal.Gui/App/Popovers/Popover.cs:117` 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–23 lines × 2) Terminal.Gui/Views/TableView/TableView.Drawing.cs:287— Terminal.Gui/Views/TableView/TableView.Drawing.cs:287-303 | Terminal.Gui/Views/TableView/TableView.Drawing.cs:335-357 — both copies are in the same file, so extract the 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 `Terminal.Gui/Views/TableView/TableView.Drawing.cs:287` 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 (21–22 lines × 2) Terminal.Gui/Views/GraphView/HorizontalAxis.cs:58— Terminal.Gui/Views/GraphView/HorizontalAxis.cs:58-79 | Terminal.Gui/Views/GraphView/VerticalAxis.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. Read the line range as the matched WINDOW rather than a finished unit: at `Terminal.Gui/Views/GraphView/HorizontalAxis.cs:58` 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–21 lines × 2) Terminal.Gui/Drawing/Color/Color.Formatting.cs:286— Terminal.Gui/Drawing/Color/Color.Formatting.cs:286-302 | Terminal.Gui/Drawing/Color/Color.Formatting.cs:306-326 — both copies are in the same file, so extract the 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 `Terminal.Gui/Drawing/Color/Color.Formatting.cs:306` 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 (20–21 lines × 2) REDACTED:525— REDACTED:525-544 | Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs:172-192 — 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 (16–19 lines × 2) Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1492— Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1492-1507 | Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1528-1546 — both copies are in the same file, so extract the 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 `Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1492` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1487` calls `GrabMouse` and `Terminal.Gui/Views/LinearRange/LinearRangeViewBase.cs:1528` 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–18 lines × 2) Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:288— Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:288-305 | Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:334-350 — both copies are in the same file, so extract the 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 `Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:288` 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, `Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:332` calls `Clear` and `Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:287` 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–17 lines × 2) Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:957— Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:957-973 | Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:992-1006 — both copies are in the same file, so extract the 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) Terminal.Gui/Drivers/Output/OutputBufferImpl.cs:396— Terminal.Gui/Drivers/Output/OutputBufferImpl.cs:396-410 | Terminal.Gui/Drivers/Output/OutputBufferImpl.cs:445-460 — both copies are in the same file, so extract the 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 `Terminal.Gui/Drivers/Output/OutputBufferImpl.cs:396` 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–15 lines × 2) Terminal.Gui/Configuration/ConcurrentDictionaryJsonConverter.cs:55— Terminal.Gui/Configuration/ConcurrentDictionaryJsonConverter.cs:55-68 | Terminal.Gui/Configuration/DictionaryJsonConverter.cs:50-64 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `ConcurrentDictionary<string, T>` in one and `Dictionary<string, T>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (19–22 lines × 3) Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:47— Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:47-65 | Examples/UICatalog/Scenarios/EditorsAndHelpers/ThemeViewer.cs:53-71 | Terminal.Gui/Views/CharMap/CharMap.cs:91-112 — before extracting anything, compare `Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs` and `Examples/UICatalog/Scenarios/EditorsAndHelpers/ThemeViewer.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Terminal.Gui/Views/CharMap/CharMap.cs:91` calls `AddCommand` and `Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:47` 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 (6 lines × 3) Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:366— Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:366-371 | Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:376-381 | Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:386-391 — 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 `Terminal.Gui/Drivers/AnsiHandling/EscSeqUtils/EscSeqUtils.cs:366` 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–8 lines × 4) Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:42— Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:42-47 | Examples/UICatalog/Scenarios/EditorsAndHelpers/ThemeViewer.cs:48-53 | Examples/UICatalog/Scenarios/ViewportSettings.cs:164-171 | Terminal.Gui/Views/CharMap/CharMap.cs:84-89 — before extracting anything, compare `Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs` and `Examples/UICatalog/Scenarios/EditorsAndHelpers/ThemeViewer.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 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 `Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:42` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Terminal.Gui/Views/CharMap/CharMap.cs:91` calls `AddCommand` and `Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:49` 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.
D4 · Code Duplication· Edited copy of a member (147 corresponding lines) · ×1
Edited copy of a member (147 corresponding lines) Examples/UICatalog/Scenarios/HotKeys.cs:11— Examples/UICatalog/Scenarios/HotKeys.cs:11-238 | Examples/UICatalog/Scenarios/Unicode.cs:14-160 — These two members are one piece of code written twice and then edited apart: 147 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (59 corresponding lines) · ×1
Edited copy of a member (59 corresponding lines) Examples/UICatalog/Scenarios/MenuBars.cs:16— Examples/UICatalog/Scenarios/MenuBars.cs:16-74 | Examples/UICatalog/Scenarios/MenuBarsWithoutPopovers.cs:13-71 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) Examples/UICatalog/Scenarios/LineDrawing.cs:314— Examples/UICatalog/Scenarios/LineDrawing.cs:314-366 | Examples/UICatalog/Scenarios/RegionScenario.cs:308-357 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (57 corresponding lines) · ×1
Edited copy of a member (57 corresponding lines) Examples/UICatalog/Scenarios/EditorsAndHelpers/DimEditor.cs:33— Examples/UICatalog/Scenarios/EditorsAndHelpers/DimEditor.cs:33-91 | Examples/UICatalog/Scenarios/EditorsAndHelpers/PosEditor.cs:23-79 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) Examples/UICatalog/Scenarios/Menus.cs:176— Examples/UICatalog/Scenarios/Menus.cs:176-231 | Examples/UICatalog/Scenarios/PopoverMenus.cs:235-272 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) Examples/UICatalog/Scenarios/LineDrawing.cs:393— Examples/UICatalog/Scenarios/LineDrawing.cs:393-406 | Examples/UICatalog/Scenarios/LineDrawing.cs:409-422 | Examples/UICatalog/Scenarios/RegionScenario.cs:384-397 | Examples/UICatalog/Scenarios/RegionScenario.cs:400-413 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) Examples/UICatalog/Scenarios/CsvEditor.cs:247— Examples/UICatalog/Scenarios/CsvEditor.cs:247-268 | Examples/UICatalog/Scenarios/InteractiveTree.cs:100-124 | Examples/UICatalog/Scenarios/MultiColouredTable.cs:96-113 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 13+ corresponding lines) · ×1
Edited copies of one member (4 members, 13+ corresponding lines) Examples/UICatalog/Scenarios/Selectors.cs:186— Examples/UICatalog/Scenarios/Selectors.cs:186-198 | Examples/UICatalog/Scenarios/Selectors.cs:200-213 | Examples/UICatalog/Scenarios/Selectors.cs:215-228 | Examples/UICatalog/Scenarios/Selectors.cs:230-245 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (51 lines × 2) Examples/UICatalog/Scenarios/ComputedLayout.cs:139— Examples/UICatalog/Scenarios/ComputedLayout.cs:139-189 | Examples/UICatalog/Scenarios/ComputedLayout.cs:193-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.
Duplicated block (50–51 lines × 2) Examples/UICatalog/Scenarios/Arrangement.cs:89— Examples/UICatalog/Scenarios/Arrangement.cs:89-139 | Examples/UICatalog/Scenarios/Navigation.cs:107-156 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Examples/UICatalog/Scenarios/Navigation.cs:158` calls `Add` and `Examples/UICatalog/Scenarios/Arrangement.cs:141` 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 (36–41 lines × 2) Examples/UICatalog/Scenarios/Menus.cs:191— Examples/UICatalog/Scenarios/Menus.cs:191-231 | Examples/UICatalog/Scenarios/PopoverMenus.cs:237-272 — 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 `Examples/UICatalog/Scenarios/Menus.cs:191` 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 (36 lines × 2) Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:28— Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:28-63 | Examples/UICatalog/Scenarios/EditorsAndHelpers/ThemeViewer.cs:34-69 — before extracting anything, compare `Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs` and `Examples/UICatalog/Scenarios/EditorsAndHelpers/ThemeViewer.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (30–33 lines × 2) Examples/UICatalog/Scenarios/Transparent.cs:257— Examples/UICatalog/Scenarios/Transparent.cs:257-286 | Examples/UICatalog/Scenarios/Transparent.cs:299-331 — both copies are in the same file, so extract the 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 (32 lines × 2) Examples/UICatalog/Scenarios/Dialogs.cs:204— Examples/UICatalog/Scenarios/Dialogs.cs:204-235 | Examples/UICatalog/Scenarios/Dialogs.cs:259-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/UICatalog/Scenarios/Dialogs.cs:259` 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 (25–30 lines × 2) Examples/UICatalog/Scenarios/Adornments.cs:51— Examples/UICatalog/Scenarios/Adornments.cs:51-75 | Examples/UICatalog/Scenarios/ViewportSettings.cs:30-59 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Examples/UICatalog/Scenarios/Adornments.cs:77` calls `Center`, `Query` and `Examples/UICatalog/Scenarios/ViewportSettings.cs:61` 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 (21–27 lines × 3) Examples/UICatalog/Scenarios/ScrollBarDemo.cs:116— Examples/UICatalog/Scenarios/ScrollBarDemo.cs:116-139 | Examples/UICatalog/Scenarios/ScrollBarDemo.cs:147-173 | Examples/UICatalog/Scenarios/ScrollBarDemo.cs:177-197 — 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 `Examples/UICatalog/Scenarios/ScrollBarDemo.cs:116` 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 (23–24 lines × 2) Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:123— Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:123-146 | Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:401-423 — both copies are in the same file, so extract the 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–23 lines × 3) Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:108— Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:108-130 | Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:244-254 | Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:400-412 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:131` calls `Add` and `Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:416` 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 (40–43 lines × 2) Examples/UICatalog/Scenarios/LineDrawing.cs:324— Examples/UICatalog/Scenarios/LineDrawing.cs:324-366 | Examples/UICatalog/Scenarios/RegionScenario.cs:318-357 — 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 `Examples/UICatalog/Scenarios/LineDrawing.cs:324` 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 (18–19 lines × 2) Scripts/BackingFieldReorderer/Program.cs:66— Scripts/BackingFieldReorderer/Program.cs:66-84 | Scripts/PartialSplitter/Program.cs:242-259 — 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 `Scripts/BackingFieldReorderer/Program.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 (15 lines × 4) Examples/UICatalog/Scenarios/MouseTester.cs:273— Examples/UICatalog/Scenarios/MouseTester.cs:273-287 | Examples/UICatalog/Scenarios/MouseTester.cs:296-310 | Examples/UICatalog/Scenarios/MouseTester.cs:312-326 | Examples/UICatalog/Scenarios/MouseTester.cs:328-342 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/UICatalog/Scenarios/MouseTester.cs:273` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) Examples/ScenarioRunner/Program.cs:83— Examples/ScenarioRunner/Program.cs:83-96 | Examples/ScenarioRunner/Program.cs:131-143 — both copies are in the same file, so extract the 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 `Examples/ScenarioRunner/Program.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 (11–12 lines × 2) Examples/UICatalog/Scenarios/AllViewsTester.cs:316— Examples/UICatalog/Scenarios/AllViewsTester.cs:316-326 | Examples/UICatalog/Scenarios/KeyBindings.cs:286-297 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) Examples/UICatalog/Scenarios/MenuBars.cs:69— Examples/UICatalog/Scenarios/MenuBars.cs:69-74 | Examples/UICatalog/Scenarios/MenuBarsWithoutPopovers.cs:66-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 `Examples/UICatalog/Scenarios/MenuBars.cs:69` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 4) Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:118— Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:118-129 | Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:242-253 | Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:382-392 | Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:400-412 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:130` calls `Add` and `Examples/UICatalog/Scenarios/TextAlignmentAndDirection.cs:416` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 3) Examples/UICatalog/Scenarios/PosAlignDemo.cs:79— Examples/UICatalog/Scenarios/PosAlignDemo.cs:79-89 | Examples/UICatalog/Scenarios/PosAlignDemo.cs:113-123 | Examples/UICatalog/Scenarios/PosAlignDemo.cs:148-158 — 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 `Examples/UICatalog/Scenarios/PosAlignDemo.cs:79` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8–9 lines × 4) Examples/UICatalog/Scenarios/AllViewsTester.cs:302— Examples/UICatalog/Scenarios/AllViewsTester.cs:302-309 | Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs:170-177 | Examples/UICatalog/Scenarios/KeyBindings.cs:259-267 | Examples/UICatalog/Scenarios/Themes.cs:226-233 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/UICatalog/Scenarios/AllViewsTester.cs:302` 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.
Unfinished stub — throws NotImplementedException Terminal.Gui/Drivers/DotNetDriver/NetInput.cs:101— `InjectInput` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
IC1 · Incompleteness & stubs· Both branches open with the same statements · ×1
Both branches open with the same statements — the condition does not decide them Terminal.Gui/Views/ScrollBar/ScrollBar.cs:136— 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.
IC1 · Incompleteness & stubs· Skipped test marks a known-real bug · ×1
Skipped test marks a known-real bug Tests/UnitTestsParallelizable/Input/InputProcessorImplTests.cs:49— A test is skipped with reason "Flaky test causing random GitHub workflow failures - see issue" — the behavior it asserts is UNVERIFIED and this skip is likely the only marker of a real bug. It ages invisibly: fix the flakiness or track the bug somewhere that can't be forgotten.
P12 · CI test-gate honesty· Test failure does not fail the CI gate · ×1
Test failure does not fail the CI gate REDACTED:104— `continue-on-error: true` lets the step or job that runs `dotnet run --project Tests/Benchmarks --configuration Release --no-build -- --filter '*Scroll*' '*Config*' '*Scheme*' '*Th…` fail without failing the pipeline — the suite can go red and the change still merges. Remove it from the test step, or quarantine the specific failing tests instead.
P12 · CI test-gate honesty· Tests run only outside the merge gate · ×1
Tests run only outside the merge gate REDACTED:44— `dotnet test --project Tests/StressTests --no-build --verbosity normal --diagnostic --diagnostic-output-directory logs/${{ runner.os }}` is the only CI command that runs 5 test(s) (e.g. ApplicationStressTests.InvokeLeakTest, BracketedPasteDemoTests.BracketedPasteDemo_Categories_IncludeTextAndFormatting_NotInput), and the workflow runs only on pushes to named branches or tags — after the merge — a failure there is found after the change merged, when the only remedy is a revert. Run them on pull requests (or in the merge queue).
Sync-over-async (deadlock risk) through `.Result` Terminal.Gui/Views/ImageView/ImageView.Render.cs:300— 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.
X13 · Undrained process stream· Redirected process stream is never drained (deadlock) · ×1
Redirected process stream is never drained (deadlock) REDACTED:39— `RedirectStandardError` is set here, but `StandardError` is not being read when `StandardOutput` is read to the end — it is never read, read only later, or read only in part. The child blocks as soon as it fills the StandardError pipe (~4 KB, never more than 64 KB), so it never finishes and never exits, and the read or wait above never returns: a `WaitForExit` timeout after a read does not help: the timeout bounds the WAIT, not the read that precedes it. Drain every redirected stream before blocking on the child — read one on a background thread (`BeginErrorReadLine()` with its `DataReceived` handler, or a `Task` running `ReadToEndAsync()` started before the other read and awaited after it) — or stop redirecting the stream you do not consume.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×1
Recursive walk over a caller-supplied document has no depth cap Terminal.Gui/Configuration/Settings/JsonMerge.cs:20— `DeepMerge` is public and takes the `JsonObject` from its caller, and it calls itself at line 20 with a child of the node it was given — and nowhere in `DeepMerge` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `DeepMerge` can intervene. Thread a depth argument through `DeepMerge` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack.
X18 · Disposal-pattern correctness· Disposable acquired into a field and never released · ×1
Disposable acquired into a field and never released Terminal.Gui/Drivers/Input/ConsoleInputSource.cs:12— `_cancellationTokenSource` (line 12) holds a `CancellationTokenSource` that `ConsoleInputSource` acquires itself — every assignment to it is a call that opens or creates a new instance for the caller to own — and nothing in `ConsoleInputSource` ever releases it: the type is not `IDisposable`, declares no `Dispose`, and every other mention of `_cancellationTokenSource` only reads through it, so it is never disposed, closed, returned or handed on. Whatever it opened (a connection, a channel, a file) stays open until finalization if the type has a finalizer and until the process ends if it does not, once per instance of `ConsoleInputSource`. Implement `IDisposable` and release `_cancellationTokenSource` there, or take the instance from the caller so its owner ends it.
X2 · Cancellation propagation· Async delegate without CancellationToken · ×1
Async delegate without CancellationToken: Main Examples/UICatalog/Scenarios/TextInputControls.cs:402— Queues or hands on an async lambda whose work calls something that takes a CancellationToken, while neither this method nor the delegate supplies one — that work can't be stopped early once started. Take a CancellationToken here and let the lambda capture it, or use a delegate that is handed one (`Func<CancellationToken, Task>`).
redundant comment Scripts/BackingFieldReorderer/Program.cs:140— "Create new class with reordered members" repeats the code it sits on: 5 of its 5 words (create, new, class, reordered, members) are already in `ClassDeclarationSyntax reorderedClass = node.WithMembers (new SyntaxList<MemberDeclarationSyntax> (reorderedMembers));`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/App/ApplicationImpl.Run.cs:127— "Create session token" repeats the code it sits on: 3 of its 3 words (create, session, token) are already in `SessionToken token = new (runnable);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/App/ApplicationImpl.Run.cs:166— "Push token onto SessionStack" repeats the code it sits on: 4 of its 4 words (push, token, session, stack) are already in `SessionStack?.Push (token);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/App/MainLoop/MainLoopCoordinator.cs:225— "Detect terminal color capabilities from environment variables" repeats the code it sits on: 5 of its 6 words (detect, terminal, color, capabilities, environment) are already in `TerminalColorCapabilities caps = TerminalEnvironmentDetector.DetectColorCapabilities ();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/Configuration/ColorJsonConverter.cs:39— "Get the color string" repeats the code it sits on: 3 of its 3 words (get, color, string) are already in `ReadOnlySpan<char> colorString = reader.GetString ();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/Configuration/SchemeJsonConverter.cs:89— "Get the attribute for the role" repeats the code it sits on: 3 of its 3 words (get, attribute, role) are already in `if (!value.TryGetExplicitlySetAttributeForRole (role, out Attribute? attribute))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/Configuration/SchemeJsonConverter.cs:97— "Write the attribute using the AttributeJsonConverter" repeats the code it sits on: 4 of its 5 words (write, attribute, json, converter) are already in `AttributeJsonConverter.Instance.Write (writer, attribute!.Value, options);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:658— "Create the rune canvas" repeats the code it sits on: 3 of its 3 words (create, rune, canvas) are already in `Rune [,] canvas = new Rune [Bounds.Height, Bounds.Width];`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/Drawing/Region.cs:984— "Add horizontal lines" repeats the code it sits on: 3 of its 3 words (add, horizontal, lines) are already in `canvas.AddLine (new Point (rect.Left, rect.Top), rect.Width, Orientation.Horizontal, style, attribute);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/Drawing/Region.cs:994— "Add vertical lines" repeats the code it sits on: 3 of its 3 words (add, vertical, lines) are already in `canvas.AddLine (new Point (rect.Left, rect.Top), rect.Height, Orientation.Vertical, style, attribute);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/Drivers/AnsiDriver/AnsiSizeMonitor.cs:151— "Check if size changed" repeats the code it sits on: 3 of its 3 words (check, size, changed) are already in `return CheckSizeChanged ();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/Resources/ResourceManagerWrapper.cs:106— "Create a ResourceSet from the MemoryStream" repeats the code it sits on: 5 of its 5 words (create, resource, set, memory, stream) are already in `var resourceSet = new ResourceSet (memoryStream);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/Layout/DimAuto.cs:100— "Check for PosView based views" repeats the code it sits on: 4 of its 5 words (check, pos, view, views) are already in `if (pos.Has<PosView> (out _))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/Layout/DimAuto.cs:106— "Check for DimView based views" repeats the code it sits on: 4 of its 5 words (check, dim, view, views) are already in `if (dim.Has<DimView> (out _))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/Layout/DimAuto.cs:294— "Get the minimum contribution from the Dim itself" repeats the code it sits on: 4 of its 4 words (get, minimum, contribution, dim) are already in `int minContribution = dimFill.GetMinimumContribution (0, maxCalculatedSize, dimFillSubView, dimension);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/Layout/DimFill.cs:103— "Return the minimum content dimension" repeats the code it sits on: 4 of its 4 words (return, minimum, content, dimension) are already in `return MinimumContentDim.Calculate (0, superviewContentSize, us, dimension);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:799— "Update MouseState based on position" repeats the code it sits on: 4 of its 5 words (update, mouse, state, position) are already in `UpdateMouseStateOnPress (mouse.Position);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:838— "Update MouseState" repeats the code it sits on: 3 of its 3 words (update, mouse, state) are already in `UpdateMouseStateOnRelease ();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/View.Command.cs:1463— "THIS view is an AdornmentView: bubble to its own Parent" repeats the code it sits on: 4 of its 4 words (view, adornment, bubble, parent) are already in `if (this is not AdornmentView selfAdornment || selfAdornment.Adornment?.Parent?.CommandsToBubbleUp.Contains (ctx.Command …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/View.Hierarchy.cs:74— "Add Margin SubViews" repeats the code it sits on: 4 of its 4 words (add, margin, sub, views) are already in `result.AddRange (Margin.View.SubViews);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/View.Hierarchy.cs:80— "Add Border SubViews" repeats the code it sits on: 4 of its 4 words (add, border, sub, views) are already in `result.AddRange (Border.View.SubViews);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/View.Hierarchy.cs:86— "Add Padding SubViews" repeats the code it sits on: 4 of its 4 words (add, padding, sub, views) are already in `result.AddRange (Padding.View.SubViews);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/View.Layout.cs:1071— "Marks this view's Margin/Border/Padding view trees as needing layout when they have subviews. Adornment subview trees live separately from the regular SubViews …" repeats the code it sits on: 14 of its 17 words (marks, view, margin, border, padding, trees, needing, layout, subviews, adornment, subview, sub, views, tree) are already in `private void MarkAdornmentSubViewTrees ()`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/View.Layout.cs:1183— "Set of all nodes with no incoming edges" repeats the code it sits on: 4 of its 5 words (set, nodes, no, edges) are already in `HashSet<View> noEdgeNodes = new (nodes.Where (n => edges.All (e => !e.To.Equals (n))));`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment Terminal.Gui/ViewBase/View.Layout.cs:1263— "TopologicalSort" only labels the closing brace of the method TopologicalSort. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Commented-out code Terminal.Gui/App/Application.cs:75— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/App/ApplicationImpl.Lifecycle.cs:199— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/App/ApplicationImpl.cs:107— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/App/ApplicationNavigation.cs:90— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/App/Clipboard/Clipboard.cs:36— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/App/Legacy/Application.Lifecycle.cs:25— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/App/Mouse/ApplicationMouse.cs:293— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/App/Popovers/PopoverImpl.cs:80— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/App/Popovers/PopoverImpl.cs:81— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/App/Popovers/PopoverImpl.cs:82— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Configuration/DictionaryJsonConverter.cs:57— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drawing/LineCanvas/LineCanvas.cs:782— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drawing/Sixel/SixelSupportDetector.cs:62— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drawing/Sixel/SixelSupportDetector.cs:68— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drawing/Sixel/SixelSupportDetector.cs:90— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drawing/Sixel/SixelSupportDetector.cs:130— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drawing/Sixel/SixelSupportDetector.cs:143— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drivers/AnsiDriver/AnsiInput.cs:149— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drivers/AnsiDriver/AnsiSizeMonitor.cs:108— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drivers/AnsiDriver/AnsiSizeMonitor.cs:123— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drivers/AnsiDriver/AnsiSizeMonitor.cs:164— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drivers/AnsiDriver/AnsiSizeMonitor.cs:173— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drivers/AnsiHandling/AnsiMouseParser.cs:115— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drivers/AnsiHandling/AnsiRequestScheduler.cs:94— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code Terminal.Gui/Drivers/AnsiHandling/AnsiRequestScheduler.cs:120— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Duplicated predicate Examples/UICatalog/Scenarios/Images/Images.cs:627— `!bothSupported && _osRasterProtocol.Value != RASTER_PROTOCOL_AUTO` appears character-identically in 2 files — Examples/UICatalog/Scenarios/Images/Images.cs, Examples/UICatalog/Scenarios/Mandelbrot.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 Examples/UICatalog/Scenarios/AllViewsTester.cs:325— `!constraint.IsClass || constraint == typeof (object)` appears character-identically in 2 files — Examples/UICatalog/Scenarios/AllViewsTester.cs, Examples/UICatalog/Scenarios/KeyBindings.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 Terminal.Gui/Views/TextInput/TextField/TextField.Keyboard.cs:79— `(a.IsAlt && string.IsNullOrEmpty (a.AsGrapheme)) || a.IsCtrl` appears character-identically in 2 files — Terminal.Gui/Views/TextInput/TextField/TextField.Keyboard.cs, Terminal.Gui/Views/TextInput/TextView/TextView.Keyboard.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 Terminal.Gui/ViewBase/Adornment/AdornmentView.cs:145— `Adornment is null || Adornment.Thickness == Thickness.Empty` appears character-identically in 3 files — Terminal.Gui/ViewBase/Adornment/AdornmentView.cs, Terminal.Gui/ViewBase/Adornment/BorderView.cs, Terminal.Gui/ViewBase/Adornment/MarginView.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 Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:770— `App is null || !App.Mouse.IsGrabbed (this)` appears character-identically in 3 files — Terminal.Gui/ViewBase/Mouse/View.Mouse.cs, Terminal.Gui/Views/TextInput/TextField/TextField.Mouse.cs, Terminal.Gui/Views/TextInput/TextView/TextView.Mouse.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 Terminal.Gui/ViewBase/Mouse/View.Mouse.cs:1116— `App is { } && App.Mouse.IsGrabbed (this)` appears character-identically in 7 files — Examples/UICatalog/Scenarios/MandelbrotImageView.cs, Terminal.Gui/ViewBase/Mouse/View.Mouse.cs, Terminal.Gui/ViewBase/View.cs, Terminal.Gui/Views/ImageView/ImageView.Input.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 REDACTED:34— `Console.IsInputRedirected || Console.IsOutputRedirected` appears character-identically in 2 files — REDACTED, Terminal.Gui/Drivers/DotNetDriver/NetOutput.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 Terminal.Gui/ViewBase/Layout/DimCombine.cs:93— `Left.DependsOnSuperViewContentSize || Right.DependsOnSuperViewContentSize` appears character-identically in 2 files — Terminal.Gui/ViewBase/Layout/DimCombine.cs, Terminal.Gui/ViewBase/Layout/PosCombine.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 Terminal.Gui/ViewBase/Layout/DimCombine.cs:124— `Left.RequiresTargetLayout || Right.RequiresTargetLayout` appears character-identically in 2 files — Terminal.Gui/ViewBase/Layout/DimCombine.cs, Terminal.Gui/ViewBase/Layout/PosCombine.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 Terminal.Gui/ViewBase/Layout/DimAuto.cs:357— `MinimumContentDim is { } && MinimumContentDim.Has (out dim)` appears character-identically in 2 files — Terminal.Gui/ViewBase/Layout/DimAuto.cs, Terminal.Gui/ViewBase/Layout/DimFill.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 Terminal.Gui/Views/CharMap/CharMap.cs:357— `OnValueChanging (changingArgs) || changingArgs.Handled` appears character-identically in 11 files — Terminal.Gui/Views/CharMap/CharMap.cs, Terminal.Gui/Views/CheckBox.cs, Terminal.Gui/Views/Color/ColorPicker.16.cs, Terminal.Gui/Views/Color/ColorPicker.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 Terminal.Gui/Drivers/UnixHelpers/SuspendHelper.cs:57— `RuntimeInformation.IsOSPlatform (OSPlatform.Create ("SOLARIS")) || RuntimeInformation.IsOSPlatform (OSPlatform.Create ("ILLUMOS"))` appears character-identically in 2 files — Terminal.Gui/Drivers/UnixHelpers/SuspendHelper.cs, Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.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 Examples/UICatalog/Scenarios/Images/Images.cs:415— `ShouldUseKittyGraphics () && _kittyGraphicsSupportResult is { IsSupported: true } kitty` appears character-identically in 2 files — Examples/UICatalog/Scenarios/Images/Images.cs, Examples/UICatalog/Scenarios/MandelbrotImageView.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 Terminal.Gui/Views/Code.cs:65— `SyntaxHighlighter is { } highlighter && !string.IsNullOrEmpty (Language)` appears character-identically in 2 files — Terminal.Gui/Views/Code.cs, Terminal.Gui/Views/Markdown/MarkdownCodeBlock.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 Examples/UICatalog/Scenarios/EditorsAndHelpers/DimEditor.cs:134— `ViewToEdit == null || UpdatingLayoutSettings` appears character-identically in 2 files — Examples/UICatalog/Scenarios/EditorsAndHelpers/DimEditor.cs, Examples/UICatalog/Scenarios/EditorsAndHelpers/PosEditor.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 Terminal.Gui/Views/ListView/ListView.Movement.cs:40— `Viewport.Height > 0 && SelectedItem >= Viewport.Y + Viewport.Height` appears character-identically in 2 files — Terminal.Gui/Views/ListView/ListView.Movement.cs, Terminal.Gui/Views/ListView/ListView.Selection.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 Terminal.Gui/Views/Markdown/MarkdownTable.cs:347— `_activeLinkIndex < 0 || _activeLinkIndex >= _linkRegions.Count` appears character-identically in 2 files — Terminal.Gui/Views/Markdown/MarkdownTable.cs, Terminal.Gui/Views/Markdown/MarkdownView.Mouse.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 Examples/UICatalog/Scenarios/Images/Images.cs:624— `_kittyGraphicsSupportResult is { IsSupported: true } && _sixelSupportResult is { IsSupported: true }` appears character-identically in 2 files — Examples/UICatalog/Scenarios/Images/Images.cs, Examples/UICatalog/Scenarios/Mandelbrot.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 Terminal.Gui/Views/TableView/TableView.cs:238— `_table is null || columnIndex < 0 || columnIndex >= _table.Columns` appears character-identically in 2 files — Terminal.Gui/Views/TableView/TableView.Selection.cs, Terminal.Gui/Views/TableView/TableView.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 Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs:142— `_utf16DecodeBuffer is null || _utf16DecodeBuffer.Length < maxCharCount` appears character-identically in 2 files — Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs, Terminal.Gui/Drivers/WindowsDriver/WindowsOutput.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 Terminal.Gui/Views/TextInput/TextField/TextField.Keyboard.cs:71— `a.AsRune is { } rune && rune != default (Rune) && Rune.IsControl (rune)` appears character-identically in 2 files — Terminal.Gui/Views/TextInput/TextField/TextField.Keyboard.cs, Terminal.Gui/Views/TextInput/TextView/TextView.Keyboard.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 docfx/scripts/OutputView/OutputView.cs:323— `arg.IsValueType && Nullable.GetUnderlyingType (arg) == null` appears character-identically in 3 files — Examples/UICatalog/Scenarios/AllViewsTester.cs, Examples/UICatalog/Scenarios/EditorsAndHelpers/AllViewsView.cs, docfx/scripts/OutputView/OutputView.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 Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs:450— `character == '|' && backslashes % 2 == 0` appears character-identically in 2 files — Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs, Terminal.Gui/Views/Markdown/TableData.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 Terminal.Gui/Views/Selectors/FlagSelector.cs:120— `ctx?.Routing == CommandRouting.DispatchingDown && Focused is CheckBox focusedCb` appears character-identically in 2 files — Terminal.Gui/Views/Selectors/FlagSelector.cs, Terminal.Gui/Views/Selectors/OptionSelector.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 Terminal.Gui/Drivers/Output/OutputBase.cs:1427— `destinationCells.Width <= 0 || destinationCells.Height <= 0` appears character-identically in 2 files — Terminal.Gui/Drivers/Output/OutputBase.cs, Terminal.Gui/Views/ImageView/ImageView.Drawing.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 in catch Terminal.Gui/App/Clipboard/Clipboard.cs:42— `Contents` swallows every exception and sets `_contents = string.Empty;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch Terminal.Gui/App/Clipboard/ClipboardBase.cs:98— `TrySetClipboardData` swallows `NotSupportedException` 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 Terminal.Gui/Drivers/DotNetDriver/NetInput.cs:110— `Peek` swallows every exception 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 Terminal.Gui/Drivers/PlatformDetection.cs:22— `IsWSL` swallows every exception 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 Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs:258— `IsInputAvailable` swallows every exception 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 Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs:313— `TryWriteStdout` swallows every exception 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 Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs:345— `TryWriteStdout` swallows every exception 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 Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs:360— `TryWriteStdout` swallows every exception 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 Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs:427— `TryWriteStdout` swallows every exception 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 Terminal.Gui/Drivers/UnixHelpers/UnixIOHelper.cs:450— `TryFlushStdin` swallows every exception 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 Terminal.Gui/Drivers/WindowsDriver/WindowsOutput.cs:551— `GetWindowSize` swallows every exception and sets `cursorPosition = default (WindowsConsole.Coord);` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch Terminal.Gui/FileServices/FileSystemTreeBuilder.cs:69— `TryGetChildren` swallows every exception into `return Enumerable.Empty<IFileSystemInfo> ();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch Terminal.Gui/FileServices/FileSystemTreeBuilder.cs:81— `IsReparsePoint` swallows every exception into `return true;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch Terminal.Gui/Views/TextInput/TextModel.cs:492— `WordBackward` 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 Terminal.Gui/Views/TextInput/TextModel.cs:596— `WordForward` 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 Terminal.Gui/Views/TextInput/TextView/WordWrapManager.cs:101— `RemoveRange` swallows every exception 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 Examples/UICatalog/Scenarios/ClassExplorer.cs:176— `ChildGetter` swallows every exception into `return Enumerable.Empty<object> ();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch Examples/UICatalog/Scenarios/TableEditor.cs:783— `GetChildren` swallows every exception into `return [];` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
P10 · Library API & versioning· Public type used only inside its own library · ×16
Public type used only inside its own library Terminal.Gui/App/CWP/CWPWorkflowHelper.cs:16— `Terminal.Gui.App.CWPWorkflowHelper` (Terminal.Gui/App/CWP/CWPWorkflowHelper.cs:16) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/App/IApplicationInlineOutput.cs:4— `Terminal.Gui.App.IApplicationInlineOutput` (Terminal.Gui/App/IApplicationInlineOutput.cs:4) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/App/Tracing/LoggingBackend.cs:6— `Terminal.Gui.Tracing.LoggingBackend` (Terminal.Gui/App/Tracing/LoggingBackend.cs:6) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/Configuration/KeyArrayJsonConverter.cs:10— `Terminal.Gui.Configuration.KeyArrayJsonConverter` (Terminal.Gui/Configuration/KeyArrayJsonConverter.cs:10) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/Configuration/MouseFlagsArrayJsonConverter.cs:10— `Terminal.Gui.Configuration.MouseFlagsArrayJsonConverter` (Terminal.Gui/Configuration/MouseFlagsArrayJsonConverter.cs:10) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/Drawing/Color/ICustomColorFormatter.cs:4— `Terminal.Gui.Drawing.ICustomColorFormatter` (Terminal.Gui/Drawing/Color/ICustomColorFormatter.cs:4) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/Drivers/AnsiHandling/Ss3Pattern.cs:9— `Terminal.Gui.Drivers.Ss3Pattern` (Terminal.Gui/Drivers/AnsiHandling/Ss3Pattern.cs:9) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/Drivers/AnsiHandling/TerminalColorDetector.cs:7— `Terminal.Gui.Drivers.TerminalColorDetector` (Terminal.Gui/Drivers/AnsiHandling/TerminalColorDetector.cs:7) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/Drivers/WindowsDriver/IWindowsInput.cs:6— `Terminal.Gui.Drivers.IWindowsInput` (Terminal.Gui/Drivers/WindowsDriver/IWindowsInput.cs:6) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/Drivers/WindowsDriver/WindowsComponentFactory.cs:9— `Terminal.Gui.Drivers.WindowsComponentFactory` (Terminal.Gui/Drivers/WindowsDriver/WindowsComponentFactory.cs:9) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/Input/Keyboard/KeyEqualityComparer.cs:5— `KeyEqualityComparer` (Terminal.Gui/Input/Keyboard/KeyEqualityComparer.cs:5) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/ViewBase/IValueParser.cs:16— `Terminal.Gui.ViewBase.IValueParser` (Terminal.Gui/ViewBase/IValueParser.cs:16) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/Views/GraphView/LineF.cs:4— `Terminal.Gui.Views.LineF` (Terminal.Gui/Views/GraphView/LineF.cs:4) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/Views/LinearRange/LinearRangeDefaults.cs:8— `Terminal.Gui.Views.LinearRangeDefaults` (Terminal.Gui/Views/LinearRange/LinearRangeDefaults.cs:8) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/Views/TextInput/TextField/TextFieldAutocomplete.cs:7— `Terminal.Gui.Views.TextFieldAutocomplete` (Terminal.Gui/Views/TextInput/TextField/TextFieldAutocomplete.cs:7) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library Terminal.Gui/Views/TreeView/TreeNodeBuilder.cs:4— `Terminal.Gui.Views.TreeNodeBuilder` (Terminal.Gui/Views/TreeView/TreeNodeBuilder.cs:4) is public, and the library's own code uses it, but no other project in this repository uses it (read: `AppTestHelpers`, `AppTestHelpers.XunitHelpers`, `Benchmarks`, `IntegrationTests`, `NativeAotSmoke`, `OutputView`, `PerformanceTests`, `ScenarioRunner`, `StressTests`, `Terminal.Gui.Interop.Spectre`, `UICatalog`, `UnitTests.Legacy`, `UnitTests.NonParallelizable`, `UnitTests.Parallelizable`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Silent fallback default on parse failure Terminal.Gui/Configuration/KeyJsonConverter.cs:12— `Read` falls back to `Key.Empty` when `Key.TryParse (reader.GetString ()!, out Key key)` 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 Terminal.Gui/ViewBase/IValue.cs:107— `TrySetValueFromString` returns `false` when `IValueParser.TryParseValue (input, out TValue? parsed)` 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 Terminal.Gui/Views/Color/ColorPicker.cs:163— `OnTextChanging` returns `true` when `_colorNameResolver.TryParseColor (newText, out _)` 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 Terminal.Gui/Views/DatePicker.cs:56— `OnTextChanging` returns `true` when `DateTime.TryParse (newText, out _)` 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 Terminal.Gui/Views/ListView/ListViewT.cs:132— `TrySetValueFromString` returns `false` when `IValueParser.TryParseValue (input, out T? parsed)` 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 Terminal.Gui/Views/TextInput/DateEditor.cs:152— `TrySetValueFromString` returns `false` when `IValueParser.TryParseValue (input, out DateTime parsed)` 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 Terminal.Gui/Views/TextInput/DateTextProvider.cs:191— `Delete` returns `false` when `TryParseDateValue (sb.ToString (), out DateTime newValue)` 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 Terminal.Gui/Views/TextInput/DateTextProvider.cs:221— `InsertAt` returns `false` when `TryParseDateValue (sb.ToString (), out DateTime newValue)` 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 Terminal.Gui/Views/TextInput/TimeEditor.cs:168— `TrySetValueFromString` returns `false` when `IValueParser.TryParseValue (input, out TimeSpan parsed)` 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 Terminal.Gui/Views/TextInput/TimeTextProvider.cs:242— `Delete` returns `false` when `TryParseTimeValue (sb.ToString (), out TimeSpan newValue)` 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 Terminal.Gui/Views/TextInput/TimeTextProvider.cs:295— `InsertAt` returns `false` when `TryParseTimeValue (sb.ToString (), out TimeSpan newValue)` 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.
Orphaned file Terminal.Gui/Drawing/Gradient.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 Terminal.Gui/App/ApplicationToolTip.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 Terminal.Gui/App/Popovers/ToolTipHost.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 Terminal.Gui/Drawing/Quant/PopularityPaletteWithThreshold.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 Terminal.Gui/Views/Color/ColorModelStrategy.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 Terminal.Gui/Drawing/TextStyle.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 Terminal.Gui/Drivers/AnsiHandling/IAnsiResponseParser.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 Terminal.Gui/Views/CollectionNavigation/ICollectionNavigator.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.
Interpolated log message defeats structured logging Terminal.Gui/App/Logging.cs:83— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging Terminal.Gui/App/Logging.cs:95— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging Terminal.Gui/App/Logging.cs:107— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging Terminal.Gui/App/Logging.cs:119— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging Terminal.Gui/App/Logging.cs:131— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging Terminal.Gui/App/Logging.cs:143— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Interpolated log message defeats structured logging Terminal.Gui/Drivers/AnsiHandling/AnsiResponseParserBase.cs:706— Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
Fat interface: IApplication (48 members) Terminal.Gui/App/IApplication.cs:16— `IApplication` declares 48 members: `MainThreadId`, `Init`, `InitializedChanged`, `Initialized`, `ResetState`, `SessionStack`, `SessionBegun`, `TopRunnable`, `TopRunnableView`, `Begin`, `Run`, `RunAsync`, `RunAsync`, `Run`, `RaiseIteration`, `Iteration`, `Invoke`, `Invoke`, `StopAfterFirstIteration`, `RequestStop`, `RequestStop`, `End`, `SessionEnded`, `GetResult`, `GetResult`, `Driver`, `AnsiStartupGate`, `Clipboard`, `ForceDriver`, `AppModel`, `ForceInlinePosition`, `Screen`, `ScreenChanged`, `ClearScreenNextIteration`, `GetInputInjector`, `Keyboard`, `Mouse`, `Paste`, `RaisePasteEvent`, `LayoutAndDraw`, and 8 more. 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 48 declarations carry 43 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 43 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: IDriver (63 members) Terminal.Gui/Drivers/IDriver.cs:6— `IDriver` declares 63 members: `Init`, `Refresh`, `GetName`, `Suspend`, `IsLegacyConsole`, `GetInputProcessor`, `GetOutputBuffer`, `GetOutput`, `Clipboard`, `ProgressIndicator`, `AnsiStartupGate`, `Screen`, `SetScreenSize`, `SizeChanged`, `Cols`, `Rows`, `Left`, `Top`, `InlinePosition`, `AppModel`, `SixelSupport`, `SixelSupportChanged`, `SetSixelSupport`, `KittyGraphicsSupport`, `KittyGraphicsSupportChanged`, `SetKittyGraphicsSupport`, `SupportsTrueColor`, `Force16Colors`, `DefaultAttribute`, `DefaultAttributeChanged`, `ColorCapabilities`, `Contents`, `Clip`, `ClearContents`, `ClearedContents`, `Col`, `Row`, `CurrentAttribute`, `CurrentUrl`, `Move`, and 23 more. 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 63 declarations carry 62 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 62 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: IOutputBuffer (26 members) Terminal.Gui/Drivers/Output/IOutputBuffer.cs:23— `IOutputBuffer` declares 26 members: `AddRune`, `AddRune`, `AddStr`, `ClearContents`, `DirtyLines`, `Clip`, `Col`, `Cols`, `Contents`, `CurrentAttribute`, `FillRect`, `FillRect`, `IsValidLocation`, `Left`, `Move`, `AddRasterImage`, `RemoveRasterImage`, `RetainRasterImages`, `GetRasterImages`, `Row`, `Rows`, `CurrentUrl`, `GetCellUrl`, `SetSize`, `Top`, `SetWideGlyphReplacement`. 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 26 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: IAutocomplete (18 members) Terminal.Gui/Views/Autocomplete/IAutocomplete.cs:10— `IAutocomplete` declares 18 members: `ClearSuggestions`, `CloseKey`, `Scheme`, `Context`, `GenerateSuggestions`, `HostControl`, `MaxHeight`, `MaxWidth`, `OnMouseEvent`, `PopupInsideContainer`, `ProcessKey`, `RenderOverlay`, `Reopen`, `SelectedIdx`, `SelectionKey`, `SuggestionGenerator`, `Suggestions`, `Visible`. 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.
P10 · Library API & versioning· Implementation type on the public API · ×3
Implementation type on the public API Terminal.Gui/App/Popovers/PopoverImpl.cs:44— 1 public type in `Terminal.Gui.App` is marked as implementation by its own namespace, folder or name: `PopoverImpl` (Terminal.Gui/App/Popovers/PopoverImpl.cs:44, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API Terminal.Gui/Drivers/ComponentFactoryImpl.cs:8— 4 public types in `Terminal.Gui.Drivers` are marked as implementation by their own namespace, folder or name: `ComponentFactoryImpl` (Terminal.Gui/Drivers/ComponentFactoryImpl.cs:8, name ends in `Impl`), `InputImpl` (Terminal.Gui/Drivers/Input/InputImpl.cs:11, name ends in `Impl`), `InputProcessorImpl` (Terminal.Gui/Drivers/Input/InputProcessorImpl.cs:10, name ends in `Impl`), `OutputBufferImpl` (Terminal.Gui/Drivers/Output/OutputBufferImpl.cs:11, name ends in `Impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
Implementation type on the public API Terminal.Gui/ViewBase/Adornment/AdornmentImpl.cs:9— 1 public type in `Terminal.Gui.ViewBase` is marked as implementation by its own namespace, folder or name: `AdornmentImpl` (Terminal.Gui/ViewBase/Adornment/AdornmentImpl.cs:9, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 18 significant file(s) lose their only recent owner: Terminal.Gui/Drawing/Region.cs, Terminal.Gui/Drivers/Mouse/MouseInterpreter.cs, Terminal.Gui/ViewBase/Layout/Aligner.cs, Terminal.Gui/Views/LinearRange/LinearRangeT.cs, Terminal.Gui/Drawing/Kitty/KittyGraphicsEncoder.cs, Terminal.Gui/Views/Bar.cs, docfx/scripts/OutputView/OutputView.cs, Terminal.Gui/Views/ImageView/ImageView.Drawing.cs (+10 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 7 significant file(s) lose their only recent owner: Terminal.Gui/Views/Markdown/MarkdownView.Parsing.cs, Terminal.Gui/App/Timeout/TimedEvents.cs, Terminal.Gui/App/ApplicationImpl.Dispatch.cs, Terminal.Gui/App/Timeout/ITimedEvents.cs, Terminal.Gui/Views/Markdown/TableData.cs, Terminal.Gui/App/ApplicationDispatchExtensions.cs, Terminal.Gui/App/UiDispatchOperation.cs. Pair on, review, or document these before any departure.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×2
Projects may be oversized for their cohesion REDACTED:1— `Terminal.Gui` overshoots its size bounds (117174 LoC, 641 public types across 14 namespaces). 2 of 25 project(s) overshoot their size bounds, lowering Project Cohesion to 8.4/10. Size alone is no reason to split a project: where its type references show a separable part, a Split row names it.
Projects may be oversized for their cohesion Examples/UICatalog/UICatalog.csproj:1— `UICatalog` overshoots its size bounds (29036 LoC, 154 public types across 2 namespaces). 2 of 25 project(s) overshoot their size bounds, lowering Project Cohesion to 8.4/10. Size alone is no reason to split a project: where its type references show a separable part, a Split row names it.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 2 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 (28 single-owned of 392 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 392 of the 731 production source files in this repository met that bar). They are anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: Terminal.Gui/ViewBase/View.Drawing.LineCanvas.cs, Terminal.Gui/Drivers/AnsiHandling/AnsiResponseParser.cs.
Thin analysable surface across projects: ConsumerLib Tests/TestAssets/ConfigPropertyTypeLoad/ConsumerLib/ConsumerLib.csproj— 1 project(s) carry only a thin slice of real code; `ConsumerLib` has 10 significant line(s). The mean analysable-surface weight is 91 %; this project lowers Solution Shape by about 0.73 point(s). Consolidate it or grow it into a substantial, well-scoped assembly.
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/`.
D21 · Naming Consistency· `ReplaceTABWithSpaces` spells `TAB` where 32 names in the project spell it `Tab` · ×1
`ReplaceTABWithSpaces` spells `TAB` where 32 names in the project spell it `Tab` Terminal.Gui/Text/TextFormatter.cs:1376— 32 of 33 names in project Terminal.Gui spell the token `Tab` (32 of 33; unit: names in project Terminal.Gui containing `Tab`). Peers: Command.InsertTab (Terminal.Gui/Input/Command.cs:229); Command.NextTabStop (Terminal.Gui/Input/Command.cs:306); Command.PreviousTabStop (Terminal.Gui/Input/Command.cs:309); Command.NextTabGroup (Terminal.Gui/Input/Command.cs:312); Command.PreviousTabGroup (Terminal.Gui/Input/Command.cs:315). Rename to `ReplaceTabWithSpaces`. [rule N6]
D28 · Secrets (history)· Rotate the exposed credentials · ×1
REDACTED
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 8 of 392 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 392 of the 731 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: Terminal.Gui/Drawing/Gradient.cs, Terminal.Gui/App/ApplicationToolTip.cs, Terminal.Gui/App/Popovers/ToolTipHost.cs, Terminal.Gui/Drawing/Quant/PopularityPaletteWithThreshold.cs, Terminal.Gui/Views/Color/ColorModelStrategy.cs, Terminal.Gui/Drawing/TextStyle.cs, Terminal.Gui/Drivers/AnsiHandling/IAnsiResponseParser.cs, Terminal.Gui/Views/CollectionNavigation/ICollectionNavigator.cs. 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.
GD1 · Unfinished & placeholder code· Placeholder literal left in code · ×1
Placeholder literal left in code Examples/UICatalog/Scenarios/ColorPicker.cs:93— A placeholder string ("Lorem Ipsum") is still in shipped code — typical of generated boilerplate that was never filled in.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No 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.)
X2 · Cancellation propagation· Not all async methods take a CancellationToken · ×1
Not all async methods take a CancellationToken — Only 0/16 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 — 7/11 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 override nullable warnings — ~2.2 `!` suppressions per 1k syntax nodes — 1149 suppression(s) across the 532214 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. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Skipped (documented): InputLoop_Throttle_Limits_Poll_Rate Tests/UnitTestsParallelizable/Application/MainLoopCoordinatorTests.cs:155— Skipped with a documented reason — a deferral, not lazy debt: Can't get this to run reliably. It synchronises against a background task with `Thread.Sleep(500)` — a fixed wait rather than a signal, which is the usual cause of exactly this kind of randomness.
Skipped (documented): InjectMouseEvent_Pipeline Tests/UnitTestsParallelizable/Application/Mouse/ApplicationMouseTests.cs:617— Skipped with a documented reason — a deferral, not lazy debt: Skip until Pipeline Mode is Fixed
Skipped (documented): IterationImpl_Inline_FullTimeline_TraceDump Tests/UnitTestsParallelizable/Drivers/Output/InlineDrawTimingTests.cs:230— Skipped with a documented reason — a deferral, not lazy debt: Bogus test; do not use tracing for test results.
Skipped (documented): ProcessQueue_DoesNotReleaseEscape_BeforeTimeout Tests/UnitTestsParallelizable/Input/InputProcessorImplTests.cs:49— Skipped with a documented reason — a deferral, not lazy debt: Flaky test causing random GitHub workflow failures - see issue
Skipped (documented): BorderSettings_TerminalTitle_When_Enabled_On_Runnable_View_Writes_Osc Tests/UnitTestsParallelizable/ViewBase/Adornment/BorderDrawTests.cs:230— Skipped with a documented reason — a deferral, not lazy debt: not sure what broke this
Skipped (documented): Margin_TransparentMouse_Shadow_Clicks_Are_Captured Tests/UnitTestsParallelizable/ViewBase/Adornment/BorderTransparentTests.cs:410— Skipped with a documented reason — a deferral, not lazy debt: Phase 2d/2e — ShadowView drawn region and hit-testing not yet implemented
Skipped (documented): Margin_Transparent_Text_Is_Opaque_Over_Peer_SubViews Tests/UnitTestsParallelizable/ViewBase/Adornment/BorderTransparentTests.cs:808— Skipped with a documented reason — a deferral, not lazy debt: Transparent non-shadow Margin text rendering not yet supported in first-pass drawing
Skipped (documented): Margin_TransparentMouse_DrawnText_Captured_UndrawnCells_PassThrough Tests/UnitTestsParallelizable/ViewBase/Adornment/BorderTransparentTests.cs:943— Skipped with a documented reason — a deferral, not lazy debt: Transparent non-shadow Margin mouse hit-testing not yet supported
Skipped (documented): Shortcut_With_MouseHighlightStates_In_Routes_To_CommandView Tests/UnitTestsParallelizable/ViewBase/Mouse/MouseHighlightStatesSubViewTests.cs:192— Skipped with a documented reason — a deferral, not lazy debt: Shortcut has complex layout - core fix works for basic SubView scenarios
Skipped (documented): Shortcut_Action_Fires_On_Accept Tests/UnitTestsParallelizable/Views/BarTests.cs:412— Skipped with a documented reason — a deferral, not lazy debt: Fix in #4620 - genericized deferred raising
Skipped (documented): Mouse_Click_On_Different_MenuBarItem_Switches Tests/UnitTestsParallelizable/Views/MenuBarTests.cs:1140— Skipped with a documented reason — a deferral, not lazy debt: Mouse click switching has a timing issue: OnSelectedMenuItemChanged auto-opens, then click's Activate toggles off.
Skipped (documented): MenuItem_Action_Fires_On_Accept Tests/UnitTestsParallelizable/Views/MenuTests.cs:329— Skipped with a documented reason — a deferral, not lazy debt: Fix in #4620 - genericized deferred raising
Skipped (documented): PageUp_Navigates_Up_One_Page Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs:10— Skipped with a documented reason — a deferral, not lazy debt: Pre-existing PageUp bug - cursor doesn't move from row 2 (see note above)
Skipped (documented): PageDown_Navigates_Down_One_Page Tests/UnitTestsParallelizable/Views/TextView.NavigationTests.cs:38— Skipped with a documented reason — a deferral, not lazy debt: Pre-existing PageDown bug - cursor doesn't move from row 0
Skipped (documented): ShiftPageUp_Selects_Page_Upward Tests/UnitTestsParallelizable/Views/TextView.SelectionTests.cs:184— Skipped with a documented reason — a deferral, not lazy debt: Pre-existing PageUp bug - cursor doesn't move (see PageUp_Navigates_Up_One_Page)
Skipped (documented): ShiftPageDown_Deselects_Page_Downward Tests/UnitTestsParallelizable/Views/TextView.SelectionTests.cs:228— Skipped with a documented reason — a deferral, not lazy debt: Pre-existing PageDown bug - see PageDown_Navigates_Down_One_Page
doc comments repeat the names Tests/AppTestHelpers/AppTestHelper.ContextMenu.cs:13— 0 of 32 documented parameters and 0 of 39 summaries in `AppTestHelpers` only repeat the member or parameter name (e.g. "" for `contextMenu`). 18 documentation tag(s) are empty. This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
doc comments repeat the names Tests/AppTestHelpers.XunitHelpers/XunitContextExtensions.cs:14— 0 of 2 documented parameters and 0 of 1 summaries in `AppTestHelpers.XunitHelpers` only repeat the member or parameter name (e.g. "" for `context`). 2 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
doc comments repeat the names Tests/AppTestHelpers.XunitHelpers.Generator/TheGenerator.cs:280— 0 of 1 documented parameters and 0 of 1 summaries in `AppTestHelpers.XunitHelpers.Generator` only repeat the member or parameter name (e.g. "" for `p`). 1 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
doc comments repeat the names Tests/Benchmarks/Text/RuneExtensions/DecodeSurrogatePair.cs:18— 0 of 7 documented parameters and 0 of 126 summaries in `Benchmarks` only repeat the member or parameter name (e.g. "" for `rune`). 6 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
doc comments repeat the names Tests/IntegrationTests/FluentTests/MenuBarTests.cs:9— 0 of 0 documented parameters and 2 of 25 summaries in `IntegrationTests` only repeat the member or parameter name (e.g. "Tests for the MenuBar class" for `MenuBarTests`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names Terminal.Gui/App/Application.cs:56— 91 of 2174 documented parameters and 123 of 5620 summaries in `Terminal.Gui` only repeat the member or parameter name (e.g. "Creates a new instance." for `Create`). 432 documentation tag(s) are empty. This build requires documentation, so say what the name does not: units, ranges, null handling, side effects.
doc comments repeat the names Tests/UnitTests.Legacy/TestsAllViews.cs:12— 1 of 34 documented parameters and 2 of 33 summaries in `UnitTests.Legacy` only repeat the member or parameter name (e.g. "Gets all view types." for `AllViewTypes`). 13 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
doc comments repeat the names Tests/UnitTestsParallelizable/Application/Popover/PopoverMenuTests.cs:5— 0 of 21 documented parameters and 7 of 863 summaries in `UnitTests.Parallelizable` only repeat the member or parameter name (e.g. "Tests for ." for `PopoverMenuTests`). 18 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 95 file(s) — `Examples/UICatalog/ScenarioCategory.cs`, `Examples/UICatalog/ScenarioMetadata.cs`, `Examples/UICatalog/Scenarios/Adornments.cs`, `Examples/UICatalog/Scenarios/AnimationScenario/AnimationScenario.cs`, `Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs`, … (+90 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 01a1cd5b-4a2d-7f58-a3c8-a7b98266b0e0 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 153 · Warnings: 1062 · Recommendations: 297 · Info: 47 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 12-11-2026 @ 01:24 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.