Public report of JosefNemec/Playnite, published 23 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 23 October 2026, 07:35 UTC · Survey ID cd_6a41c6964d4d4539afae1b618233476c

JosefNemec/Playnite

Measured 23 October 2026, 07:30 UTC, at code version 3e8abb2

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

Code coverage is not measured: No coverage collector is wired up.

Test reliability is not measured: No test run produced results.

Boundary Type-Coupling is not measured: Bounded contexts not declared.

CAI score 40out of 100 Provisional Down 1 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: 119,486 lines of product code in 22 projects, tests not counted · Estimated rebuild effort: about 2.3 person-years · Weakest lens: Security and Compliance, 32

Findings by how serious they are

76 critical 695 serious 71 minor

4 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
23 October 2026, 07:30 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

The code didn't build, so the score is provisional
Watchdog couldn't build the code: the build stopped with 2 errors. The dimensions that need a working build, such as complexity, duplication and dead code, were measured on an incomplete picture of the code, so their grades and the score are provisional. Fix the build errors and run the survey again for a final score. The first errors: CS5001: Program does not contain a static 'Main' method suitable for an entry point

The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

71of 75 dimensions measured by tools. The other 4 are advisory notes from an AI model, which explain the code but don't count towards the score.
814of 842 findings point to an exact file and line, so you can open each one in the code. The other 28 concern the repository as a whole, such as missing documentation.
75dimensions across 6 lenses, read from 119,486 lines of product code in 22 projects.
Chapters

Executive summary

JosefNemec/Playnite scores 40 out of 100 and is rated Provisional, while three of its six lenses score higher still: Performance at 60 rated Adequate, Maturity at 48 rated Weak, and Architecture at 95 rated Exemplary. The score is provisional because the code didn't build, so the ratings may change once it does.

The score is lower than those three because the weakest lens counts most, and here that is Security and Compliance, which scores 32 and is rated Weak. The project has no access controls and its Supply-chain Provenance & Signing dimension scores 3.3 out of 10, so until the Access Controls dimension reaches 4, Security and Compliance can't be rated higher than Adequate. Authorizing the service host and dropping old SSL and TLS protocols are therefore the first actions, and if Security and Compliance rose to 70, the score would rise from 40 to about 46.

Seventy-six findings are critical, including fifty-one WriteOnlyPrivateField issues, four EmptyCatchBlock issues, four FileScopedPragmaDisable issues, three Namespace dependency cycles, three InvertedNullGuard issues, three AnalyzerSeverityNone issues, two No assertions issues, two DeadLoopAccumulator issues, one Assertions commented out issue, one Test project verifies nothing issue, one REDACTED in history, and one Weak hash is the integrity check issue. Resolving the commented out assertions in Test Quality is a low effort action that raises the score by about 2 points.

Watchdog couldn't measure Dependency Hygiene because nuget.playnite.link could not be reached, and it couldn't measure IL Efficiency because the analyzer's build of the target did not succeed. The product code is 119,486 lines, which would take an estimated 2.3 person-years, around €340,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 for The 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.
Security and Compliance 32 · counts for 46%Production Readiness 39 · counts for 25%Code Health 47 · counts for 14%Maturity 48 · counts for 8%Performance 60 · counts for 4%Architecture 95 · counts for 2%

If Security and Compliance rose from 32 to 70, the lowest score rated Strong, the score would rise from 40 to about 46.

Code composition: what the lines of code are
Business logic 38%Supporting code 55%Tests 7%
New since the last survey: 58 findings

These 58 critical or serious findings weren't in the previous survey, on 9 October 2026.

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 85 findings

These 85 critical or serious findings were in the previous survey, on 9 October 2026, and are gone from this one.

  • Coupling · Off the main sequence: Playnite.SDK
  • Coupling · Off the main sequence: Playnite
  • Explicit Debt · WriteOnlyPrivateField source/Playnite/ViewModels/ProgressViewViewModel.cs
  • Explicit Debt · WriteOnlyPrivateField source/Playnite.DesktopApp/ViewModels/PluginSettingsViewModel.cs
  • Explicit Debt · WriteOnlyPrivateField source/Playnite/ViewModels/SearchViewModel.cs
  • Explicit Debt · WriteOnlyPrivateField source/Playnite.DesktopApp/ViewModels/PluginSettingsViewModel.cs
  • Explicit Debt · WriteOnlyPrivateField source/Playnite/ViewModels/SearchViewModel.cs
  • Explicit Debt · WriteOnlyPrivateField source/Playnite/Database/Collections/GameScannersCollection.cs
  • Explicit Debt · DiscardedPureResult source/Playnite/Extensions/GameExtensions.cs
  • Explicit Debt · WriteOnlyPrivateField source/Playnite/ViewModels/ProgressViewViewModel.cs
  • Explicit Debt · WriteOnlyPrivateField source/Tools/Playnite.Toolbox/Templates/Extensions/CustomMetadataPlugin/_name_Provider.cs
  • Explicit Debt · TodoComment source/Playnite.DesktopApp/Controls/SettingsSections/AppearanceGeneral.xaml
  • Cancellation propagation · Async method without CancellationToken: SetSortingNames source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs
  • Cancellation propagation · Async method without CancellationToken: GetIsConnectedToInternet source/Playnite/Common/Network.cs
  • Cancellation propagation · Async method without CancellationToken: CancelAndWaitAsync source/Playnite/GlobalTaskHandler.cs
  • Cancellation propagation · Async method without CancellationToken: StopWatcher source/Playnite/ObservablePowerStatus.cs
  • Cancellation propagation · Async method without CancellationToken: StopWatcher source/Playnite/ObservableTime.cs
  • Cancellation propagation · Async method without CancellationToken: TryDownloadManifest source/Tools/PlayniteInstaller/MainViewModel.cs
  • Cancellation propagation · Async method without CancellationToken: TryDownloadInstaller source/Tools/PlayniteInstaller/MainViewModel.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/FileSystem.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/Network.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/Paths.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/Serialization.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/Serialization.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/Serialization.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/Serialization.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/Serialization.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/Serialization.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/Serialization.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/TGASharpLib.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/TGASharpLib.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/TGASharpLib.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/TGASharpLib.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/TGASharpLib.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/TGASharpLib.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/TGASharpLib.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/TGASharpLib.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Common/TGASharpLib.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/Playnite/Converters/GenericTypeConverter.cs
  • Exception handling · Swallowed exception (caught, then discarded) source/PlayniteSDK/Models/Game.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Database/InMemoryGameDatabase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/FakePlayniteLibraryPlugin.cs
  • Incompleteness & stubs · Condition was already decided — an earlier guard makes this test constant source/Playnite/GamesEditor.cs
  • Incompleteness & stubs · Condition was already decided — an earlier guard makes this test constant source/Playnite/GamesEditor.cs
  • Incompleteness & stubs · Condition was already decided — an earlier guard makes this test constant source/Playnite/GamesEditor.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Scripting/PowerShell/PowerShell.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/Scripting/PowerShell/PowerShell.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/SelectableItem.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/SelectableItem.cs
  • Incompleteness & stubs · Condition was already decided — an earlier guard makes this test constant source/Playnite/ViewModels/MainViewModelBase.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/WebView/OffscreenWebView.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Playnite/WebView/OffscreenWebView.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Tools/Playnite.Toolbox/Templates/Extensions/CustomLibraryPlugin/_name_Client.cs
  • Incompleteness & stubs · Unfinished stub — throws NotImplementedException source/Tools/Playnite.Toolbox/Templates/Extensions/CustomMetadataPlugin/_name_Provider.cs
Rebuild cost: about €340,000 · Estimate
Cost to rebuild€110,000 to €570,000, for 1,827 to 5,951 hours of work, about 2.3 person-years for 1 to 5 engineers
Difficulty of the problemStandard, 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 40. 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.
SizeLarge: 119,486 lines of product code, of which 37% is declarations and boilerplate, 23% straight logic and 41% logic with branches
Comment linesThe estimate prices 105,706 lines. Comment lines count towards the size of 119,486 lines but aren't priced as work.

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Authorize the service host, don't just host it: derive a ServiceAuthorizationManager and set it as the host's authorization policy (or decorate each [OperationContract] with [PrincipalPermission], or call an explicit guard on OperationContext.Current.ServiceSecurityContext at the top of every operation) so the caller's identity has to satisfy a named rule before the operation runs.
Raises the score by about 7 points · Medium effort · Access Controls
2
Drop SSL 2.0/3.0 and TLS 1.0/1.1 from the enabled protocol list — prefer leaving it to the OS default (`SystemDefault`) so new versions are picked up automatically, or name `Tls12`/`Tls13` explicitly if it must be pinned.
Raises the score by about 5 points · Medium effort · Cryptographic Hygiene
3
Resolve the 1 Assertions commented out finding(s) in Test Quality — start with FullscreenTilePanelTests.cs.
Raises the score by about 2 points · Low effort · Test Quality

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

If you do one thing first · First action
Fix the build. The code didn't build, so the dimensions that need a working build were measured on an incomplete picture of the code, and every grade in this report is provisional. Once the build works, the next survey gives a final score. The compiler's first errors: CS5001: Program does not contain a static 'Main' method suitable for an entry point
Based on: Solution Shape
Where the investment is most exposed · Value at risk
This code would cost about €340,000 to build again, about 2.3 person-years of work. Its weakest lens is Security and Compliance, at 32 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.

Architecture — bounded-context dependency graph

Each box is a bounded context (its layer projects grouped, or a project count when large); arrows show dependencies between contexts. A shared kernel is where many arrows converge.

arch CustomLibraryPlugin CustomLibraryPlugin CustomMetadataPlugin CustomMetadataPlugin GenericPlugin GenericPlugin Playnite Playnite Playnite.SDK SDK Playnite->Playnite.SDK Playnite.BrowserProcess BrowserProcess Playnite.Deps Deps Playnite.DesktopApp DesktopApp Playnite.DesktopApp->Playnite Playnite.DesktopApp->Playnite.SDK Playnite.FullscreenApp FullscreenApp Playnite.FullscreenApp->Playnite Playnite.FullscreenApp->Playnite.SDK Playnite.Toolbox Toolbox Playnite.Toolbox->Playnite Playnite.Toolbox->Playnite.SDK Playnite.Utilities Utilities Playnite.Utilities->Playnite PlayniteInstaller PlayniteInstaller Theme (source/Tools/Playnite.Toolbox/Templates/Themes/Desktop) Desktop) Theme (source/Tools/Playnite.Toolbox/Templates/Themes/Fullscreen) Fullscreen)

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.

73 modules, with 236 dependencies between them. 3 loops run through 29 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 33 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 System.Collections.Generic2 Playnite.Controls3 Playnite.FullscreenApp.Controls.SettingsSections4 Playnite.SDK.Models5 Playnite.SDK.Events6 Playnite.SDK.Plugins7 Playnite.SDK8 System9 Playnite.API.DesignData10 Playnite.Audio11 Playnite.Common12 Playnite.Input13 Playnite.Scripting14 Playnite.Services15 Playnite.Windows16 System.Drawing.Imaging17 Playnite.DesktopApp.Windows18 Playnite.FullscreenApp.Windows19 Playnite.Scripting.PowerShell20 Playnite.WebView21 Playnite.Controllers22 Playnite.Plugins23 Playnite.ViewModels24 Playnite.Database25 Playnite.API26 Playnite.Emulators27 Playnite.Metadata28 Playnite29 Playnite.Commands30 Playnite.DesktopApp.Controls31 Playnite.Extensions.Markup32 Playnite.FullscreenApp.ViewModels33 Playnite.DesktopApp.Controls.Views34 Playnite.FullscreenApp35 Playnite.FullscreenApp.API36 Playnite.FullscreenApp.Controls37 Playnite.DesktopApp.ViewModels38 Playnite.FullscreenApp.Controls.Views39 Playnite.DesktopApp40 Playnite.DesktopApp.API
1 System.Collections.Generic
2 Playnite.Controls14
3 Playnite.FullscreenApp.Controls.SettingsSections61
4 Playnite.SDK.Models51
5 Playnite.SDK.Events101
6 Playnite.SDK.Plugins422158
7 Playnite.SDK231471
8 System461
9 Playnite.API.DesignData122418
10 Playnite.Audio1
11 Playnite.Common131
12 Playnite.Input121
13 Playnite.Scripting942
14 Playnite.Services23
15 Playnite.Windows1121
16 System.Drawing.Imaging11
17 Playnite.DesktopApp.Windows56331
18 Playnite.FullscreenApp.Windows32411
19 Playnite.Scripting.PowerShell9413
20 Playnite.WebView21511
21 Playnite.Controllers83113122
22 Playnite.Plugins212205117
23 Playnite.ViewModels11719382112518
24 Playnite.Database462427432116
25 Playnite.API124614302145
26 Playnite.Emulators41951
27 Playnite.Metadata224211
28 Playnite23154218443412211292821
29 Playnite.Commands21
30 Playnite.DesktopApp.Controls282862107
31 Playnite.Extensions.Markup31
32 Playnite.FullscreenApp.ViewModels1016623111102331181
33 Playnite.DesktopApp.Controls.Views441416
34 Playnite.FullscreenApp2315111171
35 Playnite.FullscreenApp.API6141
36 Playnite.FullscreenApp.Controls14135
37 Playnite.DesktopApp.ViewModels26924199511314211241613335112
38 Playnite.FullscreenApp.Controls.Views3251
39 Playnite.DesktopApp153151221121
40 Playnite.DesktopApp.API6141
Uses a module listed above itPart of a loopThe module itself
1 System.Collections.Generic2 Playnite.Controls3 Playnite.FullscreenApp.Controls.SettingsSections4 Playnite.SDK.Models5 Playnite.SDK.Events6 Playnite.SDK.Plugins7 Playnite.SDK8 System9 Playnite.API.DesignData10 Playnite.Audio11 Playnite.Common12 Playnite.Input13 Playnite.Scripting14 Playnite.Services15 Playnite.Windows16 System.Drawing.Imaging17 Playnite.DesktopApp.Windows18 Playnite.FullscreenApp.Windows19 Playnite.Scripting.PowerShell20 Playnite.WebView21 Playnite.Controllers22 Playnite.Plugins23 Playnite.ViewModels24 Playnite.Database25 Playnite.API26 Playnite.Emulators27 Playnite.Metadata28 Playnite29 Playnite.Commands30 Playnite.DesktopApp.Controls31 Playnite.Extensions.Markup32 Playnite.FullscreenApp.ViewModels33 Playnite.DesktopApp.Controls.Views34 Playnite.FullscreenApp35 Playnite.FullscreenApp.API36 Playnite.FullscreenApp.Controls37 Playnite.DesktopApp.ViewModels38 Playnite.FullscreenApp.Controls.Views39 Playnite.DesktopApp40 Playnite.DesktopApp.APISystem.Collections.Generic1Playnite.Controls2Playnite.FullscreenApp.Controls.SettingsSections3Playnite.SDK.Models4Playnite.SDK.Events5Playnite.SDK.Plugins6Playnite.SDK7System8Playnite.API.DesignData9Playnite.Audio10Playnite.Common11Playnite.Input12Playnite.Scripting13Playnite.Services14Playnite.Windows15System.Drawing.Imaging16Playnite.DesktopApp.Windows17Playnite.FullscreenApp.Windows18Playnite.Scripting.PowerShell19Playnite.WebView20Playnite.Controllers21Playnite.Plugins22Playnite.ViewModels23Playnite.Database24Playnite.API25Playnite.Emulators26Playnite.Metadata27Playnite28Playnite.Commands29Playnite.DesktopApp.Controls30Playnite.Extensions.Markup31Playnite.FullscreenApp.ViewModels32Playnite.DesktopApp.Controls.Views33Playnite.FullscreenApp34Playnite.FullscreenApp.API35Playnite.FullscreenApp.Controls36Playnite.DesktopApp.ViewModels37Playnite.FullscreenApp.Controls.Views38Playnite.DesktopApp39Playnite.DesktopApp.API401461511014221582314714611224181131121942231121115633132411941321511831131222122051171171938211251846242743211612461430214541951224211231542184434122112928212128286210731101662311110233118144141623151111716141141352692419951131421124161333511232511531512211216141+33 more modules (most-connected shown)

At a glance — Code Health · 47% · Weak · gated by D18, X1 ·

At a glance — Architecture · 95% · Exemplary ·

At a glance — Maturity · 48% · Weak · gated by M2 ·

At a glance — Readiness · 39% · Weak · gated by P3, P7 ·

At a glance — Security · 32% · Weak · gated by D36, C2 ·

At a glance — Performance · 60% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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 categoryFindingsSeverity
A05:2025 — Injection10Medium
A03:2025 — Software Supply Chain Failures3Medium
A07:2025 — Authentication Failures2High / Critical

Roadmap

First, enforce strict access controls by implementing authorization policies or guards to verify caller identity before operations execute. Second, update cryptographic settings to disable legacy TLS versions and rely on OS defaults or explicit modern standards. Third, integrate static analysis into the CI pipeline to block security regressions. Finally, fix the identified test quality issues in FullscreenTilePanelTests.cs to ensure tests actually validate behavior.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Authorize the service host, don't just host it: derive a ServiceAuthorizationManager and set it as the host's authorization policy (or decorate each [OperationContract] with [PrincipalPermission], or call an explicit guard on OperationContext.Current.ServiceSecurityContext at the top of every operation) so the caller's identity has to satisfy a named rule before the operation runs.+6.5 ptsMediumAccess Controls
Drop SSL 2.0/3.0 and TLS 1.0/1.1 from the enabled protocol list — prefer leaving it to the OS default (`SystemDefault`) so new versions are picked up automatically, or name `Tls12`/`Tls13` explicitly if it must be pinned.+5.4 ptsMediumCryptographic Hygiene
Resolve the 1 Assertions commented out finding(s) in Test Quality — start with FullscreenTilePanelTests.cs.+2.3 ptsLowTest Quality
Resolve the 1 Test project verifies nothing finding(s) in Test Quality — start with FullscreenTilePanelTests.cs.+2.3 ptsLowTest Quality
Resolve the 2 No assertions (empty test) finding(s) in Test Quality — start with MainViewAPITests.cs, CueSheetTests.cs.+2.3 ptsLowTest Quality
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+1.9 ptsLowSupply-chain Provenance & Signing
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+1.9 ptsLowSupply-chain Provenance & Signing
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+1.9 ptsLowSupply-chain Provenance & Signing

File quality

Per-file score 0–10 — a quality signature. Of 185 files carrying findings, judged against the Production bar: 3% slop · 71% mixed · 26% near-clean.

FileScoreBandWorst signal
source/Playnite/ViewModels/SearchViewModel.cs1.9SlopExplicit Debt: WriteOnlyPrivateField
REDACTED2.6SlopExplicit Debt: DeadLoopAccumulator
REDACTED2.8SlopExplicit Debt: WriteOnlyPrivateField
source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs2.8SlopExplicit Debt: EmptyCatchBlock
source/Playnite/Database/DatabaseExplorer.cs2.8SlopExplicit Debt: WriteOnlyPrivateField
source/Playnite.DesktopApp/ViewModels/MetadataComparisonViewModel.cs3.8SlopExplicit Debt: WriteOnlyPrivateField
source/Playnite/GamesEditor.cs4.6MixedExplicit Debt: EmptyCatchBlock
source/Playnite/Controllers/GenericGameController.cs4.6MixedExplicit Debt: DeadLoopAccumulator
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
source/Playnite/Database/OldModels/Ver2.cs4.6MixedExplicit Debt: WriteOnlyPrivateField
source/Playnite/Metadata/MetadataDownloader.cs4.7MixedExplicit Debt: InvertedNullGuard
source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs4.7MixedExplicit Debt: WriteOnlyPrivateField
source/Playnite/Database/Collections/PlatformsCollection.cs4.8MixedExplicit Debt: InvertedNullGuard
source/Playnite.DesktopApp/ViewModels/ToolsConfigViewModel.cs4.9MixedExplicit Debt: WriteOnlyPrivateField
source/Playnite/ViewModels/RandomGameSelectViewModel.cs4.9MixedExplicit Debt: WriteOnlyPrivateField
source/Tests/Playnite.FullscreenApp.Tests/Controls/FullscreenTilePanelTests.cs5.2MixedTest Quality: Assertions commented out: LayoutTest
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
source/Playnite/Database/DatabaseFilter.cs5.4MixedExplicit Debt: WriteOnlyPrivateField
source/Playnite.DesktopApp/ViewModels/StatisticsViewModel.cs5.4MixedExplicit Debt: WriteOnlyPrivateField
source/Playnite.DesktopApp/Controls/GridViewPanel.cs5.4MixedExplicit Debt: EmptyCatchBlock

How the grades work

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 — 76

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 — 695

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 — 71

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 4

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 71 of 75 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 75 dimensions across the health lenses
D1D2D3D4D5D6D9D10D13D14D15D17D18D19D20D21D24D26D27D28D29D30D34D35D36D43D44AX10AX3AX4AX5AX6AX8C2GD1IC1M1M2M3M4P1P10P2P3P4P6P7PF1PF2PF3S1X1X12X13X14X15X16X17X18X19X2X20X21X22X23X24X25X26X27X28X29X3X30X32X4

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
  1. 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, 814 of 842 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a167aa-cd41-78c3-857e-857dc6e6fffb.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 211 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 1 test source file(s) (.py, .ps1) that it cannot: it parses C# syntax and matches C# test attributes, so a vitest/jest/JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the test run produced no results for any test tier, so no test ever ran and flakiness could not be exercised. The cause could not be attributed, so it is excluded from the score rather than read as an absence of tests.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The NuGet registry this repository's packages resolve from could not be reached on this run, so no outdated, vulnerable or deprecated package could be read. The tool said: NU1301: Unable to load the service index for source https://nuget.playnite.link/v3/index.json. [source/Playnite.slnx] The proxy tunnel request to proxy 'http://egress:3128/' failed with status code '403'." [source/Playnite.slnx]. This is OUR side and an ENVIRONMENT fault — the collector exists and ran — so the remedy is the scan's network path to nuget.playnite.link, and a re-run with it reachable measures this repository.
  • D16 Bus Factor — 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. Single-maintainer repository — bus factor is not applicable (81 contributor(s) across 4077 commit(s) sampled, automation and bot accounts excluded). One of them holds 93% of the history; the other 80 hold 0.1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'source/Playnite.BrowserProcess/Playnite.BrowserProcess.csproj' with message: Unable to load the service index for source https://nuget.playnite.link/v3/index.json. The proxy tunnel request to proxy 'http://egress:3128/' failed with status code '403'.".
  • 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Large codebase (119,486 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D30 Dependency Vulnerabilities — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Nuget.playnite.link could not be reached (NU1301: Unable to load the service index for source https://nuget.playnite.link/v3/index.json. The proxy tunnel request to proxy 'http://egress:3128/' failed with status code '403'.). 1 of 2 declared ecosystem(s) (nuget packages.config) WERE scanned and every vulnerability they reported is included in this result; nuget was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that nuget is free of known-vulnerable dependencies.
  • D39 IL Efficiency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. IL NOT MEASURED: the analyzer's own build of this repository failed for an ENVIRONMENT reason (exit 1) — MSBuild's engine or the CLR gave up, or our image does not carry the SDK band/targeting pack this repository needs. This is OUR limitation, not a defect in the repo, and it is not a statement that this repository fails to build. D18 owns the question of whether this repository builds; it was not answered here.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 2 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • GD1 Unfinished & placeholder code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 43 further occurrence(s) are not listed individually; the score already reflects all 83.
  • IC1 Incompleteness & stubs — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 65 further occurrence(s) are not listed individually; the score already reflects all 105.
  • Package restore incomplete — third-party types were unresolved in part of the solution — NuGet restore did not complete for source/Tests/Playnite.DesktopApp.Tests/Playnite.DesktopApp.Tests.csproj, source/Tests/Playnite.FullscreenApp.Tests/Playnite.FullscreenApp.Tests.csproj, source/Tests/Playnite.Tests/Playnite.Tests.csproj, source/Tests/Playnite.Toolbox.Tests/Playnite.Toolbox.Tests.csproj, source/Tools/Playnite.Toolbox/Playnite.Toolbox.csproj and 8 more, so those projects were analysed with framework references only: every check keyed on a third-party type saw an error type there and reported nothing. Findings on those projects are a lower bound; run `dotnet restore` on them and rescan.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample — it is advisory and cannot weigh a comment against the precise code change it was written to explain.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (4): D19, D21, D24, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity5.9 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 5.9 / 10 · rule-coverage 100% · ceiling Prevented

83 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was MetadataDownloader.DownloadMetadataAsync at 112. A further 14 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 DesktopCollectionView.GetRelevantDataDiffer at 33 — they are counted neither in the figure above nor in this dimension's score. 5 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: source/Playnite/Common/Extensions/KeyExtensions.cs (KeyExtensions.IsNumericKey at 20), source/Playnite.DesktopApp/ViewModels/MetadataDownloadViewModel.cs (MetadataDownloadViewModel.CanDownloadData at 19), source/Playnite.DesktopApp/ViewModels/AddonsViewModel.cs (AddonsViewModel.SectionChanged at 18), source/Playnite/Controls/HotKeyBox.cs (HotKeyBox.HotKeyBox_PreviewKeyDown at 18), source/Playnite/Settings/FullscreenSettings.cs (FullscreenFilterSettings.IsSubAdditionalFilterActive.get at 18). 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.

MetadataDownloader.DownloadMetadataAsync (cyclomatic 112)source/Playnite/Metadata/MetadataDownloader.cs:311
GameEditViewModel.EditingGame_PropertyChanged (cyclomatic 90)source/Playnite.DesktopApp/ViewModels/GameEditViewModelFieldChecks.cs:849
GameEditViewModel.ConfirmDialog (cyclomatic 85)source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:525
GameDatabase.MigrateNewDatabaseFormat (cyclomatic 74)source/Playnite/Database/GameDatabaseMigration.cs:22
Game.GetDifferences (cyclomatic 65)source/PlayniteSDK/Models/Game.cs:2032

+ 78 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 5 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with MetadataDownloader.DownloadMetadataAsync (cyclomatic 112), GameEditViewModel.EditingGame_PropertyChanged (cyclomatic 90), GameEditViewModel.ConfirmDialog (cyclomatic 85). — 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 5 together lifts Cyclomatic Complexity from 5.9 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity5.1 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 5.1 / 10 · rule-coverage 100% · ceiling Prevented

151 method(s) exceeded the cognitive complexity threshold of 15; the worst was MetadataDownloader.DownloadMetadataAsync at 233.

MetadataDownloader.DownloadMetadataAsync (cognitive 233)source/Playnite/Metadata/MetadataDownloader.cs:311
GameDatabase.MigrateNewDatabaseFormat (cognitive 190)source/Playnite/Database/GameDatabaseMigration.cs:22
GameEditViewModel.ConfirmDialog (cognitive 147)source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:525
GameEditViewModel.EditingGame_PropertyChanged (cognitive 130)source/Playnite.DesktopApp/ViewModels/GameEditViewModelFieldChecks.cs:849
PlayniteApplication.PlayniteApplication.ctor (cognitive 110)source/Playnite/App/PlayniteApplication.cs:92

+ 146 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 4 bodies over 120 down to 120 or less in Cognitive Complexity — start with MetadataDownloader.DownloadMetadataAsync (cognitive 233), GameDatabase.MigrateNewDatabaseFormat (cognitive 190), GameEditViewModel.ConfirmDialog (cognitive 147). — 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 4 together lifts Cognitive Complexity from 5.1 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.4 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Prevented

71 god class(es) detected.

MethodTooLong: GameEditViewModel.EditingGame_PropertyChanged · ×28source/Playnite.DesktopApp/ViewModels/GameEditViewModelFieldChecks.cs:849
FileTooLong: Playnite/SDL2.cs · ×18source/Playnite/SDL2.cs
TooManyMethods: SDL · ×17source/Playnite/SDL2.cs
ClassTooLong: PlayniteSettings · ×8source/Playnite/Settings/PlayniteSettings.cs

What to do

  1. Resolve the 28 MethodTooLong finding(s) in God Classes — start with TGASharpLib.cs (3), PlayniteApplication.cs (2), Scanner.cs (2). — One of this dimension's main actionable groups (28 warning-level).
  2. Resolve the 18 FileTooLong finding(s) in God Classes — start with SDL2.cs, TGASharpLib.cs, PlayniteSettings.cs. — One of this dimension's main actionable groups (18 warning-level).
  3. Resolve the 17 TooManyMethods finding(s) in God Classes — start with SDL2.cs, GameEditViewModel.cs, DesktopAppViewModel.cs. — One of this dimension's main actionable groups (17 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication9.5 / 10Stronggated by 118 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Verified

114 duplicated block group(s) detected. A further 4 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (18 lines × 2) · ×9source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:819
Duplicated block (11 lines × 2) · ×9source/Playnite/Plugins/ExtensionFactory.cs:335
Duplicated block (13 lines × 2) · ×9source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel_Commands.cs:268
Duplicated block (14 lines × 2) · ×7source/Playnite.DesktopApp/DesktopApplication.cs:387
Duplicated block (8 lines × 2) · ×7source/Playnite.DesktopApp/Controls/ComboBoxList.cs:132

+ 45 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 9 Duplicated block (18 lines × 2) finding(s) in Code Duplication — start with DatabaseFieldsManagerViewModel.cs (2), MessageBoxWindow.xaml.cs (2), DesktopAppViewModel.cs. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 9 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with ItemsControlEx.cs (2), ExtensionFactory.cs, AddonsViewModel.cs. — One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 9 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with FullscreenAppViewModel_Commands.cs, ExtensionsMenuViewModels.cs, GenericGameController.cs. — One of this dimension's main actionable groups (9 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

22 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.5 / 10Stronggated by 7 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Verified

7 of 161 classes have LCOM4 above 3.

Low cohesion: Plugin (LCOM4 8) · ×7source/PlayniteSDK/Plugins/Plugin.cs:168

What to do

  1. Resolve the 7 Low cohesion finding(s) in Cohesion (LCOM4) — start with Plugin.cs, PlayniteSettings.cs, Game.cs. — One of this dimension's main actionable groups (7 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

211 test methods: 211 unit, 0 integration, 0 BDD, 0 e2e.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.4 / 10Adequategated by 4 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.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Prevented

0 skipped, 5 zero-assertion, 2 synchronised by a fixed sleep, 4 mock references across 211 tests. Measured on the C# suite only — at least 1 test source file(s) (.py, .ps1) went unread, so its test quality is unmeasured and is not in these counts.

No assertions (empty test): ViewSettingsTest · ×2source/Tests/Playnite.DesktopApp.Tests/MainViewAPITests.cs:19
Assertions commented out: LayoutTestsource/Tests/Playnite.FullscreenApp.Tests/Controls/FullscreenTilePanelTests.cs:18
Test project verifies nothing: Playnite.FullscreenApp.Testssource/Tests/Playnite.FullscreenApp.Tests/Controls/FullscreenTilePanelTests.cs:18
No assertions: GetImportedRomFilesTest · ×2source/Tests/Playnite.Tests/Database/GameDatabaseTests.cs:306
Fixed-sleep synchronisation: ReadFileAsStringSafeTest · ×2source/Tests/Playnite.Tests/FileSystemTests.cs:34

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 2 No assertions (empty test) finding(s) in Test Quality — start with MainViewAPITests.cs, CueSheetTests.cs. — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 Assertions commented out finding(s) in Test Quality — start with FullscreenTilePanelTests.cs. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 Test project verifies nothing finding(s) in Test Quality — start with FullscreenTilePanelTests.cs. — One of this dimension's main actionable groups (1 issue-level).
  4. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 181 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 44 direct `PackageReference`(s), and 139 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.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.8 / 10Stronggated by 4 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: source/Playnite/App/PlayniteApplication.cs (7×31=217); source/Playnite/Diagnostic.cs (3×19=57); source/Playnite/Exceptions.cs (2×17=34) Repeated repair below the complexity floor: source/Playnite.FullscreenApp/FullscreenApplication.cs (3 of 3 changes were fixes)

Hotspot: source/Playnite/App/PlayniteApplication.cs · ×3source/Playnite/App/PlayniteApplication.cs:493
Repeated repair: source/Playnite.FullscreenApp/FullscreenApplication.cssource/Playnite.FullscreenApp/FullscreenApplication.cs:142

What to do

  1. Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with PlayniteApplication.cs, Diagnostic.cs, Exceptions.cs. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with FullscreenApplication.cs. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt8.7 / 10Adequategated by 67 critical findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 8.7 / 10 · rule-coverage 100% · ceiling Prevented

130 deducted debt markers + unmeasured dead symbols across 119486 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.

WriteOnlyPrivateField · ×51source/Playnite.DesktopApp/Controls/Menus/TrayContextMenu.cs:24
EmptyCatchBlock · ×4source/Playnite.DesktopApp/Controls/GridViewPanel.cs:292
FileScopedPragmaDisable · ×4source/PlayniteSDK/Events/ApplicationEvents.cs:10
InvertedNullGuard · ×3source/Playnite/Database/Collections/PlatformsCollection.cs:159
AnalyzerSeverityNone · ×3source/.editorconfig:17

+ 8 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 51 WriteOnlyPrivateField finding(s) in Explicit Debt — start with DesktopAppViewModel_Sidebar.cs (4), EmulatorImportViewModel.cs (3), AddonsViewModel.cs (3). — One of this dimension's main actionable groups (51 issue-level).
  2. Resolve the 4 EmptyCatchBlock finding(s) in Explicit Debt — start with GridViewPanel.cs, GameEditViewModel.cs, Paths.cs. — One of this dimension's main actionable groups (4 issue-level).
  3. Resolve the 4 FileScopedPragmaDisable finding(s) in Explicit Debt — start with ApplicationEvents.cs, IDialogsFactory.cs, IWebView.cs. — One of this dimension's main actionable groups (4 issue-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D18 · Solution Shape3.0 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 3.0 / 10 · rule-coverage 100% · ceiling Documented

22 projects, 763 source files, 127437 hand-written lines of code (119486 production / 7951 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), 24 inter-project edges (build failed). Measured across 6 solutions loaded as one workspace: `source/Playnite.slnx`, `source/Tools/Playnite.Toolbox/Templates/Extensions/CustomLibraryPlugin/CustomLibraryPlugin.slnx`, `source/Tools/Playnite.Toolbox/Templates/Extensions/CustomMetadataPlugin/CustomMetadataPlugin.slnx`, `source/Tools/Playnite.Toolbox/Templates/Extensions/GenericPlugin/GenericPlugin.slnx`, `source/Tools/Playnite.Toolbox/Templates/Themes/Desktop/Theme.sln`, `source/Tools/Playnite.Toolbox/Templates/Themes/Fullscreen/Theme.sln`.

Build failed
Shell project: Playnite.Depssource/Playnite.Deps/Playnite.Deps.csproj

What to do

  1. Resolve the 1 Build failed finding(s) in Solution Shape. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Shell project finding(s) in Solution Shape — start with Playnite.Deps.csproj. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d18_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation QualityAdequate◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Adequate / 10 · rule-coverage 100% · ceiling Documented

The repository's root README gives a strong overview (what Playnite is, its purpose, the Crowdin localization badge, Patreon support link, and an online feature list), plus installation/download guidance, a privacy statement, and links to FAQs, known issues, and the main community channels. It also mentions the SDK as a development resource but does not yet document the architecture or design docs that would otherwise appear in the outline. The source/PlayniteSDK/readme.md README is focused on its own directory (the Playnite SDK package) rather than the repository root, so it is treated separately and cannot be flagged for missing overview/installation.

XML-doc coverage: Playnite.BrowserProcess · ×11source/Playnite.BrowserProcess/Playnite.BrowserProcess.csproj

What to do

  1. Improve Documentation Quality — currently 6.0/10. — The repository's root README gives a strong overview (what Playnite is, its purpose, the Crowdin localization badge, Patreon support link, and an online feature list), plus installation/download guidance, a privacy statement, and links to FAQs, known issues, and the main community channels. It also mentions the SDK as a development resource but does not yet document the architecture or design docs that would otherwise appear in the outline. The source/PlayniteSDK/readme.md README is focused on its own directory (the Playnite SDK package) rather than the repository root, so it is treated separately and cannot be flagged for missing overview/installation.

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

2 naming inconsistencies across 200 sampled symbols.

Typo in property name 'CustomSearchKeywrods' (missing 'r'). While this is a single instance, it stands out as a spelling error in a codebase that otherwise uses consistent naming conventions for localization keys (LOC.*) and settings. It is likely intended to be 'CustomSearchKeywords'.
Inconsistent pluralization in property names. 'Genres' is correctly pluralized as a collection, whereas 'Serie' is singular but appears to represent a collection or a specific entity name that is grammatically incorrect for a series (should be 'Series'). If 'Serie' is intended to be a single value, it is still a non-standard English word for the concept (Series). Given 'Genres' is plural, if 'Serie' is also a collection, it should be 'Series'. If it is a single item, the name 'Serie' is a misspelling of 'Series' or a non-standard term.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.

D24 · Comment ValueExemplary◐ Sampled · advisory

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Judged by language model at low temperature (0.0-0.1) on deterministically sampled inline comments with surrounding code; findings verified back to sampled comments by substring match. Advisory, sampled.

Maturity: Documented → Verified → Prevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

60 valuable / 1 redundant across 200 sampled comments; 1 shown with locations.

redundant commentsource/PlayniteSDK/WebViewModels.cs:16

✓ On the Gold path — maintain.

Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion7.3 / 10Strong✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

Maturity: Documented → Verified → Prevented · effective 7.3 / 10 · rule-coverage 100% · ceiling Documented

3 of 22 projects flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D27 · Navigability8.5 / 10Strong✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

Maturity: Documented → Verified → Prevented · effective 8.5 / 10 · rule-coverage 100% · ceiling Documented

74 % of calls cross a namespace and 6 % go through an interface, but 94 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: large — vertical-slice locality expected.

Pass-through layer · ×2source/Playnite/API/PlayniteAPI.cs:143

What to do

  1. Resolve the 2 Pass-through layer finding(s) in Navigability — start with PlayniteAPI.cs, GlobalRandom.cs. — One of this dimension's main actionable groups (2 recommendation-level).

Detailed fixes: d27_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 1 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

  1. Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. 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.

D29 · Static Analysis (SAST)6.0 / 10Adequate✓ Tool-verified

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).

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

10 finding(s): 0 critical, 0 high, 10 medium, 0 low. semgrep hit a parse error in 2 file(s) — `source/Playnite/Emulation/Platforms.yaml`, `source/Tests/Playnite.Tests/Resources/Serialization/invalid.json` — so no absence of findings in them is evidence of anything, and nothing in them was analysed. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable dependencies in the 1 ecosystem(s) that were scanned (nuget packages.config). Partial dependency scan: 1 of 2 declared ecosystem(s) were scanned (nuget packages.config), and the findings above are real and complete for them. nuget was not scanned (nuget: nuget.playnite.link could not be reached (NU1301: Unable to load the service index for source https://nuget.playnite.link/v3/index.json. The proxy tunnel request to proxy 'http://egress:3128/' failed with status code '403'.)), so this is not the whole dependency surface and the result is reported at reduced confidence.

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D34 · Knowledge Freshness9.9 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

3 of 302 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is source/Playnite/SortableNameConverter.cs. Counted over 302 of the 603 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×3source/Playnite/SortableNameConverter.cs:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling10.0 / 10Stronggated by 1 serious finding✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: ExtensionFactory.cs↔PowerShellScript.cs 67%

Change coupling: ExtensionFactory.cs ↔ PowerShellScript.cssource/Playnite/Plugins/ExtensionFactory.cs:1

What to do

  1. Resolve the 1 Change coupling finding(s) in Change Coupling — start with ExtensionFactory.cs. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing3.3 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 3.3 / 10 · rule-coverage 100% · ceiling Documented

1/3 supply-chain integrity signals present (provenance, signing, SBOM).

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 20 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition9.8 / 10Exemplary✓ Tool-verified

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.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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 Playnite ↔ Playnite.API ↔ Playnite.Common ↔ Playnite.Common.Web ↔ Playnite.Controllers ↔ Playnite.Controls ↔ Playnite.Database ↔ Playnite.Input ↔ Playnite.Metadata ↔ Playnite.Plugins ↔ Playnite.SDK ↔ Playnite.SDK.Events ↔ Playnite.SDK.Models ↔ Playnite.SDK.Plugins ↔ Playnite.Scripting ↔ Playnite.Scripting.PowerShell ↔ Playnite.Services ↔ Playnite.ViewModels ↔ Playnite.WebView ↔ Playnite.Windows ↔ System ↔ System.Drawing.Imaging depend on each other. The lightest dependency in the cycle is Playnite → Playnite.Common.Web (Playnite.Updater → Playnite.Common.Web.IDownloader, 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. — source/Playnite/App/Updater.cs:14
  • The namespaces Playnite.DesktopApp ↔ Playnite.DesktopApp.Controls ↔ Playnite.DesktopApp.Controls.Views ↔ Playnite.DesktopApp.ViewModels depend on each other. The lightest dependency in the cycle is Playnite.DesktopApp → Playnite.DesktopApp.ViewModels (Playnite.DesktopApp.DesktopApplication → Playnite.DesktopApp.ViewModels.DesktopAppViewModel, 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. — source/Playnite.DesktopApp/DesktopApplication.cs:10
  • The namespaces Playnite.FullscreenApp ↔ Playnite.FullscreenApp.Controls.SettingsSections ↔ Playnite.FullscreenApp.ViewModels depend on each other. The lightest dependency in the cycle is Playnite.FullscreenApp → Playnite.FullscreenApp.ViewModels (Playnite.FullscreenApp.FullscreenApplication → Playnite.FullscreenApp.ViewModels.FullscreenAppViewModel, 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. — source/Playnite.FullscreenApp/FullscreenApplication.cs:8

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.
AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

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.

AX6 · Interface segregation9.1 / 10Exemplary✓ Tool-verified

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.

  • `IGameDatabaseMain` declares 50 members: `UsedPlatforms`, `UsedGenres`, `UsedDevelopers`, `UsedPublishers`, `UsedTags`, `UsedCategories`, `UsedSeries`, `UsedAgeRatings`, `UsedRegions`, `UsedSources`, `UsedFeastures`, `UsedCompletionStatuses`, `SoftwareApps`, `DatabaseFileChanged`, `PlatformsInUseUpdated`, `GenresInUseUpdated`, `DevelopersInUseUpdated`, `PublishersInUseUpdated`, `TagsInUseUpdated`, `CategoriesInUseUpdated`, `AgeRatingsInUseUpdated`, `SeriesInUseUpdated`, `RegionsInUseUpdated`, `SourcesInUseUpdated`, `FeaturesInUseUpdated`, `CompletionStatusesInUseUpdated`, `SetDatabasePath`, `OpenDatabase`, `GetFileStoragePath`, `GetFullFilePath`, `AddFile`, `AddFile`, `RemoveFile`, `GetFileAsImage`, `CopyFile`, `BeginBufferUpdate`, `EndBufferUpdate`, `BufferedUpdate`, `ImportGames`, `GetCompletionStatusSettings`, and 10 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 50 declarations carry 49 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 49 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. — source/Playnite/Database/GameDatabase.cs:26
  • `IGameDatabase` declares 24 members: `Games`, `Platforms`, `Emulators`, `Genres`, `Companies`, `Tags`, `Categories`, `Series`, `AgeRatings`, `Regions`, `Sources`, `Features`, `GameScanners`, `CompletionStatuses`, `ImportExclusions`, `FilterPresets`, `IsOpen`, `DatabaseOpened`, `ImportGame`, `ImportGame`, `GetGameMatchesFilter`, `GetFilteredGames`, `GetGameMatchesFilter`, `GetFilteredGames`. 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 24 declarations carry 21 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 21 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. — source/PlayniteSDK/Database/IGameDatabase.cs:93
  • `IItemCollection<TItem>` declares 20 members under just 11 distinct name(s): `this[]`, `Get`, `Get`, `Add`, `Add`, `Add`, `Add`, `Add`, `Add`, `Add`, `Remove`, `Remove`, `Update`, `Update`, `BufferedUpdate`, `BeginBufferUpdate`, `EndBufferUpdate`, `GetClone`, `ItemCollectionChanged`, `ItemUpdated`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 20 separate responsibilities: a caller binds to 11 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 20 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — source/PlayniteSDK/Database/IItemCollection.cs:134
  • `IDialogsFactory` declares 30 members under just 15 distinct name(s): `ShowErrorMessage`, `ShowErrorMessage`, `ShowMessage`, `ShowMessage`, `ShowMessage`, `ShowMessage`, `ShowMessage`, `SelectFolder`, `SelectFolder`, `SelectFile`, `SelectFile`, `SelectFiles`, `SelectFiles`, `SelectIconFile`, `SelectIconFile`, `SelectImagefile`, `SelectImagefile`, `SaveFile`, `SaveFile`, `SaveFile`, `SaveFile`, `SelectString`, `SelectString`, `ShowSelectableString`, `ChooseImageFile`, `ChooseItemWithSearch`, `ActivateGlobalProgress`, `ActivateGlobalProgress`, `CreateWindow`, `GetCurrentAppWindow`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 30 separate responsibilities: a caller binds to 15 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 30 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — source/PlayniteSDK/IDialogsFactory.cs:360
  • `IMainViewAPI` declares 23 members: `ActiveDesktopView`, `ActiveFullscreenView`, `SortOrder`, `SortOrderDirection`, `Grouping`, `UIDispatcher`, `SelectedGames`, `FilteredGames`, `OpenPluginSettings`, `SwitchToLibraryView`, `SelectGame`, `SelectGames`, `ApplyFilterPreset`, `ApplyFilterPreset`, `GetActiveFilterPreset`, `GetCurrentFilterSettings`, `OpenSearch`, `OpenSearch`, `OpenEditDialog`, `OpenEditDialog`, `GetSortedFilterPresets`, `GetSortedFilterFullscreenPresets`, `ToggleFullscreenView`. 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 23 declarations carry 20 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 20 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. — source/PlayniteSDK/IMainViewAPI.cs:50
  • `IPlayniteAPI` declares 23 members: `MainView`, `Database`, `Dialogs`, `Paths`, `Notifications`, `ApplicationInfo`, `WebViews`, `Resources`, `UriHandler`, `ApplicationSettings`, `Addons`, `Emulation`, `ExpandGameVariables`, `ExpandGameVariables`, `ExpandGameVariables`, `StartGame`, `InstallGame`, `UninstallGame`, `AddCustomElementSupport`, `AddSettingsSupport`, `AddConvertersSupport`, `GetConnectedControllers`, `GetConnectedControllers2`. 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 23 declarations carry 21 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 21 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. — source/PlayniteSDK/IPlayniteAPI.cs:15
  • `IPlayniteSettingsAPI` declares 28 members: `Version`, `GridItemWidthRatio`, `GridItemHeightRatio`, `FirstTimeWizardComplete`, `DisableHwAcceleration`, `AsyncImageLoading`, `DownloadMetadataOnImport`, `StartInFullscreen`, `DatabasePath`, `MinimizeToTray`, `CloseToTray`, `EnableTray`, `Language`, `UpdateLibStartup`, `DesktopTheme`, `FullscreenTheme`, `StartMinimized`, `StartOnBoot`, `ForcePlayTimeSync`, `PlaytimeImportMode`, `FontFamilyName`, `DiscordPresenceEnabled`, `AgeRatingOrgPriority`, `SidebarVisible`, `SidebarPosition`, `Fullscreen`, `CompletionStatus`, `GetGameExcludedFromImport`. 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. — source/PlayniteSDK/IPlayniteSettingsAPI.cs:79
  • `IWebView` declares 20 members: `CanExecuteJavascriptInMainFrame`, `Open`, `OpenDialog`, `NavigateAndWait`, `Navigate`, `GetPageText`, `GetPageTextAsync`, `GetPageSource`, `GetPageSourceAsync`, `GetCurrentAddress`, `DeleteDomainCookies`, `DeleteDomainCookiesRegex`, `DeleteCookies`, `GetCookies`, `SetCookies`, `SetCookies`, `Close`, `LoadingChanged`, `EvaluateScriptAsync`, `WindowHost`. 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 20 declarations carry 19 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 19 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. — source/PlayniteSDK/IWebView.cs:125
  • `IDataSerializer` declares 27 members: `ToYaml`, `FromYaml`, `TryFromYaml`, `TryFromYaml`, `FromYamlFile`, `TryFromYamlFile`, `TryFromYamlFile`, `ToJson`, `ToJsonStream`, `FromJson`, `TryFromJson`, `TryFromJson`, `FromJsonStream`, `TryFromJsonStream`, `TryFromJsonStream`, `FromJsonFile`, `TryFromJsonFile`, `TryFromJsonFile`, `FromToml`, `TryFromToml`, `TryFromToml`, `FromTomlFile`, `TryFromTomlFile`, `TryFromTomlFile`, `GetClone`, `GetClone`, `AreObjectsEqual`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 27 declarations carry 19 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 19 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. — source/PlayniteSDK/Data/DataSerialization.cs:40

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
  • Where the width is an overload set rather than separate responsibilities, collapse the overloads instead — segregating those relieves no caller.
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.

C2 · Access Controls0.0 / 10Critical✓ Tool-verified

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

  • Service contract 'IPipeService' is hosted over NetNamedPipeBinding by a ServiceHost this repository opens itself — every operation on it is reachable by any caller that can connect. (source/Playnite/PipeServer.cs:93) Nothing in the source decides WHO may invoke those operations — no [PrincipalPermission], no ServiceAuthorizationManager, and no guard method that refuses the caller. A local IPC transport is not an access control: it authenticates the connection, it does not authorize the command.

What to do

  • Authorize the service host, don't just host it: derive a ServiceAuthorizationManager and set it as the host's authorization policy (or decorate each [OperationContract] with [PrincipalPermission], or call an explicit guard on OperationContext.Current.ServiceSecurityContext at the top of every operation) so the caller's identity has to satisfy a named rule before the operation runs.
GD1 · Unfinished & placeholder code9.9 / 10Exemplary✓ Tool-verified

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. (×40) — source/Playnite.FullscreenApp/FullscreenDialogs.cs:175, source/Playnite.FullscreenApp/FullscreenDialogs.cs:180, source/Playnite/API/DesignData/DesignNotificationsAPI.cs:37, …

What to do

  • Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
IC1 · Incompleteness & stubs5.0 / 10Weak✓ Tool-verified

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.

  • `SliderWithPopup.xaml` wires an event to `Slider_MouseMove`, whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — source/Playnite.DesktopApp/Controls/SliderWithPopup.xaml.cs:42
  • `SliderWithPopup.xaml` wires an event to `Slider_MouseLeave`, whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — source/Playnite.DesktopApp/Controls/SliderWithPopup.xaml.cs:58
  • `ChooseImageFile` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite.FullscreenApp/FullscreenDialogs.cs:175
  • `ChooseItemWithSearch` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite.FullscreenApp/FullscreenDialogs.cs:180
  • `Add` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. (×2) — source/Playnite/API/DesignData/DesignNotificationsAPI.cs:37, source/Playnite/API/DesignData/DesignNotificationsAPI.cs:42
  • `Remove` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignNotificationsAPI.cs:47
  • `DesignPlayniteAPI` has 24 unfinished members out of 25 declared members (methods, properties, indexers and events, whether or not each carries a body) — a scaffolded type that was never implemented. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:13
  • `MainView` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:15
  • `Database` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:17
  • `Dialogs` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:19
  • `Paths` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:21
  • `ApplicationInfo` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:25
  • `WebViews` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:27
  • `Resources` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:29
  • `UriHandler` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:31
  • `ApplicationSettings` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:33
  • `Addons` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:35
  • `Emulation` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:37
  • `AddCustomElementSupport` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:39
  • `CreateLogger` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. (×2) — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:44, source/Playnite/API/DesignData/DesignPlayniteAPI.cs:49
  • `ExpandGameVariables` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. (×3) — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:54, source/Playnite/API/DesignData/DesignPlayniteAPI.cs:59, source/Playnite/API/DesignData/DesignPlayniteAPI.cs:99
  • `StartGame` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:64
  • `InstallGame` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:69
  • `UninstallGame` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:74
  • `AddSettingsSupport` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:79
  • `AddConvertersSupport` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:84
  • `GetConnectedControllers` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:89
  • `GetConnectedControllers2` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/API/DesignData/DesignPlayniteAPI.cs:94
  • Control only reaches here when `cancelToken.IsCancellationRequested` is false, because the guard on line 39 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test. (×3) — source/Playnite/Archive.cs:46, source/Playnite/Archive.cs:54, source/Playnite/Archive.cs:61
  • Control only reaches here when `cancelToken.IsCancellationRequested` is false, because the guard on line 54 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test. — source/Playnite/Archive.cs:61
  • `SoftwareApps` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/Database/InMemoryGameDatabase.cs:42
  • `UsedPlatforms` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/Database/InMemoryGameDatabase.cs:44
  • `UsedGenres` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/Database/InMemoryGameDatabase.cs:46
  • `UsedDevelopers` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — source/Playnite/Database/InMemoryGameDatabase.cs:48

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.
M1 · Documentation (README)6.1 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 21 of 22 project(s) that lack one — worth up to 1.9 pts.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

  • Only 12/22 projects share a common root namespace — the code's module identity is inconsistent.

What to do

  • Adopt a consistent root-namespace convention (a shared prefix, e.g. Acme.*); short project-file/directory names are fine as long as the RootNamespace is uniform.
M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates7.0 / 10Strong✓ Tool-verified

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.

  • A CI pipeline exists but no test-runner invocation (your stack's test command, or a test job) was found — changes may merge without the suite running.

What to do

  • Run the test suite in CI via an explicit runner step for your stack, and gate merges on it.
P10 · Library API & versioning6.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

  • 227/227 types (100%) are public. For a library, every public type is a stability contract — make internal-by-default and expose only the intended API.

What to do

  • Make types internal by default; expose only the deliberate public API so internals can change without breaking consumers.
P2 · Observability7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

What to do

  • Consider OpenTelemetry tracing/metrics and a health-check endpoint for operability.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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.

  • No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 775 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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.
P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

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 HttpClient()` 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. — source/Playnite/Common/Web/HttpDownloader.cs:17

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.
PF1 · Benchmark discipline6.0 / 10Adequate✓ Tool-verified

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.

  • No benchmark suite was found by the two searches this check runs. FIRST, a BenchmarkDotNet package reference in any project file — every project the workspace loaded, plus a walk of project files on disk that never loaded, because a benchmark suite is exactly the project a partial load drops. SECOND, a script harness: a file whose name contains `benchmark` and ends `.py`, `.sh`, `.ps1`, `.bash`, `.rb`, `.js` or `.mjs`, credited ONLY when this repository's CI text also mentions benchmarks — a harness no pipeline runs is read as a fixture, deliberately. Neither search can see a benchmark suite in another ecosystem's idiom (a Go `testing.B` file, a JMH or criterion project, a pytest-benchmark run), so this is 'no benchmark found by those two searches', not a verdict that the repository has none. Where code is performance-sensitive, a benchmark guards against silent regressions — but it's a bonus here, not a deduction.

What to do

  • Add a benchmarking harness for the hot paths and run it in CI to catch regressions (for .NET, a BenchmarkDotNet project with [MemoryDiagnoser] to track allocations).
PF2 · Allocation hygiene6.1 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

What to do

  • Raise allocation-aware density on the hot paths — currently 35 use(s) across 119,764 production line(s) (~0.3/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • 22 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). (×12) — REDACTED:271, source/Playnite/Common/Web/Downloader.cs:97, source/Playnite/Common/Web/HttpDownloader.cs:86, …
  • `.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). (×10) — source/Playnite/Common/Extensions/BitmapExtensions.cs:338, source/Playnite/Common/FileSystem.cs:188, source/Playnite/Common/FileSystem.cs:209, …

What to do

  • Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
S1 · Cryptographic Hygiene4.0 / 10Weak✓ Tool-verified

Other · Security — Cryptographic hygiene (weak hash/cipher, password key-derivation). This codebase has no web surface, so transport/header/cookie/CSRF controls are N/A and only crypto is scored. Outbound TLS (certificate validation, protocol version) is scored wherever it appears — a client verifies its peer whether or not it serves anything itself.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • `SecurityProtocol` explicitly selects `SecurityProtocolType.Tls11`, a protocol version that is broken (SSL 2.0/3.0) or withdrawn (TLS 1.0/1.1, RFC 8996). Offering an obsolete version does not merely permit it — it is what a downgrade attack negotiates, so the weakest version on the list is the one that decides the connection's strength. Stop pinning versions here: leave the protocol unset (`SecurityProtocolType.SystemDefault`, or simply do not assign it) so the connection uses the OS policy and picks up TLS 1.3 and future versions without a code change. Where a version must be named explicitly, name `Tls12` and `Tls13` only. — source/Playnite/App/PlayniteApplication.cs:107
  • MD5/SHA1 is constructed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses. (×3) — source/Playnite/Common/Extensions/StringExtensions.cs:47, source/Playnite/Common/FileSystem_Checksum.cs:39, source/PlayniteSDK/Models/ImportExclusionList.cs:70
  • A digest from `GetMD5` (MD5/SHA1) is compared against an expected value here, and a mismatch rejects the input — so a collision-broken hash IS the integrity check. — source/Playnite/App/Updater.cs:128

What to do

  • Drop SSL 2.0/3.0 and TLS 1.0/1.1 from the enabled protocol list — prefer leaving it to the OS default (`SystemDefault`) so new versions are picked up automatically, or name `Tls12`/`Tls13` explicitly if it must be pinned.
  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (`System.IO.Hashing.XxHash64`/`Crc32`) where it only derives an identifier such as a cache key or a mutex name. This repository constructs a collision-broken hash (MD5/SHA1) at 3 sites, not one: `source/Playnite/Common/Extensions/StringExtensions.cs:47` (MD5), `source/Playnite/Common/FileSystem_Checksum.cs:39` (MD5), `source/PlayniteSDK/Models/ImportExclusionList.cs:70` (MD5). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Verify integrity with SHA-256+ rather than MD5/SHA1: a collision-broken digest cannot establish that content matches what was expected, since an attacker able to influence the content can produce a colliding replacement. Where the content is downloaded or otherwise attacker-reachable, prefer an authenticated check — a signature over the digest, or the publisher's SHA-256 fetched over a channel the content itself does not come from. The gate is at `source/Playnite/App/Updater.cs:128`.
X1 · Async correctness1.1 / 10Critical✓ Tool-verified

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

  • `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. (×16) — source/Playnite.DesktopApp/DesktopApplication.cs:201, source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:627, source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:661, …
  • 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. (×21) — REDACTED:271, source/Playnite/Common/Extensions/BitmapExtensions.cs:338, source/Playnite/Common/FileSystem.cs:188, …
  • `.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). (×3) — source/Playnite/Emulators/Scanner.cs:576, source/Playnite/GoogleImageDownloader.cs:97, source/Playnite/ViewModels/ProgressViewViewModel.cs:185

What to do

  • async void method: OpenMainViewAsync
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader3.5 / 10Weak✓ Tool-verified

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

  • `NumberOfTags` is read from the stream being parsed at line 5225 (`ReadUInt16`), then used to size an array at line 5227 — and nowhere in this method is `NumberOfTags` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). A file the caller did not write therefore chooses the size directly: a value near `int.MaxValue` allocates until the process dies, and a value that overflows the cast to `int` goes negative and throws out of a parser whose failure path was written for malformed input, not for hostile input. Bound `NumberOfTags` against the bytes actually remaining in the stream before spending it. — source/Playnite/Common/TGASharpLib.cs:5227

What to do

  • Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

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.

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.

  • `AreEqual` is public and takes the `XElement` from its caller, and it calls itself at line 64 with a child of the node it was given — and nowhere in `AreEqual` 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 `AreEqual` can intervene. Thread a depth argument through `AreEqual` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack. — source/Playnite/Common/Xml.cs:64

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.
X18 · Disposal-pattern correctness6.1 / 10Adequate✓ Tool-verified

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.

  • `cancelToken` is a `CancellationTokenSource`, which implements `IDisposable`, and it is created here (line 749). Every use of it in `SelectGoogleImage` 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 cancelToken = …;`), which releases it at the end of the scope on every path including a throw. — source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:749
  • `tr` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 44). Every use of it in `ReadFileFromResource` 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 tr = …;`), which releases it at the end of the scope on every path including a throw. — source/Playnite/Common/Resources.cs:44
  • `Br` is a `BinaryReader`, which implements `IDisposable`, and it is created here (line 5148). Every use of it in `LoadFunc` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var Br = …;`), which releases it at the end of the scope on every path including a throw. — source/Playnite/Common/TGASharpLib.cs:5148
  • `Bw` is a `BinaryWriter`, which implements `IDisposable`, and it is created here (line 5530). Every use of it in `SaveFunc` 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 Bw = …;`), which releases it at the end of the scope on every path including a throw. — source/Playnite/Common/TGASharpLib.cs:5530
  • `OffscreenWebView` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `browserInitializedEvent` itself (line 17), which makes that instance its own. But `browserInitializedEvent` is named in none of the methods the disposal search covered: `Dispose` (line 96) — 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` (`browserInitializedEvent?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — source/Playnite/WebView/OffscreenWebView.cs:17
  • `OffscreenWebView` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `loadCompleteEvent` itself (line 18), which makes that instance its own. But `loadCompleteEvent` is named in none of the methods the disposal search covered: `Dispose` (line 96) — 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` (`loadCompleteEvent?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — source/Playnite/WebView/OffscreenWebView.cs:18
  • `WebView` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `loadCompleteEvent` itself (line 20), which makes that instance its own. But `loadCompleteEvent` is named in none of the methods the disposal search covered: `Dispose` (line 90) — 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` (`loadCompleteEvent?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — source/Playnite/WebView/WebView.cs:20
  • `dialog` is a `FolderBrowserDialog`, which implements `IDisposable`, and it is created here (line 144). Every use of it in `Browse` 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 dialog = …;`), which releases it at the end of the scope on every path including a throw. — source/Tools/PlayniteInstaller/MainViewModel.cs:144

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.
X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

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.

X2 · Cancellation propagation4.7 / 10Weak✓ Tool-verified

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 4/37 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. (×23) — source/Playnite.DesktopApp/DesktopApplication.cs:201, source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:601, source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:627, …
  • 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. (×10) — source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:505, source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:661, source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:689, …

What to do

  • Thread a CancellationToken through async methods so work stops promptly on cancellation.
X20 · Mistyped argument guard4.9 / 10Weak✓ Tool-verified

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

  • The guard on line 311 rejects `itemName` and line 311 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(itemName)` is true of a value that is NOT null: it is satisfied by an EMPTY `itemName`, and on that path `itemName` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. — source/Playnite/Database/Collections/ItemCollection.cs:311
  • The guard on line 676 rejects `databasePath` and line 678 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(databasePath)` is true of a value that is NOT null: it is satisfied by an EMPTY `databasePath`, and on that path `databasePath` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. — source/Playnite/Database/GameDatabaseMigration.cs:678
  • The guard on line 132 rejects `loggerName` and line 134 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(loggerName)` is true of a value that is NOT null: it is satisfied by an EMPTY `loggerName`, and on that path `loggerName` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. — source/PlayniteSDK/LogManager.cs:134
  • The guard on line 168 rejects `name` and line 170 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrWhiteSpace(name)` is true of a value that is NOT null: it is satisfied by an EMPTY `name`, and on that path `name` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. — source/PlayniteSDK/Models/GameMetadata.cs:170
  • The guard on line 225 rejects `specId` and line 227 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrWhiteSpace(specId)` is true of a value that is NOT null: it is satisfied by an EMPTY `specId`, and on that path `specId` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. — source/PlayniteSDK/Models/GameMetadata.cs:227
  • The guard on line 249 rejects `stringDate` and line 251 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(stringDate)` is true of a value that is NOT null: it is satisfied by an EMPTY `stringDate`, and on that path `stringDate` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. — source/PlayniteSDK/Models/ReleaseDate.cs:251

What to do

  • Each finding names the throw and the test in its own condition that is true of a NON-null value. Confirm from the two, then throw the exception that describes what was actually wrong: `ArgumentException` for a value that arrived empty, or the .NET 8 helpers that spell the whole guard in one line and pick the type for you — `ArgumentException.ThrowIfNullOrEmpty(s)` / `ThrowIfNullOrWhiteSpace(s)` for strings, `ArgumentNullException.ThrowIfNull(x)` followed by `ArgumentOutOfRangeException.ThrowIfZero(x.Count)` for a collection. Splitting the two conditions is usually clearer than picking one exception for both: they are different failures and the caller may want to handle them differently.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

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.

X24 · Document value interpolated into markup unescaped2.0 / 10Critical✓ Tool-verified

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

  • `HtmlText.Substring(0, loadPartLength)` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — source/Playnite/Controls/HtmlTextView.cs:288
  • `HtmlText ?? string.Empty` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — source/Playnite/Controls/HtmlTextView.cs:293
  • `HtmlText` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — source/Playnite/Controls/HtmlTextView.cs:353
  • `HtmlText.Substring(0, currentLoadedLength)` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — source/Playnite/Controls/HtmlTextView.cs:357

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

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.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

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.

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.

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.

X3 · Exception handling7.4 / 10Strong✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×4) — source/Playnite.DesktopApp/Controls/GridViewPanel.cs:292, source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:546, source/Playnite/Common/Paths.cs:134, …
  • `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. — REDACTED:321
  • `ContinueWith` with a continuation that does nothing discards the antecedent's failure — the task it returns completes successfully whether or not the work faulted, so the failure vanishes with no log and no rethrow. Await the task and handle the exception, or report the fault from the continuation (`t.Exception`). (×3) — source/Playnite/Controllers/GenericGameController.cs:693, source/Playnite/Controllers/GenericGameController.cs:727, source/Playnite/Controllers/GenericGameController.cs:762

What to do

  • Swallowed exception (empty catch)
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.

X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.

Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.

X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

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.

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.

LensScoreRatingImpact
Code Health47%Weak — gated by D18, X1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture95%ExemplaryStrongest area.
Maturity48%Weak — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness39%Weak — gated by P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security32%Weak — gated by D36, C2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60%AdequateAcceptable, with room to improve.
Unscored — 4 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X10 Duplicated predicate — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 3 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 — 41 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 — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC7 A11y enforcement — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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.
  • 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.
  • D11 Test Reliability — Test reliability not measured — no test run produced results
  • D12 Dependency Hygiene — Dependency hygiene not measured — nuget.playnite.link could not be reached
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • 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
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — IL not measured — the analyzer's build of the target did not succeed
  • 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: `--collect:"XPlat Code Coverage"` names a data collector that ships in the `coverlet.collector` package, and this repository wires up none — no test project references it and no runsettings declares one. The absence of coverage here is therefore not evidence about the suite or about our analyzer environment: without a collector, `--collect` produces nothing even from a suite that builds and passes. Add a `coverlet.collector` PackageReference 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.
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • 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
  • 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
  • X5 Nullable reference types — no NRT-eligible projects
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 76 finding(s)
D17 · Explicit Debt · WriteOnlyPrivateField · ×51
  • WriteOnlyPrivateField source/Playnite.DesktopApp/Controls/Menus/TrayContextMenu.cs:24 — private ILogger logger — 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 source/Playnite.DesktopApp/ViewModels/ActionSelectionViewModel.cs:17 — private ILogger logger — 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 source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:25 — private ILogger logger — 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 source/Playnite.DesktopApp/ViewModels/EmulatorImportViewModel.cs:27 — private ILogger logger — 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 REDACTED:16 — private ILogger logger — 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 source/Playnite.DesktopApp/ViewModels/ImageSelectionViewModel.cs:68 — private ILogger logger — 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 source/Playnite.DesktopApp/ViewModels/LibraryIntegrationsViewModel.cs:19 — private ILogger logger — 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 source/Playnite.DesktopApp/ViewModels/MetadataDownloadViewModel.cs:17 — private ILogger logger — 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 source/Playnite.DesktopApp/ViewModels/ToolsConfigViewModel.cs:21 — private ILogger logger — 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 source/Playnite.FullscreenApp/ViewModels/AddonsViewModel.cs:16 — private ILogger logger — 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 source/Playnite.FullscreenApp/ViewModels/GameClientsMenuViewModel.cs:17 — private ILogger logger — 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 source/Playnite.FullscreenApp/ViewModels/GameMenuViewModel.cs:53 — private ILogger logger — 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 source/Playnite.FullscreenApp/ViewModels/HelpMenuViewModel.cs:17 — private ILogger logger — 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 source/Playnite.FullscreenApp/ViewModels/MainMenuViewModel.cs:17 — private ILogger logger — 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 source/Playnite.FullscreenApp/ViewModels/NotificationsViewModel.cs:18 — private ILogger logger — 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 source/Playnite.FullscreenApp/ViewModels/SettingsViewModel.cs:17 — private ILogger logger — 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 source/Playnite.FullscreenApp/ViewModels/SoftwareToolsMenuViewModel.cs:18 — private ILogger logger — 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 source/Playnite/Database/DatabaseFilter.cs:17 — private ILogger logger — 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 source/Playnite/Emulators/EmulationDatabase.cs:95 — private ILogger logger — 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 source/Playnite/Scripting/PowerShell/PowerShellScript.cs:18 — private ILogger logger — 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 source/Playnite/ViewModels/ItemSelectionViewModel.cs:13 — private ILogger logger — 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 source/Playnite/ViewModels/ItemSelectionViewModel.cs:71 — private ILogger logger — 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 source/Playnite/ViewModels/ProgressViewViewModel.cs:15 — private ILogger logger — 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 source/Playnite/ViewModels/RandomGameSelectViewModel.cs:23 — private ILogger logger — 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 source/Tools/Playnite.Toolbox/Templates/Extensions/CustomLibraryPlugin/_name_.cs:15 — private ILogger logger — 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.
  • + 26 more in this group — see findings.md.
D17 · Explicit Debt · EmptyCatchBlock · ×4
  • EmptyCatchBlock source/Playnite.DesktopApp/Controls/GridViewPanel.cs:292 — 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 source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:546 — 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 source/Playnite/Common/Paths.cs:134 — 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 source/Playnite/GamesEditor.cs:1589 — 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.
D17 · Explicit Debt · FileScopedPragmaDisable · ×4
  • FileScopedPragmaDisable source/PlayniteSDK/Events/ApplicationEvents.cs:10 — #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 source/PlayniteSDK/IDialogsFactory.cs:10 — #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 source/PlayniteSDK/IWebView.cs:12 — #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 source/PlayniteSDK/WebViewModels.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.
AX3 · Project dependency cycles · Namespace dependency cycle · ×3
  • Namespace dependency cycle source/Playnite/App/Updater.cs:14 — The namespaces Playnite ↔ Playnite.API ↔ Playnite.Common ↔ Playnite.Common.Web ↔ Playnite.Controllers ↔ Playnite.Controls ↔ Playnite.Database ↔ Playnite.Input ↔ Playnite.Metadata ↔ Playnite.Plugins ↔ Playnite.SDK ↔ Playnite.SDK.Events ↔ Playnite.SDK.Models ↔ Playnite.SDK.Plugins ↔ Playnite.Scripting ↔ Playnite.Scripting.PowerShell ↔ Playnite.Services ↔ Playnite.ViewModels ↔ Playnite.WebView ↔ Playnite.Windows ↔ System ↔ System.Drawing.Imaging depend on each other. The lightest dependency in the cycle is Playnite → Playnite.Common.Web (Playnite.Updater → Playnite.Common.Web.IDownloader, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle source/Playnite.DesktopApp/DesktopApplication.cs:10 — The namespaces Playnite.DesktopApp ↔ Playnite.DesktopApp.Controls ↔ Playnite.DesktopApp.Controls.Views ↔ Playnite.DesktopApp.ViewModels depend on each other. The lightest dependency in the cycle is Playnite.DesktopApp → Playnite.DesktopApp.ViewModels (Playnite.DesktopApp.DesktopApplication → Playnite.DesktopApp.ViewModels.DesktopAppViewModel, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
  • Namespace dependency cycle source/Playnite.FullscreenApp/FullscreenApplication.cs:8 — The namespaces Playnite.FullscreenApp ↔ Playnite.FullscreenApp.Controls.SettingsSections ↔ Playnite.FullscreenApp.ViewModels depend on each other. The lightest dependency in the cycle is Playnite.FullscreenApp → Playnite.FullscreenApp.ViewModels (Playnite.FullscreenApp.FullscreenApplication → Playnite.FullscreenApp.ViewModels.FullscreenAppViewModel, 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.
D17 · Explicit Debt · InvertedNullGuard · ×3
  • InvertedNullGuard source/Playnite/Database/Collections/PlatformsCollection.cs:159 — if (plat != null) … else … plat.Id — the guard has already decided this variable is null on the way into this branch, and nothing here gives it another value, so this dereference cannot run without throwing a NullReferenceException. It survives because the branch is the uncommon one: the code is correct on every input where the variable is set, and crashes on exactly the case the branch was written to handle. Decide which the line meant — if it is reporting the absence, it must not read through the missing value (use the other variable that identifies it, or a literal); if it is meant to work on a value, it belongs in the other branch.
  • InvertedNullGuard source/Playnite/Database/Collections/RegionsCollection.cs:86 — if (reg != null) … else … reg.Id — the guard has already decided this variable is null on the way into this branch, and nothing here gives it another value, so this dereference cannot run without throwing a NullReferenceException. It survives because the branch is the uncommon one: the code is correct on every input where the variable is set, and crashes on exactly the case the branch was written to handle. Decide which the line meant — if it is reporting the absence, it must not read through the missing value (use the other variable that identifies it, or a literal); if it is meant to work on a value, it belongs in the other branch.
  • InvertedNullGuard source/Playnite/Metadata/MetadataDownloader.cs:345 — if (game == null) … game.Id — the guard has already decided this variable is null on the way into this branch, and nothing here gives it another value, so this dereference cannot run without throwing a NullReferenceException. It survives because the branch is the uncommon one: the code is correct on every input where the variable is set, and crashes on exactly the case the branch was written to handle. Decide which the line meant — if it is reporting the absence, it must not read through the missing value (use the other variable that identifies it, or a literal); if it is meant to work on a value, it belongs in the other branch.
D17 · Explicit Debt · AnalyzerSeverityNone · ×3
  • AnalyzerSeverityNone source/.editorconfig:17 — IDE0058 — 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 source/.editorconfig:20 — IDE0036 — 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 source/.editorconfig:23 — IDE0025 — 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.
D10 · Test Quality · No assertions (empty test) · ×2
  • No assertions (empty test): ViewSettingsTest source/Tests/Playnite.DesktopApp.Tests/MainViewAPITests.cs:19 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): GetFileEntriesTest source/Tests/Playnite.Tests/CueSheetTests.cs:15 — Test method has an empty body — it asserts nothing and exercises no code.
D17 · Explicit Debt · DeadLoopAccumulator · ×2
  • DeadLoopAccumulator source/Playnite/Controllers/GenericGameController.cs:733 — failCount = 0; … if (failCount >= maxFailCount) — this reset runs at the top of every pass, so the value is back to its starting constant before the test below it is reached: the test is decided the same way on every iteration, and whatever the loop adds to this variable further down is wiped out before anything can read it. The threshold it is guarding can therefore never be crossed, however many times the loop goes round, which is why nothing has ever been seen to trip. Move the reset ABOVE the loop, so the count accumulates across iterations the way the test below assumes; if it really is meant to be per-iteration state, then the test belongs with it and the accumulation does not.
  • DeadLoopAccumulator REDACTED:78 — var romAdded = false; … if (prop.Name == "rom" && !romAdded) — this reset runs at the top of every pass, so the value is back to its starting constant before the test below it is reached: the test is decided the same way on every iteration, and whatever the loop adds to this variable further down is wiped out before anything can read it. The threshold it is guarding can therefore never be crossed, however many times the loop goes round, which is why nothing has ever been seen to trip. Move the reset ABOVE the loop, so the count accumulates across iterations the way the test below assumes; if it really is meant to be per-iteration state, then the test belongs with it and the accumulation does not.
D10 · Test Quality · Assertions commented out · ×1
  • Assertions commented out: LayoutTest source/Tests/Playnite.FullscreenApp.Tests/Controls/FullscreenTilePanelTests.cs:18 — 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 · Test project verifies nothing · ×1
  • Test project verifies nothing: Playnite.FullscreenApp.Tests source/Tests/Playnite.FullscreenApp.Tests/Controls/FullscreenTilePanelTests.cs:18 — No conventional assertion call was detected in 1 of 1 tests in `Playnite.FullscreenApp.Tests` — the project as a whole, not one method. 1 of them has its assertions commented out, so this suite did verify conventionally and was switched off — it is not an approval/verifier harness.
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
S1 · Cryptographic Hygiene · Weak hash is the integrity check · ×1
  • Weak hash is the integrity check source/Playnite/App/Updater.cs:128 — A digest from `GetMD5` (MD5/SHA1) is compared against an expected value here, and a mismatch rejects the input — so a collision-broken hash IS the integrity check.
Serious — 695 finding(s)
GD1 · Unfinished & placeholder code · Unfinished stub · ×40
  • Unfinished stub — throws NotImplementedException source/Playnite.FullscreenApp/FullscreenDialogs.cs:175 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite.FullscreenApp/FullscreenDialogs.cs:180 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignNotificationsAPI.cs:37 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignNotificationsAPI.cs:42 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignNotificationsAPI.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 source/Playnite/API/DesignData/DesignPlayniteAPI.cs:15 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:17 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:19 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:21 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:25 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:27 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:29 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:31 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:33 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:35 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:37 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:39 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:44 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:49 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:54 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:59 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:64 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:69 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:74 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:79 — A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • + 15 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Unfinished stub · ×33
  • Unfinished stub — throws NotImplementedException source/Playnite.FullscreenApp/FullscreenDialogs.cs:175 — `ChooseImageFile` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite.FullscreenApp/FullscreenDialogs.cs:180 — `ChooseItemWithSearch` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignNotificationsAPI.cs:37 — `Add` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignNotificationsAPI.cs:42 — `Add` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignNotificationsAPI.cs:47 — `Remove` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:15 — `MainView` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:17 — `Database` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:19 — `Dialogs` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:21 — `Paths` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:25 — `ApplicationInfo` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:27 — `WebViews` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:29 — `Resources` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:31 — `UriHandler` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:33 — `ApplicationSettings` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:35 — `Addons` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:37 — `Emulation` is a shipped property whose accessors only throw NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:39 — `AddCustomElementSupport` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:44 — `CreateLogger` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:49 — `CreateLogger` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:54 — `ExpandGameVariables` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:59 — `ExpandGameVariables` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:64 — `StartGame` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:69 — `InstallGame` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:74 — `UninstallGame` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws NotImplementedException source/Playnite/API/DesignData/DesignPlayniteAPI.cs:79 — `AddSettingsSupport` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
  • + 8 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×28
  • MethodTooLong: GameEditViewModel.EditingGame_PropertyChanged source/Playnite.DesktopApp/ViewModels/GameEditViewModelFieldChecks.cs:849 — MethodTooLong — EditingGame_PropertyChanged runs 279 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 179 over it, 2.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GameOverview.OnApplyTemplate source/Playnite.DesktopApp/Controls/Views/GameOverview.cs:220 — MethodTooLong — OnApplyTemplate runs 264 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 164 over it, 2.64× 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: DesktopAppViewModel.InitializeCommands source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel_Commands.cs:101 — MethodTooLong — InitializeCommands runs 264 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 164 over it, 2.64× 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: Main.OnApplyTemplate source/Playnite.FullscreenApp/Controls/Views/Main.cs:230 — MethodTooLong — OnApplyTemplate runs 228 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 128 over it, 2.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: FullscreenAppViewModel.InitializeCommands source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel_Commands.cs:45 — MethodTooLong — InitializeCommands runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× 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: GameEditViewModel.ConfirmDialog source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:525 — MethodTooLong — ConfirmDialog runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PlayniteApplication.PlayniteApplication(…) source/Playnite/App/PlayniteApplication.cs:92 — MethodTooLong — PlayniteApplication(…) runs 177 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GameScanner.ScanDirectoryBase source/Playnite/Emulators/Scanner.cs:693 — MethodTooLong — ScanDirectoryBase runs 168 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 68 over it, 1.68× 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: Game.GetDifferences source/PlayniteSDK/Models/Game.cs:2032 — MethodTooLong — GetDifferences runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TopPanel.OnApplyTemplate source/Playnite.DesktopApp/Controls/Views/TopPanel.cs:159 — MethodTooLong — OnApplyTemplate 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: TGA.LoadFunc source/Playnite/Common/TGASharpLib.cs:5298 — MethodTooLong — LoadFunc runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DatabaseExplorer.LoadValues source/Playnite/Database/DatabaseExplorer.cs:723 — MethodTooLong — LoadValues runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MetadataDownloader.DownloadMetadataAsync source/Playnite/Metadata/MetadataDownloader.cs:311 — MethodTooLong — DownloadMetadataAsync runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× 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: Filters.OnApplyTemplate source/Playnite.FullscreenApp/Controls/Views/Filters.cs:49 — MethodTooLong — OnApplyTemplate runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TGA.CheckAndUpdateOffsets source/Playnite/Common/TGASharpLib.cs:4799 — MethodTooLong — CheckAndUpdateOffsets 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: TGA.ToBitmapFunc source/Playnite/Common/TGASharpLib.cs:5681 — MethodTooLong — ToBitmapFunc 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: GamesEditor.PlayGame source/Playnite/GamesEditor.cs:189 — MethodTooLong — PlayGame runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GameScanner.Scan source/Playnite/Emulators/Scanner.cs:185 — MethodTooLong — Scan 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: DatParser.ProcessLibretroDb REDACTED:303 — MethodTooLong — ProcessLibretroDb 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: GameMenu.InitializeItems source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:105 — MethodTooLong — InitializeItems runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MetadataDownloader.ProcessField source/Playnite/Metadata/MetadataDownloader.cs:136 — MethodTooLong — ProcessField runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Game.CopyDiffTo source/PlayniteSDK/Models/Game.cs:1750 — MethodTooLong — CopyDiffTo runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GenericPlayController.Start source/Playnite/Controllers/GenericGameController.cs:481 — MethodTooLong — Start runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GameTools.GetMultiGameEditObject source/Playnite/GameTools.cs:28 — MethodTooLong — GetMultiGameEditObject runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PlayniteApplication.Application_Startup source/Playnite/App/PlayniteApplication.cs:618 — MethodTooLong — Application_Startup 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.
  • + 3 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×23
  • Sync-over-async blocking — 22 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 REDACTED:271 — `.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 source/Playnite/Common/Extensions/BitmapExtensions.cs:338 — `.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 source/Playnite/Common/FileSystem.cs:188 — `.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 source/Playnite/Common/FileSystem.cs:209 — `.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 source/Playnite/Common/FileSystem.cs:230 — `.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 source/Playnite/Common/FileSystem.cs:251 — `.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 source/Playnite/Common/FileSystem.cs:287 — `.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 source/Playnite/Common/FileSystem.cs:313 — `.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 source/Playnite/Common/Web/Downloader.cs:97 — `.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 source/Playnite/Common/Web/Downloader.cs:206 — `.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 source/Playnite/Common/Web/HttpDownloader.cs:86 — `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking source/Playnite/GlobalTaskHandler.cs:35 — `.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 source/Playnite/Services/BaseServicesClient.cs:34 — `.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 source/Playnite/Services/BaseServicesClient.cs:50 — `.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 source/Playnite/Services/BaseServicesClient.cs:51 — `.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 source/Playnite/Services/ServicesClient.cs:45 — `.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 source/Playnite/Services/ServicesClient.cs:46 — `.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 source/Playnite/ViewModels/MainViewModelBase.cs:801 — `.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 source/Playnite/WebView/OffscreenWebView.cs:110 — `.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 source/Playnite/WebView/OffscreenWebView.cs:120 — `.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 source/Playnite/WebView/WebView.cs:114 — `.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 source/Playnite/WebView/WebView.cs:121 — `.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).
X2 · Cancellation propagation · Async method without CancellationToken · ×23
  • Async method without CancellationToken: OpenMainViewAsync source/Playnite.DesktopApp/DesktopApplication.cs:201 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: DownloadMetadata source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:601 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: DownloadMetadata source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:627 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: OpenMainViewAsync source/Playnite.FullscreenApp/FullscreenApplication.cs:173 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CancelLibraryUpdate source/Playnite.FullscreenApp/ViewModels/MainMenuViewModel.cs:232 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: StartUpdateCheckerAsync source/Playnite/App/PlayniteApplication.cs:1452 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: DownloadUpdate source/Playnite/App/Updater.cs:137 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: DownloadFileAsync source/Playnite/Common/Web/Downloader.cs:232 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: LoadNewSource source/Playnite/Controls/FadeImage.xaml.cs:259 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetImages source/Playnite/GoogleImageDownloader.cs:115 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: ProcessStartupLibUpdate source/Playnite/ViewModels/MainViewModelBase.cs:526 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CancelProgress source/Playnite/ViewModels/MainViewModelBase.cs:846 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: PerformSearch source/Playnite/ViewModels/SearchViewModel.cs:717 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: InstallUpdate source/Playnite/ViewModels/UpdateViewModel.cs:99 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: Browser_BrowserInitialized source/Playnite/WebView/OffscreenWebView.cs:79 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetPageTextAsync source/Playnite/WebView/OffscreenWebView.cs:113 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetPageSourceAsync source/Playnite/WebView/OffscreenWebView.cs:123 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: EvaluateScriptAsync source/Playnite/WebView/OffscreenWebView.cs:149 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: Browser_IsBrowserInitializedChanged source/Playnite/WebView/WebView.cs:54 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetPageTextAsync source/Playnite/WebView/WebView.cs:106 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetPageSourceAsync source/Playnite/WebView/WebView.cs:125 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: EvaluateScriptAsync source/Playnite/WebView/WebView.cs:151 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: Install source/Tools/PlayniteInstaller/MainViewModel.cs:156 — No CancellationToken parameter — this work can't be stopped early once started.
D17 · Explicit Debt · TodoComment · ×22
  • TodoComment source/Playnite.DesktopApp/DesktopApplication.cs:245 — // TODO test db path recovery — 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 source/Playnite.DesktopApp/ViewModels/EmulatorsViewModel.cs:625 — // TODO rewrite to something more sane — 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 source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:544 — // TODO: Implement custom handling for default commands and solve this somehow globally. — 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 source/Playnite.FullscreenApp/Controls/FullscreenTilePanel.cs:219 — // TODO: fix the desync. — 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 source/Playnite.FullscreenApp/Controls/Views/GameDetails.cs:81 — // TODO handle properly in future via TODO from SelectedGame property
  • TodoComment source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel.cs:162 — // TODO completely rework and decouple selected game from main view and game details — 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 source/Playnite/App/PlayniteApplication.cs:102 — // TODO: remove after switch to .NET 5 — 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 source/Playnite/Common/Extensions/BitmapExtensions.cs:260 — // TODO: Modify scaling to scale by both axies. — 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 source/Playnite/Common/Extensions/CloneObject.cs:175 — // TODO Add support for lists — 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 source/Playnite/Common/FileSystem.cs:369 — // TODO Rework with proper symlinks handling with FileSystemInfo.ResolveLinkTarget — 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 source/Playnite/Database/DatabaseExplorer.cs:73 — // TODO: Rewrite this mess. — 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 source/Playnite/Database/GameDatabase.cs:466 — // TODO: Remove this, we should only allow path to be set during instantiation. — 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 source/Playnite/DateTimes.cs:100 — // TODO: handle properly — 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 source/Playnite/Extensions/GameExtensions.cs:195 — // TODO rework this whole mess into something better and more maintainable :| — 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 source/Playnite/Plugins/ExtensionFactory.cs:492 — // TODO: Unload assembly once Playnite switches to .NET Core — 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 source/Playnite/SDL2.cs:142 — /* TODO: This #ifdef is only here because the equivalent — 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 source/Playnite/SelectableItem.cs:81 — // TODO: refactor this and merge it with NamedObject and SelectableItem — 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 source/Playnite/SelectableItem.cs:101 — // TODO: refactor this and merge it with NamedObject and SelectableNamedObject — 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 source/Playnite/ViewModels/SearchViewModel.cs:226 — // TODO replace this in future by exposing GamesCollectionViewEntry to SDK and let plugins create them directly. — 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 source/Playnite/ViewModels/SearchViewModel.cs:704 — // TODO definitely could use some improvements for better fuzzy results. — 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 source/Playnite/Windows/WindowPositionHandler.cs:145 — // TODO: this needs complete rework when per display DPI support is enabled in P11. — 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 source/Tests/Playnite.DesktopApp.Tests/ViewModels/DatabaseFieldsManagerViewModelTests.cs:82 — // TODO add file test — 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.
X1 · Async correctness · Sync-over-async (deadlock risk) · ×21
  • Sync-over-async (deadlock risk) REDACTED:271 — 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) source/Playnite/Common/Extensions/BitmapExtensions.cs:338 — 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) source/Playnite/Common/FileSystem.cs:188 — 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) source/Playnite/Common/FileSystem.cs:209 — 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) source/Playnite/Common/FileSystem.cs:230 — 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) source/Playnite/Common/FileSystem.cs:251 — 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) source/Playnite/Common/FileSystem.cs:287 — 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) source/Playnite/Common/FileSystem.cs:313 — 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) source/Playnite/Common/Web/Downloader.cs:97 — 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) source/Playnite/Common/Web/Downloader.cs:206 — 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) source/Playnite/Common/Web/HttpDownloader.cs:86 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) source/Playnite/Services/BaseServicesClient.cs:34 — 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) source/Playnite/Services/BaseServicesClient.cs:50 — 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) source/Playnite/Services/BaseServicesClient.cs:51 — 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) source/Playnite/Services/ServicesClient.cs:45 — 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) source/Playnite/Services/ServicesClient.cs:46 — 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) source/Playnite/ViewModels/MainViewModelBase.cs:795 — 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) source/Playnite/WebView/OffscreenWebView.cs:110 — 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) source/Playnite/WebView/OffscreenWebView.cs:120 — 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) source/Playnite/WebView/WebView.cs:114 — 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) source/Playnite/WebView/WebView.cs:121 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
D3 · God Classes · FileTooLong · ×18
  • FileTooLong: Playnite/SDL2.cs source/Playnite/SDL2.cs — FileTooLong — 5464 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4964 over it, 10.93× 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: Common/TGASharpLib.cs source/Playnite/Common/TGASharpLib.cs — FileTooLong — 2972 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2472 over it, 5.94× 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: Settings/PlayniteSettings.cs source/Playnite/Settings/PlayniteSettings.cs — FileTooLong — 1529 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1029 over it, 3.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Models/Game.cs source/PlayniteSDK/Models/Game.cs — FileTooLong — 1036 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 536 over it, 2.07× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Playnite/GamesEditor.cs source/Playnite/GamesEditor.cs — FileTooLong — 990 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 490 over it, 1.98× 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: App/PlayniteApplication.cs source/Playnite/App/PlayniteApplication.cs — FileTooLong — 958 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 458 over it, 1.92× 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: Emulators/Scanner.cs source/Playnite/Emulators/Scanner.cs — FileTooLong — 884 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 384 over it, 1.77× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: OldModels/Ver2.cs source/Playnite/Database/OldModels/Ver2.cs — FileTooLong — 869 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 369 over it, 1.74× 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: Database/GameDatabase.cs source/Playnite/Database/GameDatabase.cs — FileTooLong — 849 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 349 over it, 1.70× 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: ViewModels/GameEditViewModel.cs source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs — FileTooLong — 827 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 327 over it, 1.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ViewModels/DesktopAppViewModel.cs source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs — FileTooLong — 770 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 270 over it, 1.54× 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: Settings/FilterSettings.cs source/Playnite/Settings/FilterSettings.cs — FileTooLong — 767 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 267 over it, 1.53× 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: ViewModels/GameEditViewModelFieldChecks.cs source/Playnite.DesktopApp/ViewModels/GameEditViewModelFieldChecks.cs — FileTooLong — 725 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 225 over it, 1.45× 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: ViewModels/FullscreenAppViewModel.cs source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel.cs — FileTooLong — 683 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 183 over it, 1.37× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Database/DatabaseExplorer.cs source/Playnite/Database/DatabaseExplorer.cs — FileTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 92 over it, 1.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ViewModels/MainViewModelBase.cs source/Playnite/ViewModels/MainViewModelBase.cs — FileTooLong — 590 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 90 over it, 1.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ViewModels/SearchViewModel.cs source/Playnite/ViewModels/SearchViewModel.cs — FileTooLong — 579 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 79 over it, 1.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Views/GameOverview.cs source/Playnite.DesktopApp/Controls/Views/GameOverview.cs — FileTooLong — 507 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D3 · God Classes · TooManyMethods · ×17
  • TooManyMethods: SDL source/Playnite/SDL2.cs — TooManyMethods — 4764 significant lines (blank, comment-only and punctuation-only lines excluded), 790 methods. The bar is 30 methods; this is 760 over it, 26.33× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: GameEditViewModel source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs — TooManyMethods — 2008 significant lines (blank, comment-only and punctuation-only lines excluded), 92 methods, declared across 3 files: ViewModels/GameEditViewModel.cs (74), ViewModels/GameEditViewModelMetadata.cs (15), ViewModels/GameEditViewModelFieldChecks.cs (3). The bar is 30 methods; this is 62 over it, 3.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DesktopAppViewModel source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs — TooManyMethods — 1123 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods, declared across 4 files: ViewModels/DesktopAppViewModel.cs (63), ViewModels/DesktopAppViewModel_Sidebar.cs (3), ViewModels/DesktopAppViewModel_Commands.cs (1), ViewModels/DesktopAppViewModel_TopPanel.cs (1). The bar is 30 methods; this is 38 over it, 2.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: GameDatabase source/Playnite/Database/GameDatabase.cs — TooManyMethods — 793 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods, declared across 2 files: Database/GameDatabase.cs (57), Database/GameDatabase_Filters.cs (6). The bar is 30 methods; this is 33 over it, 2.10× 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: FullscreenAppViewModel source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel.cs — TooManyMethods — 869 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods, declared across 2 files: ViewModels/FullscreenAppViewModel.cs (48), ViewModels/FullscreenAppViewModel_Commands.cs (1). 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: GamesEditor source/Playnite/GamesEditor.cs — TooManyMethods — 936 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PlayniteApplication source/Playnite/App/PlayniteApplication.cs — TooManyMethods — 926 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FileSystem source/Playnite/Common/FileSystem.cs — TooManyMethods — 284 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods, declared across 2 files: Common/FileSystem.cs (35), Common/FileSystem_Checksum.cs (6). The bar is 30 methods; this is 11 over it, 1.37× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • TooManyMethods: ItemCollection source/Playnite/Database/Collections/ItemCollection.cs — TooManyMethods — 300 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. 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: MainViewModelBase source/Playnite/ViewModels/MainViewModelBase.cs — TooManyMethods — 562 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FullscreenTilePanel source/Playnite.FullscreenApp/Controls/FullscreenTilePanel.cs — TooManyMethods — 404 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Plugin source/PlayniteSDK/Plugins/Plugin.cs — TooManyMethods — 81 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FilterMatcher source/Playnite/Database/GameDatabase_Filters.cs — TooManyMethods — 162 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: TGA source/Playnite/Common/TGASharpLib.cs — TooManyMethods — 814 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 30 methods; this is 3 over it, 1.10× 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: FilterSettings source/Playnite/Settings/FilterSettings.cs — TooManyMethods — 625 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.
  • TooManyMethods: ExtensionFactory source/Playnite/Plugins/ExtensionFactory.cs — TooManyMethods — 422 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.
  • TooManyMethods: InMemoryGameDatabase source/Playnite/Database/InMemoryGameDatabase.cs — TooManyMethods — 105 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.
X1 · Async correctness · async void method · ×16
  • async void method: OpenMainViewAsync source/Playnite.DesktopApp/DesktopApplication.cs:201 — `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: DownloadMetadata source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:627 — `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: ImportWindowsStoreGames source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:661 — `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: ImportInstalledGames source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:689 — `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: ImportEmulatedGames source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:717 — `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: OpenMainViewAsync source/Playnite.FullscreenApp/FullscreenApplication.cs:173 — `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: CancelLibraryUpdate source/Playnite.FullscreenApp/ViewModels/MainMenuViewModel.cs:232 — `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: LoadNewSource source/Playnite/Controls/FadeImage.xaml.cs:259 — `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: StartWatcher source/Playnite/ObservablePowerStatus.cs:75 — `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: StopWatcher source/Playnite/ObservablePowerStatus.cs:101 — `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: StartWatcher source/Playnite/ObservableTime.cs:32 — `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: StopWatcher source/Playnite/ObservableTime.cs:56 — `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: CancelProgress source/Playnite/ViewModels/MainViewModelBase.cs:846 — `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: InstallUpdate source/Playnite/ViewModels/UpdateViewModel.cs:99 — `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: Browser_BrowserInitialized source/Playnite/WebView/OffscreenWebView.cs:79 — `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: Browser_IsBrowserInitializedChanged source/Playnite/WebView/WebView.cs:54 — `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.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×9
  • Duplicated block (18 lines × 2) source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:819 — source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:819-836 | source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:851-868 — both copies are in the same file, so extract the 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 `source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:819` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:403 — source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:403-420 | source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel.cs:982-999 — 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 (18 lines × 2) source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:971 — source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:971-988 | source/Playnite.DesktopApp/ViewModels/ToolsConfigViewModel.cs:239-256 — 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 (18 lines × 2) source/Playnite.DesktopApp/Windows/MessageBoxWindow.xaml.cs:206 — source/Playnite.DesktopApp/Windows/MessageBoxWindow.xaml.cs:206-223 | source/Playnite.FullscreenApp/Windows/TextInputWindow.xaml.cs:151-168 — 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 `source/Playnite.DesktopApp/Windows/MessageBoxWindow.xaml.cs:206` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) source/Playnite.DesktopApp/Windows/MessageBoxWindow.xaml.cs:352 — source/Playnite.DesktopApp/Windows/MessageBoxWindow.xaml.cs:352-369 | source/Playnite.FullscreenApp/Windows/MessageBoxWindow.xaml.cs:245-262 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (18 lines × 2) source/Playnite/Database/Collections/PlatformsCollection.cs:134 — source/Playnite/Database/Collections/PlatformsCollection.cs:134-151 | source/Playnite/Database/Collections/PlatformsCollection.cs:187-204 — both copies are in the same file, so extract the 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 `source/Playnite/Database/Collections/PlatformsCollection.cs:134` 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) source/Playnite/Database/Collections/RegionsCollection.cs:61 — source/Playnite/Database/Collections/RegionsCollection.cs:61-78 | source/Playnite/Database/Collections/RegionsCollection.cs:114-131 — both copies are in the same file, so extract the 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 `source/Playnite/Database/Collections/RegionsCollection.cs:61` 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) source/Playnite/Emulators/Scanner.cs:800 — source/Playnite/Emulators/Scanner.cs:800-817 | source/Playnite/Emulators/Scanner.cs:929-946 — both copies are in the same file, so extract the 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 `source/Playnite/Emulators/Scanner.cs:800` 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) source/Playnite/Common/FileSystem.cs:444 — source/Playnite/Common/FileSystem.cs:444-461 | REDACTED:114-131 — 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 `source/Playnite/Common/FileSystem.cs:444` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×9
  • Duplicated block (11 lines × 2) source/Playnite/Plugins/ExtensionFactory.cs:335 — source/Playnite/Plugins/ExtensionFactory.cs:335-345 | source/Playnite/Plugins/ExtensionFactory.cs:406-416 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) source/Playnite.FullscreenApp/Controls/ItemsControlEx.cs:56 — source/Playnite.FullscreenApp/Controls/ItemsControlEx.cs:56-66 | source/Playnite.FullscreenApp/Controls/ItemsControlEx.cs:105-115 — both copies are in the same file, so extract the 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 `source/Playnite.FullscreenApp/Controls/ItemsControlEx.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 (11 lines × 2) source/Playnite.FullscreenApp/Controls/ItemsControlEx.cs:74 — source/Playnite.FullscreenApp/Controls/ItemsControlEx.cs:74-84 | source/Playnite.FullscreenApp/Controls/ItemsControlEx.cs:123-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite.FullscreenApp/Controls/ItemsControlEx.cs:74` 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) source/Playnite.DesktopApp/ViewModels/AddonsViewModel.cs:398 — source/Playnite.DesktopApp/ViewModels/AddonsViewModel.cs:398-408 | source/Playnite.DesktopApp/ViewModels/LibraryIntegrationsViewModel.cs:134-144 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) source/Playnite/Backup.cs:283 — source/Playnite/Backup.cs:283-293 | source/Playnite/Backup.cs:324-334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite/Backup.cs:283` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) source/Playnite/Controllers/GenericGameController.cs:289 — source/Playnite/Controllers/GenericGameController.cs:289-299 | source/Playnite/Controllers/GenericGameController.cs:305-315 — both copies are in the same file, so extract the 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 `source/Playnite/Controllers/GenericGameController.cs:289` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) source/Playnite/Database/Collections/PlatformsCollection.cs:195 — source/Playnite/Database/Collections/PlatformsCollection.cs:195-205 | source/Playnite/Database/Collections/RegionsCollection.cs:122-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite/Database/Collections/PlatformsCollection.cs:195` 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) source/Playnite.DesktopApp/Controls/GridViewPanel.cs:308 — source/Playnite.DesktopApp/Controls/GridViewPanel.cs:308-318 | source/Playnite.FullscreenApp/Controls/FullscreenTilePanel.cs:437-447 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs:223 — source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs:223-233 | source/Playnite.FullscreenApp/Controls/FilterStringListSelection.cs:208-218 — before extracting anything, compare `source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs` and `source/Playnite.FullscreenApp/Controls/FilterStringListSelection.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×9
  • Duplicated block (13 lines × 2) source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel_Commands.cs:268 — source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel_Commands.cs:268-280 | source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel_Commands.cs:290-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 `source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel_Commands.cs:268` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:102 — source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:102-114 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:238-250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:102` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) source/Playnite/Controllers/GenericGameController.cs:551 — source/Playnite/Controllers/GenericGameController.cs:551-563 | source/Playnite/Controllers/GenericGameController.cs:634-646 — both copies are in the same file, so extract the 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 `source/Playnite/Controllers/GenericGameController.cs:551` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) source/PlayniteSDK/Extensions/ListExtensions.cs:119 — source/PlayniteSDK/Extensions/ListExtensions.cs:119-131 | source/PlayniteSDK/Extensions/ListExtensions.cs:150-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `source/PlayniteSDK/Extensions/ListExtensions.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 (13 lines × 2) source/Playnite.DesktopApp/ViewModels/DesignData/DesignMainViewModel.cs:66 — source/Playnite.DesktopApp/ViewModels/DesignData/DesignMainViewModel.cs:66-78 | source/Playnite.FullscreenApp/ViewModels/DesignData/DesignMainViewModel.cs:74-86 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:1010 — source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:1010-1022 | source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel.cs:1211-1223 — 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 `source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:1010` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) source/Playnite/GamesEditor.cs:1810 — source/Playnite/GamesEditor.cs:1810-1822 | source/Playnite/GamesEditor.cs:1832-1844 — both copies are in the same file, so extract the 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 `source/Playnite/GamesEditor.cs:1810` 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 (13 lines × 2) REDACTED:282 — REDACTED:282-294 | REDACTED:315-327 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:282` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) source/Playnite/Common/SystemDialogs.cs:75 — source/Playnite/Common/SystemDialogs.cs:75-88 | source/Playnite/Common/SystemDialogs.cs:102-114 — both copies are in the same file, so extract the 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 `source/Playnite/Common/SystemDialogs.cs:75` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note 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.
D17 · Explicit Debt · CommentedOutCode · ×8
  • CommentedOutCode source/Playnite.DesktopApp/Controls/SliderWithPopup.xaml.cs:44 — 4 consecutive commented-code lines
  • CommentedOutCode source/Playnite.DesktopApp/Controls/SliderWithPopup.xaml.cs:60 — 4 consecutive commented-code lines
  • CommentedOutCode source/Playnite/Database/Collections/LiteDBFileReaderV7.cs:348 — 4 consecutive commented-code lines
  • CommentedOutCode source/Tests/Playnite.FullscreenApp.Tests/Controls/FullscreenTilePanelTests.cs:30 — 4 consecutive commented-code lines
  • CommentedOutCode source/Tests/TestPlugin/TestPluginSettings.cs:45 — 4 consecutive commented-code lines
  • CommentedOutCode source/Tests/Playnite.Tests/Emulators/EmulationTests.cs:34 — 11 consecutive commented-code lines
  • CommentedOutCode source/Tests/Playnite.Tests/LocalizationTests.cs:22 — 16 consecutive commented-code lines
  • CommentedOutCode source/Tests/TestPlugin/TestPlugin.cs:368 — 7 consecutive commented-code lines
D3 · God Classes · ClassTooLong · ×8
  • ClassTooLong: PlayniteSettings source/Playnite/Settings/PlayniteSettings.cs — ClassTooLong — 1320 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 920 over it, 3.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Game source/PlayniteSDK/Models/Game.cs — ClassTooLong — 941 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 541 over it, 2.35× 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: GameScanner source/Playnite/Emulators/Scanner.cs — ClassTooLong — 650 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 250 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DatabaseExplorer source/Playnite/Database/DatabaseExplorer.cs — ClassTooLong — 509 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 109 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.
  • ClassTooLong: GameOverview source/Playnite.DesktopApp/Controls/Views/GameOverview.cs — ClassTooLong — 484 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 84 over it, 1.21× 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: DatabaseFieldsManagerViewModel source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs — ClassTooLong — 467 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 67 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.
  • ClassTooLong: GenericPlayController source/Playnite/Controllers/GenericGameController.cs — ClassTooLong — 461 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 61 over it, 1.15× 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: AddonsViewModel source/Playnite.DesktopApp/ViewModels/AddonsViewModel.cs — ClassTooLong — 440 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods, declared across 2 files: ViewModels/AddonsViewModel.cs (11), ViewModels/AddonsViewModel_Online.cs (3). The bar is 400 significant lines; this is 40 over it, 1.10× 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 · Duplicated block (14 lines × 2) · ×7
  • Duplicated block (14 lines × 2) source/Playnite.DesktopApp/DesktopApplication.cs:387 — source/Playnite.DesktopApp/DesktopApplication.cs:387-400 | source/Playnite.FullscreenApp/FullscreenApplication.cs:291-304 — 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 `source/Playnite.DesktopApp/DesktopApplication.cs:387` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) source/PlayniteSDK/Models/Emulator.cs:382 — source/PlayniteSDK/Models/Emulator.cs:382-395 | source/PlayniteSDK/Models/Emulator.cs:609-622 — both copies are in the same file, so extract the 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `BuiltInEmulatorProfile` in one and `CustomEmulatorProfile` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 2) source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:662 — source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:662-675 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:177-190 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:662` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:176` calls `Close` and `source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:661` 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 (14 lines × 2) source/Playnite/Controllers/GenericGameController.cs:566 — source/Playnite/Controllers/GenericGameController.cs:566-579 | source/Playnite/Controllers/GenericGameController.cs:600-613 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) source/PlayniteSDK/Extensions/ListExtensions.cs:201 — source/PlayniteSDK/Extensions/ListExtensions.cs:201-214 | source/PlayniteSDK/Extensions/ListExtensions.cs:267-280 — both copies are in the same file, so extract the 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) source/Tools/Playnite.Toolbox/Verify.cs:21 — source/Tools/Playnite.Toolbox/Verify.cs:21-34 | source/Tools/Playnite.Toolbox/Verify.cs:87-100 — both copies are in the same file, so extract the 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) source/Playnite/Input/GameController.cs:462 — source/Playnite/Input/GameController.cs:462-475 | source/Playnite/Input/GameController.cs:499-512 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite/Input/GameController.cs:499` 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×7
  • Duplicated block (8 lines × 2) source/Playnite.DesktopApp/Controls/ComboBoxList.cs:132 — source/Playnite.DesktopApp/Controls/ComboBoxList.cs:132-139 | source/Playnite.DesktopApp/Controls/FilterSelectionBox.cs:38-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. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite.DesktopApp/Controls/ComboBoxList.cs:132` 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) source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:466 — source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:466-473 | source/Playnite/MenuItems.cs:39-46 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `source/Playnite/MenuItems.cs:37` calls `Invoke` and `source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:464` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs:244 — source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs:244-251 | source/Playnite.FullscreenApp/Controls/Views/FiltersAdditional.cs:97-104 — 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 `source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs:244` 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 (8 lines × 2) source/PlayniteSDK/Models/FilterPreset.cs:29 — source/PlayniteSDK/Models/FilterPreset.cs:29-36 | source/PlayniteSDK/Models/FilterPreset.cs:68-75 — both copies are in the same file, so extract the 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) source/Playnite.DesktopApp/DesktopDialogs.cs:29 — source/Playnite.DesktopApp/DesktopDialogs.cs:29-36 | source/Playnite.FullscreenApp/FullscreenDialogs.cs:28-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) source/Playnite.DesktopApp/ViewModels/AddonsViewModel.cs:428 — source/Playnite.DesktopApp/ViewModels/AddonsViewModel.cs:428-435 | source/Playnite.DesktopApp/ViewModels/LibraryIntegrationsViewModel.cs:112-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) source/Playnite/WebView/OffscreenWebView.cs:70 — source/Playnite/WebView/OffscreenWebView.cs:70-77 | source/Playnite/WebView/WebView.cs:68-75 — 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×7
  • Low cohesion: Plugin (LCOM4 8) source/PlayniteSDK/Plugins/Plugin.cs:168 — Plugin's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PlayniteSettings (LCOM4 7) source/Playnite/Settings/PlayniteSettings.cs:305 — PlayniteSettings's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Game (LCOM4 6) source/PlayniteSDK/Models/Game.cs:188 — Game's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ExtensionFactory (LCOM4 5) source/Playnite/Plugins/ExtensionFactory.cs:65 — ExtensionFactory'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: EmulatorsViewModel (LCOM4 4) source/Playnite.DesktopApp/ViewModels/EmulatorsViewModel.cs:25 — EmulatorsViewModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: PlayniteApiRoot (LCOM4 4) source/Playnite/API/PlayniteAPI.cs:39 — PlayniteApiRoot's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WindowBase (LCOM4 4) source/Playnite/Controls/WindowBase.cs:47 — WindowBase'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.
D17 · Explicit Debt · BarePragmaDisable · ×6
  • BarePragmaDisable source/Playnite.DesktopApp/DesktopApplication.cs:94 — #pragma warning disable CS4014 — 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 source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel_Commands.cs:133 — #pragma warning disable CS4014 — 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 source/Playnite.DesktopApp/ViewModels/InstalledGamesViewModel.cs:282 — #pragma warning disable CS4014 — 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 source/Playnite/API/DatabaseAPI.cs:20 — #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 source/Playnite/Database/InMemoryGameDatabase.cs:68 — #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 source/PlayniteSDK/Models/FilterPreset.cs:10 — #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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×6
  • Duplicated block (12 lines × 2) source/Playnite/Database/DatabaseExplorer.cs:283 — source/Playnite/Database/DatabaseExplorer.cs:283-294 | source/Playnite/Database/DatabaseExplorer.cs:324-335 — both copies are in the same file, so extract the 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 `source/Playnite/Database/DatabaseExplorer.cs:283` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:107 — source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:107-118 | source/Playnite/MenuItems.cs:284-295 — 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 `source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:243 — source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:243-254 | source/Playnite/MenuItems.cs:111-122 — 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 `source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:243` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) source/Playnite.DesktopApp/ViewModels/GameDetailsViewModel.cs:352 — source/Playnite.DesktopApp/ViewModels/GameDetailsViewModel.cs:352-363 | source/Playnite.FullscreenApp/ViewModels/GameDetailsViewModel.cs:104-115 — 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 `source/Playnite.DesktopApp/ViewModels/GameDetailsViewModel.cs:352` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:1438 — source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:1438-1449 | source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel.cs:458-469 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:1453 — source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:1453-1464 | source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel.cs:473-484 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×6
  • Duplicated block (9 lines × 2) source/Playnite/Themes.cs:248 — source/Playnite/Themes.cs:248-256 | source/Playnite/Themes.cs:273-281 — both copies are in the same file, so extract the 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 `source/Playnite/Themes.cs:248` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) source/Playnite/SystemIntegration.cs:16 — source/Playnite/SystemIntegration.cs:16-24 | source/Playnite/SystemIntegration.cs:78-86 — both copies are in the same file, so extract the 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 `source/Playnite/SystemIntegration.cs:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) source/Playnite/Database/Collections/PlatformsCollection.cs:91 — source/Playnite/Database/Collections/PlatformsCollection.cs:91-99 | source/Playnite/Database/Collections/PlatformsCollection.cs:113-121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite/Database/Collections/PlatformsCollection.cs:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) source/Playnite/Settings/PlayniteSettings.cs:2375 — source/Playnite/Settings/PlayniteSettings.cs:2375-2383 | source/Playnite/Settings/PlayniteSettings.cs:2418-2426 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) source/Playnite.FullscreenApp/Controls/ButtonEx.cs:94 — source/Playnite.FullscreenApp/Controls/ButtonEx.cs:94-102 | source/Playnite.FullscreenApp/Controls/ToggleButtonEx.cs:28-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. 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) source/Playnite.FullscreenApp/Controls/Views/Filters.cs:39 — source/Playnite.FullscreenApp/Controls/Views/Filters.cs:39-47 | source/Playnite.FullscreenApp/Controls/Views/FiltersAdditional.cs:43-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `source/Playnite.FullscreenApp/Controls/Views/FiltersAdditional.cs:53` calls `Dispose` and `source/Playnite.FullscreenApp/Controls/Views/Filters.cs:49` 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.
X20 · Mistyped argument guard · Argument guard throws the exception its own condition disproves · ×6
  • Argument guard throws the exception its own condition disproves source/Playnite/Database/Collections/ItemCollection.cs:311 — The guard on line 311 rejects `itemName` and line 311 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(itemName)` is true of a value that is NOT null: it is satisfied by an EMPTY `itemName`, and on that path `itemName` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
  • Argument guard throws the exception its own condition disproves source/Playnite/Database/GameDatabaseMigration.cs:678 — The guard on line 676 rejects `databasePath` and line 678 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(databasePath)` is true of a value that is NOT null: it is satisfied by an EMPTY `databasePath`, and on that path `databasePath` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
  • Argument guard throws the exception its own condition disproves source/PlayniteSDK/LogManager.cs:134 — The guard on line 132 rejects `loggerName` and line 134 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(loggerName)` is true of a value that is NOT null: it is satisfied by an EMPTY `loggerName`, and on that path `loggerName` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
  • Argument guard throws the exception its own condition disproves source/PlayniteSDK/Models/GameMetadata.cs:170 — The guard on line 168 rejects `name` and line 170 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrWhiteSpace(name)` is true of a value that is NOT null: it is satisfied by an EMPTY `name`, and on that path `name` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
  • Argument guard throws the exception its own condition disproves source/PlayniteSDK/Models/GameMetadata.cs:227 — The guard on line 225 rejects `specId` and line 227 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrWhiteSpace(specId)` is true of a value that is NOT null: it is satisfied by an EMPTY `specId`, and on that path `specId` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
  • Argument guard throws the exception its own condition disproves source/PlayniteSDK/Models/ReleaseDate.cs:251 — The guard on line 249 rejects `stringDate` and line 251 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(stringDate)` is true of a value that is NOT null: it is satisfied by an EMPTY `stringDate`, and on that path `stringDate` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×5
  • Duplicated block (19 lines × 2) source/Playnite/ViewModels/ProgressViewViewModel.cs:93 — source/Playnite/ViewModels/ProgressViewViewModel.cs:93-111 | source/Playnite/ViewModels/ProgressViewViewModel.cs:126-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. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite/ViewModels/ProgressViewViewModel.cs:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:844 — source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:844-862 | source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel.cs:1088-1106 — 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 `source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:844` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:1611 — source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:1611-1629 | source/Playnite.DesktopApp/ViewModels/MetadataComparisonViewModel.cs:416-434 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) source/Tools/Playnite.Toolbox/Extensions.cs:90 — source/Tools/Playnite.Toolbox/Extensions.cs:90-108 | source/Tools/Playnite.Toolbox/Extensions.cs:139-157 — both copies are in the same file, so extract the 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 `source/Tools/Playnite.Toolbox/Extensions.cs:90` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) source/Playnite/Converters/InvertedBoolenConverter.cs:16 — source/Playnite/Converters/InvertedBoolenConverter.cs:16-34 | source/Playnite/Converters/NegateConverter.cs:14-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `culture` to `CultureInfo` in one and `System.Globalization.CultureInfo` 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×5
  • Duplicated block (10 lines × 2) source/Playnite/Database/Collections/GamesCollection.cs:152 — source/Playnite/Database/Collections/GamesCollection.cs:152-161 | source/Playnite/Database/Collections/GamesCollection.cs:185-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:380 — source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:380-389 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:313-322 — 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 `source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:380` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:312` calls `Close` and `source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:379` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) source/PlayniteSDK/Models/Emulator.cs:766 — source/PlayniteSDK/Models/Emulator.cs:766-775 | source/PlayniteSDK/Models/Emulator.cs:790-799 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `source/PlayniteSDK/Models/Emulator.cs:777` calls `Insert`, `GetString` and `source/PlayniteSDK/Models/Emulator.cs:801` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) source/Playnite.DesktopApp/Api/MainViewAPI.cs:85 — source/Playnite.DesktopApp/Api/MainViewAPI.cs:85-94 | source/Playnite.FullscreenApp/Api/MainViewAPI.cs:85-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:742 — source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:742-751 | source/Playnite.DesktopApp/ViewModels/ToolsConfigViewModel.cs:129-138 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `source/Playnite.DesktopApp/ViewModels/ToolsConfigViewModel.cs:140` calls `BeginBufferUpdate` and `source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:754` 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.
X18 · Disposal-pattern correctness · Disposable created and abandoned in the method that made it · ×5
  • Disposable created and abandoned in the method that made it source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:749 — `cancelToken` is a `CancellationTokenSource`, which implements `IDisposable`, and it is created here (line 749). Every use of it in `SelectGoogleImage` 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 cancelToken = …;`), 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 source/Playnite/Common/Resources.cs:44 — `tr` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 44). Every use of it in `ReadFileFromResource` 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 tr = …;`), 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 source/Playnite/Common/TGASharpLib.cs:5148 — `Br` is a `BinaryReader`, which implements `IDisposable`, and it is created here (line 5148). Every use of it in `LoadFunc` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var Br = …;`), which releases it at the end of the scope on every path including a throw.
  • Disposable created and abandoned in the method that made it source/Playnite/Common/TGASharpLib.cs:5530 — `Bw` is a `BinaryWriter`, which implements `IDisposable`, and it is created here (line 5530). Every use of it in `SaveFunc` 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 Bw = …;`), 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 source/Tools/PlayniteInstaller/MainViewModel.cs:144 — `dialog` is a `FolderBrowserDialog`, which implements `IDisposable`, and it is created here (line 144). Every use of it in `Browse` 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 dialog = …;`), which releases it at the end of the scope on every path including a throw.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×4
  • Duplicated block (17 lines × 2) source/Playnite/MenuHelpers.cs:42 — source/Playnite/MenuHelpers.cs:42-58 | source/Playnite/SdkHelpers.cs:48-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. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite/MenuHelpers.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.
  • Duplicated block (17 lines × 2) source/Playnite/ImageSourceManager.cs:61 — source/Playnite/ImageSourceManager.cs:61-77 | source/Playnite/ImageSourceManager.cs:219-235 — both copies are in the same file, so extract the 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 `source/Playnite/ImageSourceManager.cs:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) source/Playnite/Database/OldModels/Ver2.cs:90 — source/Playnite/Database/OldModels/Ver2.cs:90-106 | source/PlayniteSDK/Models/DatabaseObject.cs:55-71 — 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 `source/Playnite/Database/OldModels/Ver2.cs:90` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) source/Playnite/Database/OldModels/Ver2.cs:2001 — source/Playnite/Database/OldModels/Ver2.cs:2001-2017 | source/PlayniteSDK/Models/Link.cs:64-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Ver2_Link` in one and `Link` 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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×4
  • Duplicated block (15 lines × 2) source/Playnite/ObservablePowerStatus.cs:77 — source/Playnite/ObservablePowerStatus.cs:77-91 | source/Playnite/ObservableTime.cs:34-48 — 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 `source/Playnite/ObservablePowerStatus.cs:77` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `source/Playnite/ObservablePowerStatus.cs:94` calls `Post`, `OnPropertyChanged`, `nameof` and `source/Playnite/ObservableTime.cs:51` 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 (15 lines × 2) source/Playnite.DesktopApp/ViewModels/MetadataComparisonViewModel.cs:368 — source/Playnite.DesktopApp/ViewModels/MetadataComparisonViewModel.cs:368-382 | source/Playnite.DesktopApp/ViewModels/MetadataComparisonViewModel.cs:392-406 — both copies are in the same file, so extract the 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 `source/Playnite.DesktopApp/ViewModels/MetadataComparisonViewModel.cs:368` 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 × 2) source/Playnite.DesktopApp/Controls/FilterStringSelectionBox.cs:89 — source/Playnite.DesktopApp/Controls/FilterStringSelectionBox.cs:89-103 | source/Playnite.FullscreenApp/Controls/FilterStringListSelection.cs:117-131 — 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 (15 lines × 2) source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:608 — source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:608-622 | source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:651-665 — both copies are in the same file, so extract the 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 `source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:608` 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.
IC1 · Incompleteness & stubs · Condition was already decided · ×4
  • Condition was already decided — an earlier guard makes this test constant source/Playnite/Archive.cs:46 — Control only reaches here when `cancelToken.IsCancellationRequested` is false, because the guard on line 39 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 source/Playnite/Archive.cs:54 — Control only reaches here when `cancelToken.IsCancellationRequested` is false, because the guard on line 39 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 source/Playnite/Archive.cs:61 — Control only reaches here when `cancelToken.IsCancellationRequested` is false, because the guard on line 39 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 source/Playnite/Archive.cs:61 — Control only reaches here when `cancelToken.IsCancellationRequested` is false, because the guard on line 54 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×4
  • Untrusted text written into markup unescaped source/Playnite/Controls/HtmlTextView.cs:288 — `HtmlText.Substring(0, loadPartLength)` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped source/Playnite/Controls/HtmlTextView.cs:293 — `HtmlText ?? string.Empty` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped source/Playnite/Controls/HtmlTextView.cs:353 — `HtmlText` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped source/Playnite/Controls/HtmlTextView.cs:357 — `HtmlText.Substring(0, currentLoadedLength)` is text this program did not author, and it is written into the text of an element through `SetHtmlContent` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
X3 · Exception handling · Swallowed exception (empty catch) · ×4
  • Swallowed exception (empty catch) source/Playnite.DesktopApp/Controls/GridViewPanel.cs:292 — 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) source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:546 — 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) source/Playnite/Common/Paths.cs:134 — 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) source/Playnite/GamesEditor.cs:1589 — 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×4
  • Swallowed exception (caught, then discarded) REDACTED:321 — `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) source/Playnite/Controllers/GenericGameController.cs:693 — `ContinueWith` with a continuation that does nothing discards the antecedent's failure — the task it returns completes successfully whether or not the work faulted, so the failure vanishes with no log and no rethrow. Await the task and handle the exception, or report the fault from the continuation (`t.Exception`).
  • Swallowed exception (caught, then discarded) source/Playnite/Controllers/GenericGameController.cs:727 — `ContinueWith` with a continuation that does nothing discards the antecedent's failure — the task it returns completes successfully whether or not the work faulted, so the failure vanishes with no log and no rethrow. Await the task and handle the exception, or report the fault from the continuation (`t.Exception`).
  • Swallowed exception (caught, then discarded) source/Playnite/Controllers/GenericGameController.cs:762 — `ContinueWith` with a continuation that does nothing discards the antecedent's failure — the task it returns completes successfully whether or not the work faulted, so the failure vanishes with no log and no rethrow. Await the task and handle the exception, or report the fault from the continuation (`t.Exception`).
D15 · Churn × Complexity Hotspots · Hotspot · ×3
  • Hotspot: source/Playnite/App/PlayniteApplication.cs source/Playnite/App/PlayniteApplication.cs:493 — source/Playnite/App/PlayniteApplication.cs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in PlayniteApplication.CurrentDomain_UnhandledException at line 493. 2 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 21:50:30 +02:00' --until='2026-10-19 21:50:30 +02:00' --full-history --no-merges -- source/Playnite/App/PlayniteApplication.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: source/Playnite/Diagnostic.cs source/Playnite/Diagnostic.cs:62 — source/Playnite/Diagnostic.cs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Diagnostic.CreateDiagPackage at line 62. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 21:50:30 +02:00' --until='2026-10-19 21:50:30 +02:00' --full-history --no-merges -- source/Playnite/Diagnostic.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: source/Playnite/Exceptions.cs source/Playnite/Exceptions.cs:71 — source/Playnite/Exceptions.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in Exceptions.GetExceptionInfoImpl at line 71. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 21:50:30 +02:00' --until='2026-10-19 21:50:30 +02:00' --full-history --no-merges -- source/Playnite/Exceptions.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.
D17 · Explicit Debt · FixmeComment · ×3
  • FixmeComment source/Playnite/SDL2.cs:7018 — // FIXME: I'd rather this somehow be private... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment source/Playnite/SDL2.cs:7026 — // FIXME: I'd rather this somehow be private... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment source/Playnite/SDL2.cs:8666 — // FIXME: I wish these weren't public... — 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×3
  • Duplicated block (5 lines × 2) source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:502 — source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:502-506 | source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:518-522 — both copies are in the same file, so extract the 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 `source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:502` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) source/Playnite.DesktopApp/ViewModels/AddonsViewModel.cs:235 — source/Playnite.DesktopApp/ViewModels/AddonsViewModel.cs:235-239 | source/Playnite.DesktopApp/ViewModels/AddonsViewModel.cs:245-249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite.DesktopApp/ViewModels/AddonsViewModel.cs:235` 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 (5 lines × 2) source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs:24 — source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs:24-28 | source/Playnite.FullscreenApp/Controls/FilterStringListSelection.cs:23-27 — before extracting anything, compare `source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs` and `source/Playnite.FullscreenApp/Controls/FilterStringListSelection.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×3
  • Duplicated block (7 lines × 2) source/Playnite.DesktopApp/Controls/FilterEnumSelectionBox.cs:70 — source/Playnite.DesktopApp/Controls/FilterEnumSelectionBox.cs:70-76 | source/Playnite.FullscreenApp/Controls/FilterEnumListSelection.cs:76-82 — 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 `source/Playnite.DesktopApp/Controls/FilterEnumSelectionBox.cs:70` 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) source/Playnite/App/Updater.cs:71 — source/Playnite/App/Updater.cs:71-77 | source/Tools/PlayniteInstaller/App.xaml.cs:29-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) source/Playnite/Converters/BooleanToVisibilityConverter.cs:20 — source/Playnite/Converters/BooleanToVisibilityConverter.cs:20-26 | source/Tools/PlayniteInstaller/Converters.cs:35-41 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `source/Playnite/Converters/BooleanToVisibilityConverter.cs:16` calls `BooleanToVisibilityConverter` and `source/Tools/PlayniteInstaller/Converters.cs:32` 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.
S1 · Cryptographic Hygiene · Weak hash algorithm · ×3
  • Weak hash algorithm source/Playnite/Common/Extensions/StringExtensions.cs:47 — MD5/SHA1 is constructed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses.
  • Weak hash algorithm source/Playnite/Common/FileSystem_Checksum.cs:39 — MD5/SHA1 is constructed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses.
  • Weak hash algorithm source/PlayniteSDK/Models/ImportExclusionList.cs:70 — MD5/SHA1 is constructed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses.
X1 · Async correctness · Sync-over-async (deadlock risk) through `.Wait(…)` · ×3
  • Sync-over-async (deadlock risk) through `.Wait(…)` source/Playnite/Emulators/Scanner.cs:576 — `.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(…)` source/Playnite/GoogleImageDownloader.cs:97 — `.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(…)` source/Playnite/ViewModels/ProgressViewViewModel.cs:185 — `.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).
X18 · Disposal-pattern correctness · Owned disposable field is never released · ×3
  • Owned disposable field is never released source/Playnite/WebView/OffscreenWebView.cs:17 — `OffscreenWebView` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `browserInitializedEvent` itself (line 17), which makes that instance its own. But `browserInitializedEvent` is named in none of the methods the disposal search covered: `Dispose` (line 96) — 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` (`browserInitializedEvent?.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 source/Playnite/WebView/OffscreenWebView.cs:18 — `OffscreenWebView` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `loadCompleteEvent` itself (line 18), which makes that instance its own. But `loadCompleteEvent` is named in none of the methods the disposal search covered: `Dispose` (line 96) — 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` (`loadCompleteEvent?.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 source/Playnite/WebView/WebView.cs:20 — `WebView` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `loadCompleteEvent` itself (line 20), which makes that instance its own. But `loadCompleteEvent` is named in none of the methods the disposal search covered: `Dispose` (line 90) — 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` (`loadCompleteEvent?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
D10 · Test Quality · No assertions · ×2
  • No assertions: GetImportedRomFilesTest source/Tests/Playnite.Tests/Database/GameDatabaseTests.cs:306 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: GetImportedRomFilesVariableTest source/Tests/Playnite.Tests/Database/GameDatabaseTests.cs:314 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D10 · Test Quality · Fixed-sleep synchronisation · ×2
  • Fixed-sleep synchronisation: ReadFileAsStringSafeTest source/Tests/Playnite.Tests/FileSystemTests.cs:34 — This test starts a background task and then orders itself against it with `Task.Delay(1000)` — 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.
  • Fixed-sleep synchronisation: WriteStringToFileSafeTest source/Tests/Playnite.Tests/FileSystemTests.cs:50 — This test starts a background task and then orders itself against it with `Task.Delay(1000)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D17 · Explicit Debt · HackComment · ×2
  • HackComment source/Playnite.DesktopApp/Windows/EmulatorImportWindow.xaml:58 — <!--Hack to make the last empty column being able to slect a row--> — 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 source/Playnite.DesktopApp/Windows/EmulatedGameImportWindow.xaml:97 — <!--Hack to make the last empty column being able to slect a row--> — 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (4 members, 50+ identical tokens) source/Playnite.DesktopApp/Controls/ComboBoxList.cs:129 — source/Playnite.DesktopApp/Controls/ComboBoxList.cs:129-146 | source/Playnite.DesktopApp/Controls/ComboBoxListBase.cs:37-84 | source/Playnite.DesktopApp/Controls/DdItemListSelectionBox.cs:121-205 | source/Playnite.DesktopApp/Controls/FilterSelectionBox.cs:34-69 — 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) source/Playnite/Database/Collections/PlatformsCollection.cs:133 — source/Playnite/Database/Collections/PlatformsCollection.cs:133-168 | source/Playnite/Database/Collections/PlatformsCollection.cs:186-215 | source/Playnite/Database/Collections/RegionsCollection.cs:60-95 | source/Playnite/Database/Collections/RegionsCollection.cs:113-142 — 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 · Duplicated block (24 lines × 2) · ×2
  • Duplicated block (24 lines × 2) source/Playnite/Database/OldModels/Ver2.cs:465 — source/Playnite/Database/OldModels/Ver2.cs:465-488 | source/PlayniteSDK/Models/Emulator.cs:584-607 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Ver2_EmulatorProfile` in one and `CustomEmulatorProfile` 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 (24 lines × 2) source/Playnite/App/PlayniteApplication.cs:1635 — source/Playnite/App/PlayniteApplication.cs:1635-1658 | source/Playnite/App/PlayniteApplication.cs:1679-1702 — both copies are in the same file, so extract the 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 `source/Playnite/App/PlayniteApplication.cs:1635` 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.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) source/Playnite/Database/GameDatabase.cs:252 — source/Playnite/Database/GameDatabase.cs:252-266 | source/Playnite/Database/InMemoryGameDatabase.cs:69-82 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14–15 lines × 2) source/Tools/Playnite.Toolbox/Extensions.cs:80 — source/Tools/Playnite.Toolbox/Extensions.cs:80-93 | source/Tools/Playnite.Toolbox/Extensions.cs:122-136 — both copies are in the same file, so extract the 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 `source/Tools/Playnite.Toolbox/Extensions.cs:80` 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.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×2
  • Duplicated block (6 lines × 2) source/Playnite/Extensions/GameExtensions.cs:203 — source/Playnite/Extensions/GameExtensions.cs:203-208 | source/Playnite/Extensions/GameExtensions.cs:258-263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `game` to `this Game` in one and `this GameMetadata` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) source/Playnite/MenuItems.cs:271 — source/Playnite/MenuItems.cs:271-276 | source/Playnite/MenuItems.cs:299-304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
IC1 · Incompleteness & stubs · Markup wires an event to an empty handler · ×2
  • Markup wires an event to an empty handler source/Playnite.DesktopApp/Controls/SliderWithPopup.xaml.cs:42 — `SliderWithPopup.xaml` wires an event to `Slider_MouseMove`, whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler source/Playnite.DesktopApp/Controls/SliderWithPopup.xaml.cs:58 — `SliderWithPopup.xaml` wires an event to `Slider_MouseLeave`, whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
C2 · Access Controls · Unauthorized service host · ×1
  • Unauthorized service host — Service contract 'IPipeService' is hosted over NetNamedPipeBinding by a ServiceHost this repository opens itself — every operation on it is reachable by any caller that can connect. (source/Playnite/PipeServer.cs:93) Nothing in the source decides WHO may invoke those operations — no [PrincipalPermission], no ServiceAuthorizationManager, and no guard method that refuses the caller. A local IPC transport is not an access control: it authenticates the connection, it does not authorize the command.
D1 · Cyclomatic Complexity · MetadataDownloader.DownloadMetadataAsync (cyclomatic 112) · ×1
  • MetadataDownloader.DownloadMetadataAsync (cyclomatic 112) source/Playnite/Metadata/MetadataDownloader.cs:311 — MetadataDownloader.DownloadMetadataAsync has cyclomatic complexity 112 (threshold 15). Most of this is not in the body itself: 1 of the 112 points is its own statement and the rest belongs to one function literal inside it that branches (line 318). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · GameEditViewModel.EditingGame_PropertyChanged (cyclomatic 90) · ×1
  • GameEditViewModel.EditingGame_PropertyChanged (cyclomatic 90) source/Playnite.DesktopApp/ViewModels/GameEditViewModelFieldChecks.cs:849 — GameEditViewModel.EditingGame_PropertyChanged has cyclomatic complexity 90 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GameEditViewModel.ConfirmDialog (cyclomatic 85) · ×1
  • GameEditViewModel.ConfirmDialog (cyclomatic 85) source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:525 — GameEditViewModel.ConfirmDialog has cyclomatic complexity 85 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GameDatabase.MigrateNewDatabaseFormat (cyclomatic 74) · ×1
  • GameDatabase.MigrateNewDatabaseFormat (cyclomatic 74) source/Playnite/Database/GameDatabaseMigration.cs:22 — GameDatabase.MigrateNewDatabaseFormat has cyclomatic complexity 74 (threshold 15). Of this number, 55 points are the body's own statements and 19 belong to 5 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.
D1 · Cyclomatic Complexity · Game.GetDifferences (cyclomatic 65) · ×1
  • Game.GetDifferences (cyclomatic 65) source/PlayniteSDK/Models/Game.cs:2032 — Game.GetDifferences has cyclomatic complexity 65 (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.
D1 · Cyclomatic Complexity · TGA.LoadFunc (cyclomatic 57) · ×1
  • TGA.LoadFunc (cyclomatic 57) source/Playnite/Common/TGASharpLib.cs:5298 — TGA.LoadFunc has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Game.CopyDiffTo (cyclomatic 55) · ×1
  • Game.CopyDiffTo (cyclomatic 55) source/PlayniteSDK/Models/Game.cs:1750 — Game.CopyDiffTo has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlayniteApplication.PlayniteApplication.ctor (cyclomatic 51) · ×1
  • PlayniteApplication.PlayniteApplication.ctor (cyclomatic 51) source/Playnite/App/PlayniteApplication.cs:92 — PlayniteApplication.PlayniteApplication.ctor has cyclomatic complexity 51 (threshold 15). Of this number, 49 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.
D1 · Cyclomatic Complexity · GameScanner.ScanDirectoryBase (cyclomatic 51) · ×1
  • GameScanner.ScanDirectoryBase (cyclomatic 51) source/Playnite/Emulators/Scanner.cs:693 — GameScanner.ScanDirectoryBase has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TGA.ToBitmapFunc (cyclomatic 48) · ×1
  • TGA.ToBitmapFunc (cyclomatic 48) source/Playnite/Common/TGASharpLib.cs:5681 — TGA.ToBitmapFunc has cyclomatic complexity 48 (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.
D1 · Cyclomatic Complexity · FullscreenAppViewModel.InitializeCommands (cyclomatic 47) · ×1
  • FullscreenAppViewModel.InitializeCommands (cyclomatic 47) source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel_Commands.cs:45 — FullscreenAppViewModel.InitializeCommands has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 1 of the 47 points is its own statement and the rest belongs to 12 function literals inside it that branch (lines 100, 56, 205, …). 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.
D1 · Cyclomatic Complexity · GameEditViewModel.GetDisplayDiffFields (cyclomatic 46) · ×1
  • GameEditViewModel.GetDisplayDiffFields (cyclomatic 46) source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:56 — GameEditViewModel.GetDisplayDiffFields has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DatabaseExplorer.LoadValues (cyclomatic 43) · ×1
  • DatabaseExplorer.LoadValues (cyclomatic 43) source/Playnite/Database/DatabaseExplorer.cs:723 — DatabaseExplorer.LoadValues has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TGA.CheckAndUpdateOffsets (cyclomatic 42) · ×1
  • TGA.CheckAndUpdateOffsets (cyclomatic 42) source/Playnite/Common/TGASharpLib.cs:4799 — TGA.CheckAndUpdateOffsets 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.
D1 · Cyclomatic Complexity · MetadataDownloader.ProcessField (cyclomatic 38) · ×1
  • MetadataDownloader.ProcessField (cyclomatic 38) source/Playnite/Metadata/MetadataDownloader.cs:136 — MetadataDownloader.ProcessField has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DesktopCollectionView.SetViewDescriptions (cyclomatic 37) · ×1
  • DesktopCollectionView.SetViewDescriptions (cyclomatic 37) source/Playnite.DesktopApp/DesktopCollectionView.cs:187 — DesktopCollectionView.SetViewDescriptions has cyclomatic complexity 37 (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.
D1 · Cyclomatic Complexity · GamesEditor.PlayGame (cyclomatic 36) · ×1
  • GamesEditor.PlayGame (cyclomatic 36) source/Playnite/GamesEditor.cs:189 — GamesEditor.PlayGame has cyclomatic 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: 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.
D1 · Cyclomatic Complexity · GameDatabase.ImportGames (cyclomatic 35) · ×1
  • GameDatabase.ImportGames (cyclomatic 35) source/Playnite/Database/GameDatabase.cs:1205 — GameDatabase.ImportGames has cyclomatic complexity 35 (threshold 15). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GameScanner.Scan (cyclomatic 32) · ×1
  • GameScanner.Scan (cyclomatic 32) source/Playnite/Emulators/Scanner.cs:185 — GameScanner.Scan has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FilterSettings.ClearFilters (cyclomatic 32) · ×1
  • FilterSettings.ClearFilters (cyclomatic 32) source/Playnite/Settings/FilterSettings.cs:956 — FilterSettings.ClearFilters has cyclomatic complexity 32 (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.
D1 · Cyclomatic Complexity · GamesGridView.GetColumn (cyclomatic 31) · ×1
  • GamesGridView.GetColumn (cyclomatic 31) source/Playnite.DesktopApp/Controls/GamesGridView.xaml.cs:208 — GamesGridView.GetColumn has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · PlayniteApplication.CurrentDomain_UnhandledException (cyclomatic 31) · ×1
  • PlayniteApplication.CurrentDomain_UnhandledException (cyclomatic 31) source/Playnite/App/PlayniteApplication.cs:493 — PlayniteApplication.CurrentDomain_UnhandledException has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · DatabaseExplorer.ApplyFilter (cyclomatic 31) · ×1
  • DatabaseExplorer.ApplyFilter (cyclomatic 31) source/Playnite/Database/DatabaseExplorer.cs:592 — DatabaseExplorer.ApplyFilter 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.
D1 · Cyclomatic Complexity · FilterSettings.ApplyFilter (cyclomatic 31) · ×1
  • FilterSettings.ApplyFilter (cyclomatic 31) source/Playnite/Settings/FilterSettings.cs:1221 — FilterSettings.ApplyFilter has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · GamesEditor.Controllers_Stopped (cyclomatic 30) · ×1
  • GamesEditor.Controllers_Stopped (cyclomatic 30) source/Playnite/GamesEditor.cs:1421 — GamesEditor.Controllers_Stopped has cyclomatic complexity 30 (threshold 15). Of this number, 23 points are the body's own statements and 7 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.
D1 · Cyclomatic Complexity · GameTools.GetMultiGameEditObject (cyclomatic 30) · ×1
  • GameTools.GetMultiGameEditObject (cyclomatic 30) source/Playnite/GameTools.cs:28 — GameTools.GetMultiGameEditObject has cyclomatic complexity 30 (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.
D1 · Cyclomatic Complexity · MetadataComparisonViewModel.ConfirmDialog (cyclomatic 29) · ×1
  • MetadataComparisonViewModel.ConfirmDialog (cyclomatic 29) source/Playnite.DesktopApp/ViewModels/MetadataComparisonViewModel.cs:264 — MetadataComparisonViewModel.ConfirmDialog has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlayniteApplication.PipeService_CommandExecuted (cyclomatic 29) · ×1
  • PlayniteApplication.PipeService_CommandExecuted (cyclomatic 29) source/Playnite/App/PlayniteApplication.cs:799 — PlayniteApplication.PipeService_CommandExecuted 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.
D1 · Cyclomatic Complexity · FilterMatcher.Match (cyclomatic 29) · ×1
  • FilterMatcher.Match (cyclomatic 29) source/Playnite/Database/GameDatabase_Filters.cs:61 — FilterMatcher.Match has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Backup.BackupData (cyclomatic 28) · ×1
  • Backup.BackupData (cyclomatic 28) source/Playnite/Backup.cs:73 — Backup.BackupData 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.
D1 · Cyclomatic Complexity · TGA.LoadFunc (cyclomatic 28) · ×1
  • TGA.LoadFunc (cyclomatic 28) source/Playnite/Common/TGASharpLib.cs:5138 — TGA.LoadFunc 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.
D1 · Cyclomatic Complexity · MenuItems.GetSearchGameMenuItems (cyclomatic 28) · ×1
  • MenuItems.GetSearchGameMenuItems (cyclomatic 28) source/Playnite/MenuItems.cs:164 — MenuItems.GetSearchGameMenuItems has cyclomatic complexity 28 (threshold 15). Of this number, 27 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.
D1 · Cyclomatic Complexity · FullscreenAppViewModel.Fullscreen_PropertyChanged (cyclomatic 27) · ×1
  • FullscreenAppViewModel.Fullscreen_PropertyChanged (cyclomatic 27) source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel.cs:595 — FullscreenAppViewModel.Fullscreen_PropertyChanged 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.
D1 · Cyclomatic Complexity · PlayniteApplication.Application_Startup (cyclomatic 27) · ×1
  • PlayniteApplication.Application_Startup (cyclomatic 27) source/Playnite/App/PlayniteApplication.cs:618 — PlayniteApplication.Application_Startup has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GameEditViewModel.LoadNewMetadata (cyclomatic 26) · ×1
  • GameEditViewModel.LoadNewMetadata (cyclomatic 26) source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:252 — GameEditViewModel.LoadNewMetadata 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.
D1 · Cyclomatic Complexity · ItemsControlEx.ItemsControlEx_PreviewKeyDown (cyclomatic 26) · ×1
  • ItemsControlEx.ItemsControlEx_PreviewKeyDown (cyclomatic 26) source/Playnite.FullscreenApp/Controls/ItemsControlEx.cs:38 — ItemsControlEx.ItemsControlEx_PreviewKeyDown has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Main.OnApplyTemplate (cyclomatic 26) · ×1
  • Main.OnApplyTemplate (cyclomatic 26) source/Playnite.FullscreenApp/Controls/Views/Main.cs:230 — Main.OnApplyTemplate has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CloneObject.CopyProperties (cyclomatic 26) · ×1
  • CloneObject.CopyProperties (cyclomatic 26) source/Playnite/Common/Extensions/CloneObject.cs:113 — CloneObject.CopyProperties has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Backup.RestoreBackup (cyclomatic 25) · ×1
  • Backup.RestoreBackup (cyclomatic 25) source/Playnite/Backup.cs:212 — Backup.RestoreBackup 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.
D1 · Cyclomatic Complexity · GenericPlayController.Start (cyclomatic 25) · ×1
  • GenericPlayController.Start (cyclomatic 25) source/Playnite/Controllers/GenericGameController.cs:481 — GenericPlayController.Start 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.
D1 · Cyclomatic Complexity · DatabaseFilter.UpdateAllCollections (cyclomatic 25) · ×1
  • DatabaseFilter.UpdateAllCollections (cyclomatic 25) source/Playnite/Database/DatabaseFilter.cs:375 — DatabaseFilter.UpdateAllCollections 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.
D1 · Cyclomatic Complexity · GamesEditor.CalculateGameSize (cyclomatic 25) · ×1
  • GamesEditor.CalculateGameSize (cyclomatic 25) source/Playnite/GamesEditor.cs:566 — GamesEditor.CalculateGameSize 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.
D1 · Cyclomatic Complexity · ImageSourceManager.GetImage (cyclomatic 25) · ×1
  • ImageSourceManager.GetImage (cyclomatic 25) source/Playnite/ImageSourceManager.cs:160 — ImageSourceManager.GetImage 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.
D1 · Cyclomatic Complexity · BitmapExtensions.BitmapFromStream (cyclomatic 24) · ×1
  • BitmapExtensions.BitmapFromStream (cyclomatic 24) source/Playnite/Common/Extensions/BitmapExtensions.cs:262 — BitmapExtensions.BitmapFromStream 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.
D1 · Cyclomatic Complexity · PlayniteSettings.LoadSettings (cyclomatic 22) · ×1
  • PlayniteSettings.LoadSettings (cyclomatic 22) source/Playnite/Settings/PlayniteSettings.cs:2388 — PlayniteSettings.LoadSettings 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.
D1 · Cyclomatic Complexity · ThemeManager.ApplyTheme (cyclomatic 22) · ×1
  • ThemeManager.ApplyTheme (cyclomatic 22) source/Playnite/Themes.cs:93 — ThemeManager.ApplyTheme 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.
D1 · Cyclomatic Complexity · StatisticsViewModel.FillData (cyclomatic 21) · ×1
  • StatisticsViewModel.FillData (cyclomatic 21) source/Playnite.DesktopApp/ViewModels/StatisticsViewModel.cs:325 — StatisticsViewModel.FillData has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: StatisticsViewModel.PassesFilter (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ExtensionsMenuViewModels.ExtensionsMenuViewModels.ctor (cyclomatic 21) · ×1
  • ExtensionsMenuViewModels.ExtensionsMenuViewModels.ctor (cyclomatic 21) source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:222 — ExtensionsMenuViewModels.ExtensionsMenuViewModels.ctor 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.
D1 · Cyclomatic Complexity · TGA.SaveFunc (cyclomatic 21) · ×1
  • TGA.SaveFunc (cyclomatic 21) source/Playnite/Common/TGASharpLib.cs:5517 — TGA.SaveFunc 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.
D1 · Cyclomatic Complexity · GamesCollectionViewEntry.GetAdvancedGroupedEntry (cyclomatic 21) · ×1
  • GamesCollectionViewEntry.GetAdvancedGroupedEntry (cyclomatic 21) source/Playnite/GamesCollectionViewEntry.cs:273 — GamesCollectionViewEntry.GetAdvancedGroupedEntry 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.
D1 · Cyclomatic Complexity · GamesEditor.GetPlayActions (cyclomatic 21) · ×1
  • GamesEditor.GetPlayActions (cyclomatic 21) source/Playnite/GamesEditor.cs:1687 — GamesEditor.GetPlayActions 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.
D1 · Cyclomatic Complexity · DatParser.ParseProperty (cyclomatic 21) · ×1
  • DatParser.ParseProperty (cyclomatic 21) REDACTED:129 — DatParser.ParseProperty 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.
D1 · Cyclomatic Complexity · GameMenu.InitializeItems (cyclomatic 20) · ×1
  • GameMenu.InitializeItems (cyclomatic 20) source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:105 — GameMenu.InitializeItems has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
D1 · Cyclomatic Complexity · EmulatedGamesImportViewModel.StartScan (cyclomatic 20) · ×1
  • EmulatedGamesImportViewModel.StartScan (cyclomatic 20) source/Playnite.DesktopApp/ViewModels/EmulatedGamesImportViewModel.cs:331 — EmulatedGamesImportViewModel.StartScan has cyclomatic complexity 20 (threshold 15). Of this number, 15 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsViewModel.ConfirmDialog (cyclomatic 20) · ×1
  • SettingsViewModel.ConfirmDialog (cyclomatic 20) REDACTED:542 — SettingsViewModel.ConfirmDialog 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.
D1 · Cyclomatic Complexity · BsonReader.ReadElement (cyclomatic 20) · ×1
  • BsonReader.ReadElement (cyclomatic 20) source/Playnite/Database/Collections/LiteDBFileReaderV7.cs:80 — BsonReader.ReadElement 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.
D1 · Cyclomatic Complexity · Game.GetScoreGroup (cyclomatic 20) · ×1
  • Game.GetScoreGroup (cyclomatic 20) source/PlayniteSDK/Models/Game.cs:1597 — Game.GetScoreGroup 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.
D1 · Cyclomatic Complexity · FadeImage.LoadNewSource (cyclomatic 19) · ×1
  • FadeImage.LoadNewSource (cyclomatic 19) source/Playnite/Controls/FadeImage.xaml.cs:259 — FadeImage.LoadNewSource has cyclomatic 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Diagnostic.CreateDiagPackage (cyclomatic 19) · ×1
  • Diagnostic.CreateDiagPackage (cyclomatic 19) source/Playnite/Diagnostic.cs:62 — Diagnostic.CreateDiagPackage has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the 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. This is NOT this file's highest cyclomatic complexity: Diagnostic.IsHResultCloudError (cyclomatic 32) 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.
D1 · Cyclomatic Complexity · SearchViewModel.TextBoxKeyUp (cyclomatic 19) · ×1
  • SearchViewModel.TextBoxKeyUp (cyclomatic 19) source/Playnite/ViewModels/SearchViewModel.cs:883 — SearchViewModel.TextBoxKeyUp has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GenericPlayController.StartEmulator (cyclomatic 18) · ×1
  • GenericPlayController.StartEmulator (cyclomatic 18) source/Playnite/Controllers/GenericGameController.cs:72 — GenericPlayController.StartEmulator 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.
D1 · Cyclomatic Complexity · MainMenu.AddExtensionItems (cyclomatic 17) · ×1
  • MainMenu.AddExtensionItems (cyclomatic 17) source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:299 — MainMenu.AddExtensionItems 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.
D1 · Cyclomatic Complexity · FullscreenTilePanel.MakeVisible (cyclomatic 17) · ×1
  • FullscreenTilePanel.MakeVisible (cyclomatic 17) source/Playnite.FullscreenApp/Controls/FullscreenTilePanel.cs:656 — FullscreenTilePanel.MakeVisible 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.
D1 · Cyclomatic Complexity · ExtensionsMenuViewModels.ExtensionsMenuViewModels.ctor (cyclomatic 17) · ×1
  • ExtensionsMenuViewModels.ExtensionsMenuViewModels.ctor (cyclomatic 17) source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:83 — ExtensionsMenuViewModels.ExtensionsMenuViewModels.ctor 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.
D1 · Cyclomatic Complexity · Programs.GetUWPApps (cyclomatic 17) · ×1
  • Programs.GetUWPApps (cyclomatic 17) REDACTED:299 — Programs.GetUWPApps 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.
D1 · Cyclomatic Complexity · Exceptions.GetExceptionInfoImpl (cyclomatic 17) · ×1
  • Exceptions.GetExceptionInfoImpl (cyclomatic 17) source/Playnite/Exceptions.cs:71 — Exceptions.GetExceptionInfoImpl 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.
D1 · Cyclomatic Complexity · SdkHelpers.ResolveUiItemIcon (cyclomatic 17) · ×1
  • SdkHelpers.ResolveUiItemIcon (cyclomatic 17) source/Playnite/SdkHelpers.cs:23 — SdkHelpers.ResolveUiItemIcon 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.
D1 · Cyclomatic Complexity · GameAction.Equals (cyclomatic 17) · ×1
  • GameAction.Equals (cyclomatic 17) source/PlayniteSDK/Models/GameAction.cs:324 — GameAction.Equals 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.
D1 · Cyclomatic Complexity · GameScannerConfig.CopyDiffTo (cyclomatic 17) · ×1
  • GameScannerConfig.CopyDiffTo (cyclomatic 17) source/PlayniteSDK/Models/GameScannerConfig.cs:249 — GameScannerConfig.CopyDiffTo 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.
D1 · Cyclomatic Complexity · FirstTimeStartupViewModel.NavigateNext (cyclomatic 16) · ×1
  • FirstTimeStartupViewModel.NavigateNext (cyclomatic 16) source/Playnite.DesktopApp/ViewModels/FirstTimeStartupViewModel.cs:190 — FirstTimeStartupViewModel.NavigateNext has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GameEditViewModel.GetOrGenerateNewFieldItem (cyclomatic 16) · ×1
  • GameEditViewModel.GetOrGenerateNewFieldItem (cyclomatic 16) source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:406 — GameEditViewModel.GetOrGenerateNewFieldItem has cyclomatic complexity 16 (threshold 15). Of this number, 14 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.
D1 · Cyclomatic Complexity · GameEditViewModel.ConvertGameInfo (cyclomatic 16) · ×1
  • GameEditViewModel.ConvertGameInfo (cyclomatic 16) source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:481 — GameEditViewModel.ConvertGameInfo 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.
D1 · Cyclomatic Complexity · PlayniteApplication.CheckOtherInstances (cyclomatic 16) · ×1
  • PlayniteApplication.CheckOtherInstances (cyclomatic 16) source/Playnite/App/PlayniteApplication.cs:962 — PlayniteApplication.CheckOtherInstances has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 971, 1009). 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.
D1 · Cyclomatic Complexity · StringExtensions.GetJaroWinklerSimilarity (cyclomatic 16) · ×1
  • StringExtensions.GetJaroWinklerSimilarity (cyclomatic 16) source/Playnite/Common/Extensions/StringExtensions.cs:467 — StringExtensions.GetJaroWinklerSimilarity 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.
D1 · Cyclomatic Complexity · GameDatabase.LoadUsedItems (cyclomatic 16) · ×1
  • GameDatabase.LoadUsedItems (cyclomatic 16) source/Playnite/Database/GameDatabase.cs:310 — GameDatabase.LoadUsedItems 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.
D1 · Cyclomatic Complexity · GameDatabase.GameInfoToGame (cyclomatic 16) · ×1
  • GameDatabase.GameInfoToGame (cyclomatic 16) source/Playnite/Database/GameDatabase.cs:1081 — GameDatabase.GameInfoToGame 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.
D1 · Cyclomatic Complexity · EmulatorScanner.SearchForEmulators (cyclomatic 16) · ×1
  • EmulatorScanner.SearchForEmulators (cyclomatic 16) source/Playnite/Emulators/Scanner.cs:59 — EmulatorScanner.SearchForEmulators 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.
D1 · Cyclomatic Complexity · GameScanner.LookupGameInDb (cyclomatic 16) · ×1
  • GameScanner.LookupGameInDb (cyclomatic 16) source/Playnite/Emulators/Scanner.cs:1020 — GameScanner.LookupGameInDb 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.
D1 · Cyclomatic Complexity · ScannedGame.ToGame (cyclomatic 16) · ×1
  • ScannedGame.ToGame (cyclomatic 16) source/Playnite/Emulators/Scanner.cs:1394 — ScannedGame.ToGame 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.
D1 · Cyclomatic Complexity · GameExtensions.GetGameFromExecutable (cyclomatic 16) · ×1
  • GameExtensions.GetGameFromExecutable (cyclomatic 16) source/Playnite/Extensions/GameExtensions.cs:58 — GameExtensions.GetGameFromExecutable 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.
D1 · Cyclomatic Complexity · ThemeFile.GetFilePath (cyclomatic 16) · ×1
  • ThemeFile.GetFilePath (cyclomatic 16) REDACTED:107 — ThemeFile.GetFilePath 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.
D1 · Cyclomatic Complexity · DefaultSearchContext.GetSearchResults (cyclomatic 16) · ×1
  • DefaultSearchContext.GetSearchResults (cyclomatic 16) source/Playnite/ViewModels/SearchViewModel.cs:128 — DefaultSearchContext.GetSearchResults 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, 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.
D1 · Cyclomatic Complexity · DatParser.ProcessLibretroDb (cyclomatic 16) · ×1
  • DatParser.ProcessLibretroDb (cyclomatic 16) REDACTED:303 — DatParser.ProcessLibretroDb has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 396). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: source/Playnite.FullscreenApp/FullscreenApplication.cs source/Playnite.FullscreenApp/FullscreenApplication.cs:142 — source/Playnite.FullscreenApp/FullscreenApplication.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 11 (its worst body is FullscreenApplication.FullscreenApplication_PropertyChanged at line 142), 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: “Various crash fixes and tweaks to diag package handling”; “Fix: Fullscreen description focus behavior fixes (by @siegmour)”; “Fix: Possible crash related to gamepad input handling (by @justin-delano)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 21:50:30 +02:00' --until='2026-10-19 21:50:30 +02:00' --full-history --no-merges -- source/Playnite.FullscreenApp/FullscreenApplication.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.
D17 · Explicit Debt · BareSuppressMessage repeated 10 times in one file · ×1
  • BareSuppressMessage repeated 10 times in one file source/Playnite/Native/Windef.cs:110 — The identical BareSuppressMessage (`SuppressMessage`) appears 10 times in one file — one decision applied repeatedly (e.g. the same rule silenced on every overload of a fluent API), not 10 independent debts. Decide it once — at the type or project level, or by fixing the underlying pattern — rather than occurrence-by-occurrence. (Every occurrence still counts toward the score and metrics.)
D17 · Explicit Debt · BarePragmaDisable repeated 12 times in one file · ×1
  • BarePragmaDisable repeated 12 times in one file source/Playnite/SDL2.cs:4998 — The identical BarePragmaDisable (`#pragma warning disable 0169`) appears 12 times in one file — one decision applied repeatedly (e.g. the same rule silenced on every overload of a fluent API), not 12 independent debts. Decide it once — at the type or project level, or by fixing the underlying pattern — rather than occurrence-by-occurrence. (Every occurrence still counts toward the score and metrics.)
D18 · Solution Shape · Build failed · ×1
  • Build failed — The target solution did not build cleanly (errors: 2), which caps Solution Shape at 3/10 — the most basic shape signal is that it compiles. First errors: CS5001: Program does not contain a static 'Main' method suitable for an entry point.
D2 · Cognitive Complexity · MetadataDownloader.DownloadMetadataAsync (cognitive 233) · ×1
  • MetadataDownloader.DownloadMetadataAsync (cognitive 233) source/Playnite/Metadata/MetadataDownloader.cs:311 — MetadataDownloader.DownloadMetadataAsync has cognitive complexity 233 (threshold 15). None of this is in the body itself: all 233 points belong to one function literal inside it that branches (line 318). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · GameDatabase.MigrateNewDatabaseFormat (cognitive 190) · ×1
  • GameDatabase.MigrateNewDatabaseFormat (cognitive 190) source/Playnite/Database/GameDatabaseMigration.cs:22 — GameDatabase.MigrateNewDatabaseFormat has cognitive complexity 190 (threshold 15). Of this number, 115 points are the body's own statements and 75 belong to 5 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.
D2 · Cognitive Complexity · GameEditViewModel.ConfirmDialog (cognitive 147) · ×1
  • GameEditViewModel.ConfirmDialog (cognitive 147) source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:525 — GameEditViewModel.ConfirmDialog has cognitive complexity 147 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GameEditViewModel.EditingGame_PropertyChanged (cognitive 130) · ×1
  • GameEditViewModel.EditingGame_PropertyChanged (cognitive 130) source/Playnite.DesktopApp/ViewModels/GameEditViewModelFieldChecks.cs:849 — GameEditViewModel.EditingGame_PropertyChanged has cognitive complexity 130 (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.
D2 · Cognitive Complexity · PlayniteApplication.PlayniteApplication.ctor (cognitive 110) · ×1
  • PlayniteApplication.PlayniteApplication.ctor (cognitive 110) source/Playnite/App/PlayniteApplication.cs:92 — PlayniteApplication.PlayniteApplication.ctor has cognitive complexity 110 (threshold 15). Of this number, 108 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · Game.CopyDiffTo (cognitive 108) · ×1
  • Game.CopyDiffTo (cognitive 108) source/PlayniteSDK/Models/Game.cs:1750 — Game.CopyDiffTo has cognitive complexity 108 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TGA.CheckAndUpdateOffsets (cognitive 104) · ×1
  • TGA.CheckAndUpdateOffsets (cognitive 104) source/Playnite/Common/TGASharpLib.cs:4799 — TGA.CheckAndUpdateOffsets has cognitive complexity 104 (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.
D2 · Cognitive Complexity · GameScanner.ScanDirectoryBase (cognitive 99) · ×1
  • GameScanner.ScanDirectoryBase (cognitive 99) source/Playnite/Emulators/Scanner.cs:693 — GameScanner.ScanDirectoryBase has cognitive complexity 99 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GameScanner.Scan (cognitive 91) · ×1
  • GameScanner.Scan (cognitive 91) source/Playnite/Emulators/Scanner.cs:185 — GameScanner.Scan has cognitive complexity 91 (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.
D2 · Cognitive Complexity · GameDatabase.ImportGames (cognitive 85) · ×1
  • GameDatabase.ImportGames (cognitive 85) source/Playnite/Database/GameDatabase.cs:1205 — GameDatabase.ImportGames has cognitive complexity 85 (threshold 15). Of this number, 84 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.
D2 · Cognitive Complexity · Game.GetDifferences (cognitive 75) · ×1
  • Game.GetDifferences (cognitive 75) source/PlayniteSDK/Models/Game.cs:2032 — Game.GetDifferences has cognitive complexity 75 (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.
D2 · Cognitive Complexity · GenericPlayController.Start (cognitive 74) · ×1
  • GenericPlayController.Start (cognitive 74) source/Playnite/Controllers/GenericGameController.cs:481 — GenericPlayController.Start 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.
D2 · Cognitive Complexity · GamesEditor.GetPlayActions (cognitive 73) · ×1
  • GamesEditor.GetPlayActions (cognitive 73) source/Playnite/GamesEditor.cs:1687 — GamesEditor.GetPlayActions has cognitive complexity 73 (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.
D2 · Cognitive Complexity · TGA.LoadFunc (cognitive 70) · ×1
  • TGA.LoadFunc (cognitive 70) source/Playnite/Common/TGASharpLib.cs:5298 — TGA.LoadFunc has cognitive complexity 70 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GameEditViewModel.GetDisplayDiffFields (cognitive 63) · ×1
  • GameEditViewModel.GetDisplayDiffFields (cognitive 63) source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:56 — GameEditViewModel.GetDisplayDiffFields has cognitive complexity 63 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TGA.ToBitmapFunc (cognitive 61) · ×1
  • TGA.ToBitmapFunc (cognitive 61) source/Playnite/Common/TGASharpLib.cs:5681 — TGA.ToBitmapFunc has cognitive complexity 61 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ItemsControlEx.ItemsControlEx_PreviewKeyDown (cognitive 60) · ×1
  • ItemsControlEx.ItemsControlEx_PreviewKeyDown (cognitive 60) source/Playnite.FullscreenApp/Controls/ItemsControlEx.cs:38 — ItemsControlEx.ItemsControlEx_PreviewKeyDown has cognitive complexity 60 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · EmulatorScanner.SearchForEmulators (cognitive 57) · ×1
  • EmulatorScanner.SearchForEmulators (cognitive 57) source/Playnite/Emulators/Scanner.cs:59 — EmulatorScanner.SearchForEmulators has cognitive complexity 57 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TGA.LoadFunc (cognitive 54) · ×1
  • TGA.LoadFunc (cognitive 54) source/Playnite/Common/TGASharpLib.cs:5138 — TGA.LoadFunc has cognitive complexity 54 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · Main.OnApplyTemplate (cognitive 49) · ×1
  • Main.OnApplyTemplate (cognitive 49) source/Playnite.FullscreenApp/Controls/Views/Main.cs:230 — Main.OnApplyTemplate has cognitive complexity 49 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GamesEditor.Controllers_Stopped (cognitive 48) · ×1
  • GamesEditor.Controllers_Stopped (cognitive 48) source/Playnite/GamesEditor.cs:1421 — GamesEditor.Controllers_Stopped has cognitive complexity 48 (threshold 15). Of this number, 28 points are the body's own statements and 20 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · Backup.RestoreBackup (cognitive 47) · ×1
  • Backup.RestoreBackup (cognitive 47) source/Playnite/Backup.cs:212 — Backup.RestoreBackup has cognitive complexity 47 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MenuItems.GetSearchGameMenuItems (cognitive 47) · ×1
  • MenuItems.GetSearchGameMenuItems (cognitive 47) source/Playnite/MenuItems.cs:164 — MenuItems.GetSearchGameMenuItems has cognitive complexity 47 (threshold 15). Of this number, 44 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.
D2 · Cognitive Complexity · CloneObject.CopyProperties (cognitive 46) · ×1
  • CloneObject.CopyProperties (cognitive 46) source/Playnite/Common/Extensions/CloneObject.cs:113 — CloneObject.CopyProperties 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.
D2 · Cognitive Complexity · GameScanner.LookupGameInDb (cognitive 46) · ×1
  • GameScanner.LookupGameInDb (cognitive 46) source/Playnite/Emulators/Scanner.cs:1020 — GameScanner.LookupGameInDb 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.
D2 · Cognitive Complexity · DesktopAppViewModel.OnFileDropped (cognitive 45) · ×1
  • DesktopAppViewModel.OnFileDropped (cognitive 45) source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:842 — DesktopAppViewModel.OnFileDropped has cognitive complexity 45 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PlayniteApplication.PipeService_CommandExecuted (cognitive 45) · ×1
  • PlayniteApplication.PipeService_CommandExecuted (cognitive 45) source/Playnite/App/PlayniteApplication.cs:799 — PlayniteApplication.PipeService_CommandExecuted has cognitive complexity 45 (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.
D2 · Cognitive Complexity · GamesEditor.PlayGame (cognitive 45) · ×1
  • GamesEditor.PlayGame (cognitive 45) source/Playnite/GamesEditor.cs:189 — GamesEditor.PlayGame has cognitive complexity 45 (threshold 15). Of this number, 44 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.
D2 · Cognitive Complexity · MainMenu.AddExtensionItems (cognitive 44) · ×1
  • MainMenu.AddExtensionItems (cognitive 44) source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:299 — MainMenu.AddExtensionItems has cognitive complexity 44 (threshold 15). Of this number, 39 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExtensionsMenuViewModels.ExtensionsMenuViewModels.ctor (cognitive 44) · ×1
  • ExtensionsMenuViewModels.ExtensionsMenuViewModels.ctor (cognitive 44) source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:222 — ExtensionsMenuViewModels.ExtensionsMenuViewModels.ctor has cognitive complexity 44 (threshold 15). Of this number, 40 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Backup.BackupData (cognitive 44) · ×1
  • Backup.BackupData (cognitive 44) source/Playnite/Backup.cs:73 — Backup.BackupData 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.
D2 · Cognitive Complexity · GenericPlayController.StartEmulator (cognitive 44) · ×1
  • GenericPlayController.StartEmulator (cognitive 44) source/Playnite/Controllers/GenericGameController.cs:72 — GenericPlayController.StartEmulator has cognitive complexity 44 (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.
D2 · Cognitive Complexity · MetadataDownloader.ProcessField (cognitive 44) · ×1
  • MetadataDownloader.ProcessField (cognitive 44) source/Playnite/Metadata/MetadataDownloader.cs:136 — MetadataDownloader.ProcessField 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.
D2 · Cognitive Complexity · GameEditViewModel.GetOrGenerateNewFieldItem (cognitive 43) · ×1
  • GameEditViewModel.GetOrGenerateNewFieldItem (cognitive 43) source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:406 — GameEditViewModel.GetOrGenerateNewFieldItem has cognitive complexity 43 (threshold 15). Of this number, 41 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · DatabaseExplorer.LoadValues (cognitive 43) · ×1
  • DatabaseExplorer.LoadValues (cognitive 43) source/Playnite/Database/DatabaseExplorer.cs:723 — DatabaseExplorer.LoadValues 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.
D2 · Cognitive Complexity · GamesEditor.CalculateGameSize (cognitive 42) · ×1
  • GamesEditor.CalculateGameSize (cognitive 42) source/Playnite/GamesEditor.cs:566 — GamesEditor.CalculateGameSize 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.
D2 · Cognitive Complexity · TGA.SaveFunc (cognitive 40) · ×1
  • TGA.SaveFunc (cognitive 40) source/Playnite/Common/TGASharpLib.cs:5517 — TGA.SaveFunc 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.
D2 · Cognitive Complexity · ImageSourceManager.GetImage (cognitive 40) · ×1
  • ImageSourceManager.GetImage (cognitive 40) source/Playnite/ImageSourceManager.cs:160 — ImageSourceManager.GetImage 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.
D2 · Cognitive Complexity · PlayniteApplication.Application_Startup (cognitive 39) · ×1
  • PlayniteApplication.Application_Startup (cognitive 39) source/Playnite/App/PlayniteApplication.cs:618 — PlayniteApplication.Application_Startup has cognitive complexity 39 (threshold 15). Of this number, 37 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.
D2 · Cognitive Complexity · Themes.UpdateTheme (cognitive 39) · ×1
  • Themes.UpdateTheme (cognitive 39) REDACTED:272 — Themes.UpdateTheme has cognitive complexity 39 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · GameMenu.AddExtensionItems (cognitive 38) · ×1
  • GameMenu.AddExtensionItems (cognitive 38) source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:580 — GameMenu.AddExtensionItems has cognitive complexity 38 (threshold 15). Of this number, 33 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BitmapExtensions.BitmapFromStream (cognitive 37) · ×1
  • BitmapExtensions.BitmapFromStream (cognitive 37) source/Playnite/Common/Extensions/BitmapExtensions.cs:262 — BitmapExtensions.BitmapFromStream 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.
D2 · Cognitive Complexity · DatabaseFilter.UpdateAllCollections (cognitive 37) · ×1
  • DatabaseFilter.UpdateAllCollections (cognitive 37) source/Playnite/Database/DatabaseFilter.cs:375 — DatabaseFilter.UpdateAllCollections has cognitive complexity 37 (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.
D2 · Cognitive Complexity · EmulatedGamesImportViewModel.StartScan (cognitive 36) · ×1
  • EmulatedGamesImportViewModel.StartScan (cognitive 36) source/Playnite.DesktopApp/ViewModels/EmulatedGamesImportViewModel.cs:331 — EmulatedGamesImportViewModel.StartScan has cognitive complexity 36 (threshold 15). Of this number, 28 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExtensionsMenuViewModels.ExtensionsMenuViewModels.ctor (cognitive 36) · ×1
  • ExtensionsMenuViewModels.ExtensionsMenuViewModels.ctor (cognitive 36) source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:83 — ExtensionsMenuViewModels.ExtensionsMenuViewModels.ctor has cognitive complexity 36 (threshold 15). Of this number, 32 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FullscreenAppViewModel.Fullscreen_PropertyChanged (cognitive 36) · ×1
  • FullscreenAppViewModel.Fullscreen_PropertyChanged (cognitive 36) source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel.cs:595 — FullscreenAppViewModel.Fullscreen_PropertyChanged 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.
D2 · Cognitive Complexity · FadeImage.LoadNewSource (cognitive 36) · ×1
  • FadeImage.LoadNewSource (cognitive 36) source/Playnite/Controls/FadeImage.xaml.cs:259 — FadeImage.LoadNewSource has cognitive complexity 36 (threshold 15). Of this number, 32 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SdkHelpers.ResolveUiItemIcon (cognitive 36) · ×1
  • SdkHelpers.ResolveUiItemIcon (cognitive 36) source/Playnite/SdkHelpers.cs:23 — SdkHelpers.ResolveUiItemIcon 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.
D2 · Cognitive Complexity · PlayniteSettings.LoadSettings (cognitive 35) · ×1
  • PlayniteSettings.LoadSettings (cognitive 35) source/Playnite/Settings/PlayniteSettings.cs:2388 — PlayniteSettings.LoadSettings 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.
D2 · Cognitive Complexity · CategoryConfigViewModel.SetCategoryStates (cognitive 34) · ×1
  • CategoryConfigViewModel.SetCategoryStates (cognitive 34) source/Playnite.DesktopApp/ViewModels/CategoryConfigViewModel.cs:205 — CategoryConfigViewModel.SetCategoryStates 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.
D2 · Cognitive Complexity · StatisticsViewModel.FillData (cognitive 33) · ×1
  • StatisticsViewModel.FillData (cognitive 33) source/Playnite.DesktopApp/ViewModels/StatisticsViewModel.cs:325 — StatisticsViewModel.FillData has cognitive complexity 33 (threshold 15). Of this number, 30 points are the body's own statements and 3 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.
D2 · Cognitive Complexity · FullscreenAppViewModel.InitializeCommands (cognitive 33) · ×1
  • FullscreenAppViewModel.InitializeCommands (cognitive 33) source/Playnite.FullscreenApp/ViewModels/FullscreenAppViewModel_Commands.cs:45 — FullscreenAppViewModel.InitializeCommands has cognitive complexity 33 (threshold 15). None of this is in the body itself: all 33 points belong to 12 function literals inside it that branch (lines 56, 205, 266, …). 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.
D2 · Cognitive Complexity · GameExtensions.GetGameFromExecutable (cognitive 33) · ×1
  • GameExtensions.GetGameFromExecutable (cognitive 33) source/Playnite/Extensions/GameExtensions.cs:58 — GameExtensions.GetGameFromExecutable has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ThemeFile.GetFilePath (cognitive 33) · ×1
  • ThemeFile.GetFilePath (cognitive 33) REDACTED:107 — ThemeFile.GetFilePath 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.
D2 · Cognitive Complexity · Programs.GetUWPApps (cognitive 32) · ×1
  • Programs.GetUWPApps (cognitive 32) REDACTED:299 — Programs.GetUWPApps has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThemeManager.GetAvailableThemes (cognitive 32) · ×1
  • ThemeManager.GetAvailableThemes (cognitive 32) source/Playnite/Themes.cs:237 — ThemeManager.GetAvailableThemes has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · GameScannerConfig.CopyDiffTo (cognitive 32) · ×1
  • GameScannerConfig.CopyDiffTo (cognitive 32) source/PlayniteSDK/Models/GameScannerConfig.cs:249 — GameScannerConfig.CopyDiffTo has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirstTimeStartupViewModel.NavigateNext (cognitive 31) · ×1
  • FirstTimeStartupViewModel.NavigateNext (cognitive 31) source/Playnite.DesktopApp/ViewModels/FirstTimeStartupViewModel.cs:190 — FirstTimeStartupViewModel.NavigateNext has cognitive complexity 31 (threshold 15). Of this number, 21 points are the body's own statements and 10 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileReaderV7.GetDocuments (cognitive 31) · ×1
  • FileReaderV7.GetDocuments (cognitive 31) source/Playnite/Database/Collections/LiteDBFileReaderV7.cs:653 — FileReaderV7.GetDocuments 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.
D2 · Cognitive Complexity · GameDatabase.AddFile (cognitive 31) · ×1
  • GameDatabase.AddFile (cognitive 31) source/Playnite/Database/GameDatabase.cs:833 — GameDatabase.AddFile has cognitive complexity 31 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ScannedGame.ToGame (cognitive 31) · ×1
  • ScannedGame.ToGame (cognitive 31) source/Playnite/Emulators/Scanner.cs:1394 — ScannedGame.ToGame 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.
D2 · Cognitive Complexity · FilterSettings.ClearFilters (cognitive 31) · ×1
  • FilterSettings.ClearFilters (cognitive 31) source/Playnite/Settings/FilterSettings.cs:956 — FilterSettings.ClearFilters has cognitive complexity 31 (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.
D2 · Cognitive Complexity · GamesGridView.GetColumn (cognitive 30) · ×1
  • GamesGridView.GetColumn (cognitive 30) source/Playnite.DesktopApp/Controls/GamesGridView.xaml.cs:208 — GamesGridView.GetColumn has cognitive complexity 30 (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.
D2 · Cognitive Complexity · ControlTemplateTools.InitializePluginControls (cognitive 30) · ×1
  • ControlTemplateTools.InitializePluginControls (cognitive 30) source/Playnite/ControlTemplateTools.cs:19 — ControlTemplateTools.InitializePluginControls 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.
D2 · Cognitive Complexity · GamesCollectionViewEntry.GetAdvancedGroupedEntry (cognitive 30) · ×1
  • GamesCollectionViewEntry.GetAdvancedGroupedEntry (cognitive 30) source/Playnite/GamesCollectionViewEntry.cs:273 — GamesCollectionViewEntry.GetAdvancedGroupedEntry 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.
D2 · Cognitive Complexity · ExtensionFactory.LoadPlugins (cognitive 30) · ×1
  • ExtensionFactory.LoadPlugins (cognitive 30) source/Playnite/Plugins/ExtensionFactory.cs:390 — ExtensionFactory.LoadPlugins 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.
D2 · Cognitive Complexity · FilterSettings.ApplyFilter (cognitive 30) · ×1
  • FilterSettings.ApplyFilter (cognitive 30) source/Playnite/Settings/FilterSettings.cs:1221 — FilterSettings.ApplyFilter has cognitive complexity 30 (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.
D2 · Cognitive Complexity · ThemeManager.ApplyTheme (cognitive 30) · ×1
  • ThemeManager.ApplyTheme (cognitive 30) source/Playnite/Themes.cs:93 — ThemeManager.ApplyTheme 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.
D2 · Cognitive Complexity · DesktopCollectionView.Database_GamesCollectionChanged (cognitive 29) · ×1
  • DesktopCollectionView.Database_GamesCollectionChanged (cognitive 29) source/Playnite.DesktopApp/DesktopCollectionView.cs:568 — DesktopCollectionView.Database_GamesCollectionChanged 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.
D2 · Cognitive Complexity · CategoryConfigViewModel.SetCategories (cognitive 29) · ×1
  • CategoryConfigViewModel.SetCategories (cognitive 29) source/Playnite.DesktopApp/ViewModels/CategoryConfigViewModel.cs:142 — CategoryConfigViewModel.SetCategories has cognitive complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · GameTools.GetMultiGameEditObject (cognitive 29) · ×1
  • GameTools.GetMultiGameEditObject (cognitive 29) source/Playnite/GameTools.cs:28 — GameTools.GetMultiGameEditObject has cognitive complexity 29 (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.
D2 · Cognitive Complexity · ExtensionFactory.GetInstalledManifests (cognitive 29) · ×1
  • ExtensionFactory.GetInstalledManifests (cognitive 29) source/Playnite/Plugins/ExtensionFactory.cs:231 — ExtensionFactory.GetInstalledManifests 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.
D2 · Cognitive Complexity · DatParser.ParseProperty (cognitive 29) · ×1
  • DatParser.ParseProperty (cognitive 29) REDACTED:129 — DatParser.ParseProperty 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.
D2 · Cognitive Complexity · GameEditViewModel.LoadNewMetadata (cognitive 28) · ×1
  • GameEditViewModel.LoadNewMetadata (cognitive 28) source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:252 — GameEditViewModel.LoadNewMetadata has cognitive complexity 28 (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.
D2 · Cognitive Complexity · MetadataComparisonViewModel.ConfirmDialog (cognitive 28) · ×1
  • MetadataComparisonViewModel.ConfirmDialog (cognitive 28) source/Playnite.DesktopApp/ViewModels/MetadataComparisonViewModel.cs:264 — MetadataComparisonViewModel.ConfirmDialog has cognitive complexity 28 (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.
D2 · Cognitive Complexity · GenericPlayController.StartTracking (cognitive 28) · ×1
  • GenericPlayController.StartTracking (cognitive 28) source/Playnite/Controllers/GenericGameController.cs:670 — GenericPlayController.StartTracking has cognitive complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to one function literal inside it that branches (line 684). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · FilterMatcher.Match (cognitive 28) · ×1
  • FilterMatcher.Match (cognitive 28) source/Playnite/Database/GameDatabase_Filters.cs:61 — FilterMatcher.Match has cognitive complexity 28 (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.
D2 · Cognitive Complexity · MenuItems.GetSearchExtensionsMainMenuItem (cognitive 28) · ×1
  • MenuItems.GetSearchExtensionsMainMenuItem (cognitive 28) source/Playnite/MenuItems.cs:83 — MenuItems.GetSearchExtensionsMainMenuItem 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.
D2 · Cognitive Complexity · GameMenu.InitializeItems (cognitive 27) · ×1
  • GameMenu.InitializeItems (cognitive 27) source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:105 — GameMenu.InitializeItems has cognitive complexity 27 (threshold 15). Of this number, 23 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · GameEditViewModel.Init (cognitive 27) · ×1
  • GameEditViewModel.Init (cognitive 27) source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:319 — GameEditViewModel.Init 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.
D2 · Cognitive Complexity · GameDatabase.LoadUsedItems (cognitive 27) · ×1
  • GameDatabase.LoadUsedItems (cognitive 27) source/Playnite/Database/GameDatabase.cs:310 — GameDatabase.LoadUsedItems 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.
D2 · Cognitive Complexity · GridViewPanel.MeasureOverride (cognitive 26) · ×1
  • GridViewPanel.MeasureOverride (cognitive 26) source/Playnite.DesktopApp/Controls/GridViewPanel.cs:111 — GridViewPanel.MeasureOverride 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.
D2 · Cognitive Complexity · PlayniteApplication.CheckOtherInstances (cognitive 26) · ×1
  • PlayniteApplication.CheckOtherInstances (cognitive 26) source/Playnite/App/PlayniteApplication.cs:962 — PlayniteApplication.CheckOtherInstances has cognitive complexity 26 (threshold 15). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 971, 1009). 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.
D2 · Cognitive Complexity · GenericPlayController.StartEmulatorProcess (cognitive 26) · ×1
  • GenericPlayController.StartEmulatorProcess (cognitive 26) source/Playnite/Controllers/GenericGameController.cs:221 — GenericPlayController.StartEmulatorProcess 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.
D2 · Cognitive Complexity · Diagnostic.CreateDiagPackage (cognitive 26) · ×1
  • Diagnostic.CreateDiagPackage (cognitive 26) source/Playnite/Diagnostic.cs:62 — Diagnostic.CreateDiagPackage has cognitive complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
D2 · Cognitive Complexity · GameTaskView.ComboEmulatorConfig_SelectionChanged (cognitive 25) · ×1
  • GameTaskView.ComboEmulatorConfig_SelectionChanged (cognitive 25) source/Playnite.DesktopApp/Controls/GameTaskView.xaml.cs:388 — GameTaskView.ComboEmulatorConfig_SelectionChanged has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SettingsViewModel.ConfirmDialog (cognitive 25) · ×1
  • SettingsViewModel.ConfirmDialog (cognitive 25) REDACTED:542 — SettingsViewModel.ConfirmDialog 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.
D2 · Cognitive Complexity · PlayniteApplication.CurrentDomain_UnhandledException (cognitive 25) · ×1
  • PlayniteApplication.CurrentDomain_UnhandledException (cognitive 25) source/Playnite/App/PlayniteApplication.cs:493 — PlayniteApplication.CurrentDomain_UnhandledException 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.
D2 · Cognitive Complexity · TGA.RLE_Encode (cognitive 25) · ×1
  • TGA.RLE_Encode (cognitive 25) source/Playnite/Common/TGASharpLib.cs:5609 — TGA.RLE_Encode 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.
D2 · Cognitive Complexity · GameScanner.FilterScriptScanResults (cognitive 25) · ×1
  • GameScanner.FilterScriptScanResults (cognitive 25) source/Playnite/Emulators/Scanner.cs:1194 — GameScanner.FilterScriptScanResults 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.
D2 · Cognitive Complexity · ExtensionInstaller.InstallExtensionQueue (cognitive 25) · ×1
  • ExtensionInstaller.InstallExtensionQueue (cognitive 25) source/Playnite/Plugins/ExtensionInstaller.cs:118 — ExtensionInstaller.InstallExtensionQueue 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.
D2 · Cognitive Complexity · PlayniteApplication.ProcessUriRequest (cognitive 24) · ×1
  • PlayniteApplication.ProcessUriRequest (cognitive 24) source/Playnite/App/PlayniteApplication.cs:1151 — PlayniteApplication.ProcessUriRequest 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.
D2 · Cognitive Complexity · StringExtensions.GetJaroWinklerSimilarity (cognitive 24) · ×1
  • StringExtensions.GetJaroWinklerSimilarity (cognitive 24) source/Playnite/Common/Extensions/StringExtensions.cs:467 — StringExtensions.GetJaroWinklerSimilarity 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.
D2 · Cognitive Complexity · FileReaderV7.ReadPage (cognitive 24) · ×1
  • FileReaderV7.ReadPage (cognitive 24) source/Playnite/Database/Collections/LiteDBFileReaderV7.cs:714 — FileReaderV7.ReadPage 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.
D2 · Cognitive Complexity · GameScanner.ScanDirectory (cognitive 24) · ×1
  • GameScanner.ScanDirectory (cognitive 24) source/Playnite/Emulators/Scanner.cs:521 — GameScanner.ScanDirectory has cognitive complexity 24 (threshold 15). Of this number, 22 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.
D2 · Cognitive Complexity · SortableNameConverter.ConvertRomanNumeralToInt (cognitive 24) · ×1
  • SortableNameConverter.ConvertRomanNumeralToInt (cognitive 24) source/Playnite/SortableNameConverter.cs:139 — SortableNameConverter.ConvertRomanNumeralToInt 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.
D2 · Cognitive Complexity · MainViewModelBase.AddFilterPreset (cognitive 24) · ×1
  • MainViewModelBase.AddFilterPreset (cognitive 24) source/Playnite/ViewModels/MainViewModelBase.cs:426 — MainViewModelBase.AddFilterPreset 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.
D2 · Cognitive Complexity · SearchViewModel.TextBoxKeyDown (cognitive 24) · ×1
  • SearchViewModel.TextBoxKeyDown (cognitive 24) source/Playnite/ViewModels/SearchViewModel.cs:814 — SearchViewModel.TextBoxKeyDown 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.
D2 · Cognitive Complexity · ImportableProgram.IconSource.get (cognitive 23) · ×1
  • ImportableProgram.IconSource.get (cognitive 23) source/Playnite.DesktopApp/ViewModels/InstalledGamesViewModel.cs:52 — ImportableProgram.IconSource.get 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.
D2 · Cognitive Complexity · SearchViewModel.PerformSearch (cognitive 23) · ×1
  • SearchViewModel.PerformSearch (cognitive 23) source/Playnite/ViewModels/SearchViewModel.cs:717 — SearchViewModel.PerformSearch has cognitive complexity 23 (threshold 15). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 736). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · BsonReader.ReadElement (cognitive 22) · ×1
  • BsonReader.ReadElement (cognitive 22) source/Playnite/Database/Collections/LiteDBFileReaderV7.cs:80 — BsonReader.ReadElement 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.
D2 · Cognitive Complexity · EmulatorsViewModel.CheckUnsavedChanges (cognitive 21) · ×1
  • EmulatorsViewModel.CheckUnsavedChanges (cognitive 21) source/Playnite.DesktopApp/ViewModels/EmulatorsViewModel.cs:368 — EmulatorsViewModel.CheckUnsavedChanges 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.
D2 · Cognitive Complexity · WindowBase.OnApplyTemplate (cognitive 21) · ×1
  • WindowBase.OnApplyTemplate (cognitive 21) source/Playnite/Controls/WindowBase.cs:304 — WindowBase.OnApplyTemplate 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.
D2 · Cognitive Complexity · GenericTypeConverter.Convert (cognitive 21) · ×1
  • GenericTypeConverter.Convert (cognitive 21) source/Playnite/Converters/GenericTypeConverter.cs:22 — GenericTypeConverter.Convert 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.
D2 · Cognitive Complexity · ExtensionFactory.LoadPlugins (cognitive 21) · ×1
  • ExtensionFactory.LoadPlugins (cognitive 21) source/Playnite/Plugins/ExtensionFactory.cs:461 — ExtensionFactory.LoadPlugins has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · SortableNameConverter.Convert (cognitive 21) · ×1
  • SortableNameConverter.Convert (cognitive 21) source/Playnite/SortableNameConverter.cs:66 — SortableNameConverter.Convert has cognitive complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 75). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ThemeManager.ApplyFullscreenButtonPrompts (cognitive 21) · ×1
  • ThemeManager.ApplyFullscreenButtonPrompts (cognitive 21) source/Playnite/Themes.cs:54 — ThemeManager.ApplyFullscreenButtonPrompts 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.
D2 · Cognitive Complexity · DatabaseFieldsManagerViewModel.UpdatePlatformsCollection (cognitive 20) · ×1
  • DatabaseFieldsManagerViewModel.UpdatePlatformsCollection (cognitive 20) source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:740 — DatabaseFieldsManagerViewModel.UpdatePlatformsCollection 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.
D2 · Cognitive Complexity · DefaultSearchContext.GetSearchResults (cognitive 20) · ×1
  • DefaultSearchContext.GetSearchResults (cognitive 20) source/Playnite/ViewModels/SearchViewModel.cs:128 — DefaultSearchContext.GetSearchResults has cognitive complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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.
D2 · Cognitive Complexity · PlayniteApplication.CheckForUpdates (cognitive 19) · ×1
  • PlayniteApplication.CheckForUpdates (cognitive 19) source/Playnite/App/PlayniteApplication.cs:1378 — PlayniteApplication.CheckForUpdates 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.
D2 · Cognitive Complexity · FocusBahaviors.FocusBindingPropertyChanged (cognitive 19) · ×1
  • FocusBahaviors.FocusBindingPropertyChanged (cognitive 19) source/Playnite/Behaviors/FocusBahaviors.cs:36 — FocusBahaviors.FocusBindingPropertyChanged 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.
D2 · Cognitive Complexity · TGA.GetInfo (cognitive 19) · ×1
  • TGA.GetInfo (cognitive 19) source/Playnite/Common/TGASharpLib.cs:4703 — TGA.GetInfo 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.
D2 · Cognitive Complexity · Xml.AreEqual (cognitive 19) · ×1
  • Xml.AreEqual (cognitive 19) source/Playnite/Common/Xml.cs:14 — Xml.AreEqual 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.
D2 · Cognitive Complexity · GameDatabase.OpenDatabase (cognitive 19) · ×1
  • GameDatabase.OpenDatabase (cognitive 19) source/Playnite/Database/GameDatabase.cs:502 — GameDatabase.OpenDatabase 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.
D2 · Cognitive Complexity · GamesEditor.RemoveGames (cognitive 19) · ×1
  • GamesEditor.RemoveGames (cognitive 19) source/Playnite/GamesEditor.cs:938 — GamesEditor.RemoveGames has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Game.GetScoreGroup (cognitive 19) · ×1
  • Game.GetScoreGroup (cognitive 19) source/PlayniteSDK/Models/Game.cs:1597 — Game.GetScoreGroup 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.
D2 · Cognitive Complexity · GameMenu.InitializeItems (cognitive 18) · ×1
  • GameMenu.InitializeItems (cognitive 18) source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:461 — GameMenu.InitializeItems 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.
D2 · Cognitive Complexity · GameEditViewModel.ConvertGameInfo (cognitive 18) · ×1
  • GameEditViewModel.ConvertGameInfo (cognitive 18) source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:481 — GameEditViewModel.ConvertGameInfo 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.
D2 · Cognitive Complexity · InstalledGamesViewModel.ConfirmDialog (cognitive 18) · ×1
  • InstalledGamesViewModel.ConfirmDialog (cognitive 18) source/Playnite.DesktopApp/ViewModels/InstalledGamesViewModel.cs:301 — InstalledGamesViewModel.ConfirmDialog 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.
D2 · Cognitive Complexity · ToolsConfigViewModel.AddAppFromExe (cognitive 18) · ×1
  • ToolsConfigViewModel.AddAppFromExe (cognitive 18) source/Playnite.DesktopApp/ViewModels/ToolsConfigViewModel.cs:185 — ToolsConfigViewModel.AddAppFromExe has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · FullscreenApplication.FullscreenApplication_PropertyChanged (cognitive 18) · ×1
  • FullscreenApplication.FullscreenApplication_PropertyChanged (cognitive 18) source/Playnite.FullscreenApp/FullscreenApplication.cs:142 — FullscreenApplication.FullscreenApplication_PropertyChanged has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · StringExtensions.IsStartOfStringAcronym (cognitive 18) · ×1
  • StringExtensions.IsStartOfStringAcronym (cognitive 18) source/Playnite/Common/Extensions/StringExtensions.cs:105 — StringExtensions.IsStartOfStringAcronym 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.
D2 · Cognitive Complexity · GameScanner.ParseExclusions (cognitive 18) · ×1
  • GameScanner.ParseExclusions (cognitive 18) source/Playnite/Emulators/Scanner.cs:401 — GameScanner.ParseExclusions 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.
D2 · Cognitive Complexity · BindingExtension.ProvideValue (cognitive 18) · ×1
  • BindingExtension.ProvideValue (cognitive 18) source/Playnite/Extensions/Markup/BindingExtension.cs:36 — BindingExtension.ProvideValue 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.
D2 · Cognitive Complexity · User32.EnablePrivilege (cognitive 18) · ×1
  • User32.EnablePrivilege (cognitive 18) source/Playnite/Native/User32.cs:171 — User32.EnablePrivilege has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MainViewModelBase.UpdateLibraryData (cognitive 18) · ×1
  • MainViewModelBase.UpdateLibraryData (cognitive 18) source/Playnite/ViewModels/MainViewModelBase.cs:758 — MainViewModelBase.UpdateLibraryData has cognitive 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 one function literal inside it that branches (line 771). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SearchViewModel.TextBoxKeyUp (cognitive 18) · ×1
  • SearchViewModel.TextBoxKeyUp (cognitive 18) source/Playnite/ViewModels/SearchViewModel.cs:883 — SearchViewModel.TextBoxKeyUp 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.
D2 · Cognitive Complexity · Themes.PackageTheme (cognitive 18) · ×1
  • Themes.PackageTheme (cognitive 18) REDACTED:171 — Themes.PackageTheme 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.
D2 · Cognitive Complexity · DatabaseFieldsManagerViewModel.RemoveUnusedPlatforms (cognitive 17) · ×1
  • DatabaseFieldsManagerViewModel.RemoveUnusedPlatforms (cognitive 17) source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:870 — DatabaseFieldsManagerViewModel.RemoveUnusedPlatforms 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.
D2 · Cognitive Complexity · EmulatedGamesImportViewModel.ExcludeDirectories (cognitive 17) · ×1
  • EmulatedGamesImportViewModel.ExcludeDirectories (cognitive 17) source/Playnite.DesktopApp/ViewModels/EmulatedGamesImportViewModel.cs:577 — EmulatedGamesImportViewModel.ExcludeDirectories 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.
D2 · Cognitive Complexity · FullscreenTilePanel.MeasureOverride (cognitive 17) · ×1
  • FullscreenTilePanel.MeasureOverride (cognitive 17) source/Playnite.FullscreenApp/Controls/FullscreenTilePanel.cs:239 — FullscreenTilePanel.MeasureOverride has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FullscreenTilePanel.MakeVisible (cognitive 17) · ×1
  • FullscreenTilePanel.MakeVisible (cognitive 17) source/Playnite.FullscreenApp/Controls/FullscreenTilePanel.cs:656 — FullscreenTilePanel.MakeVisible 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.
D2 · Cognitive Complexity · Programs.GetShortcutProgramsFromFolder (cognitive 17) · ×1
  • Programs.GetShortcutProgramsFromFolder (cognitive 17) REDACTED:157 — Programs.GetShortcutProgramsFromFolder has cognitive complexity 17 (threshold 15). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 159). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · GamesCollection.Update (cognitive 17) · ×1
  • GamesCollection.Update (cognitive 17) source/Playnite/Database/Collections/GamesCollection.cs:180 — GamesCollection.Update 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.
D2 · Cognitive Complexity · Exceptions.GetExceptionInfoImpl (cognitive 17) · ×1
  • Exceptions.GetExceptionInfoImpl (cognitive 17) source/Playnite/Exceptions.cs:71 — Exceptions.GetExceptionInfoImpl has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GameExtensions.GetRawExecutablePath (cognitive 17) · ×1
  • GameExtensions.GetRawExecutablePath (cognitive 17) source/Playnite/Extensions/GameExtensions.cs:294 — GameExtensions.GetRawExecutablePath has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GamesEditor.RemoveGame (cognitive 17) · ×1
  • GamesEditor.RemoveGame (cognitive 17) source/Playnite/GamesEditor.cs:873 — GamesEditor.RemoveGame 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.
D2 · Cognitive Complexity · GameControllerManager.ShouldResendKey (cognitive 17) · ×1
  • GameControllerManager.ShouldResendKey (cognitive 17) source/Playnite/Input/GameController.cs:383 — GameControllerManager.ShouldResendKey has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · MenuHelpers.GenerateMenuParents (cognitive 17) · ×1
  • MenuHelpers.GenerateMenuParents (cognitive 17) source/Playnite/MenuHelpers.cs:75 — MenuHelpers.GenerateMenuParents 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.
D2 · Cognitive Complexity · ExtensionFactory.LoadScripts (cognitive 17) · ×1
  • ExtensionFactory.LoadScripts (cognitive 17) source/Playnite/Plugins/ExtensionFactory.cs:322 — ExtensionFactory.LoadScripts has cognitive 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DesktopAppViewModel.InitializeCommands (cognitive 16) · ×1
  • DesktopAppViewModel.InitializeCommands (cognitive 16) source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel_Commands.cs:101 — DesktopAppViewModel.InitializeCommands has cognitive complexity 16 (threshold 15). None of this is in the body itself: all 16 points belong to 9 function literals inside it that branch (lines 149, 349, 374, …). 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.
D2 · Cognitive Complexity · EmulatedGamesImportViewModel.ImportGames (cognitive 16) · ×1
  • EmulatedGamesImportViewModel.ImportGames (cognitive 16) source/Playnite.DesktopApp/ViewModels/EmulatedGamesImportViewModel.cs:466 — EmulatedGamesImportViewModel.ImportGames has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FullscreenApplication.SDLEventLoop (cognitive 16) · ×1
  • FullscreenApplication.SDLEventLoop (cognitive 16) source/Playnite.FullscreenApp/FullscreenApplication.cs:307 — FullscreenApplication.SDLEventLoop has cognitive complexity 16 (threshold 15). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 312). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Addons.CheckAddonsForUpdate (cognitive 16) · ×1
  • Addons.CheckAddonsForUpdate (cognitive 16) source/Playnite/Addons/Addons.cs:63 — Addons.CheckAddonsForUpdate has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StringExtensions.GetLevenshteinDistance (cognitive 16) · ×1
  • StringExtensions.GetLevenshteinDistance (cognitive 16) source/Playnite/Common/Extensions/StringExtensions.cs:394 — StringExtensions.GetLevenshteinDistance 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.
D2 · Cognitive Complexity · GameControllerManager.ProcessButtonState (cognitive 16) · ×1
  • GameControllerManager.ProcessButtonState (cognitive 16) source/Playnite/Input/GameController.cs:432 — GameControllerManager.ProcessButtonState 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.
D2 · Cognitive Complexity · ExtensionFactory.GetManifestsFromPath (cognitive 16) · ×1
  • ExtensionFactory.GetManifestsFromPath (cognitive 16) source/Playnite/Plugins/ExtensionFactory.cs:173 — ExtensionFactory.GetManifestsFromPath has cognitive complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RandomGameSelectViewModel.PickGame (cognitive 16) · ×1
  • RandomGameSelectViewModel.PickGame (cognitive 16) source/Playnite/ViewModels/RandomGameSelectViewModel.cs:121 — RandomGameSelectViewModel.PickGame 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.
D2 · Cognitive Complexity · AppSoftware.CopyDiffTo (cognitive 16) · ×1
  • AppSoftware.CopyDiffTo (cognitive 16) source/PlayniteSDK/Models/AppSoftware.cs:147 — AppSoftware.CopyDiffTo 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.
D2 · Cognitive Complexity · GameAction.Equals (cognitive 16) · ×1
  • GameAction.Equals (cognitive 16) source/PlayniteSDK/Models/GameAction.cs:324 — GameAction.Equals 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.
D2 · Cognitive Complexity · DatParser.ParseGame (cognitive 16) · ×1
  • DatParser.ParseGame (cognitive 16) REDACTED:68 — DatParser.ParseGame 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: ExtensionFactory.cs ↔ PowerShellScript.cs source/Playnite/Plugins/ExtensionFactory.cs:1 — `source/Playnite/Plugins/ExtensionFactory.cs` and `source/Playnite/Scripting/PowerShell/PowerShellScript.cs` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `67f57e18` SDK: Added support for cancelling installation process from within In…; `78be2d30` SDK: Added OnGameStartupCancelled application event; `7ec2208a` Script extensions don't log into extension log file — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×1
  • Edited copy of a member (22 corresponding lines) source/Playnite.DesktopApp/DesktopCollectionView.cs:303 — source/Playnite.DesktopApp/DesktopCollectionView.cs:303-349 | source/Playnite.DesktopApp/DesktopCollectionView.cs:569-633 — 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 · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:581 — source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:581-691 | source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:300-418 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:87-219 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:225-369 | source/Playnite/MenuItems.cs:84-162 | source/Playnite/MenuItems.cs:165-335 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Duplicated block (69 lines × 2) · ×1
  • Duplicated block (69 lines × 2) source/Playnite.DesktopApp/ProgramEntry.cs:20 — source/Playnite.DesktopApp/ProgramEntry.cs:20-88 | source/Playnite.FullscreenApp/ProgramEntry.cs:20-88 — `source/Playnite.DesktopApp/ProgramEntry.cs` and `source/Playnite.FullscreenApp/ProgramEntry.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 69 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (65 lines × 2) · ×1
  • Duplicated block (65 lines × 2) source/Playnite/Database/OldModels/Ver2.cs:2231 — source/Playnite/Database/OldModels/Ver2.cs:2231-2295 | source/PlayniteSDK/Models/ScoreGroup.cs:38-102 — 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.
D4 · Code Duplication · Duplicated block (9–52 lines × 2) · ×1
  • Duplicated block (9–52 lines × 2) source/Playnite/API/PlayniteAPI.cs:28 — source/Playnite/API/PlayniteAPI.cs:28-36 | source/PlayniteSDK/IPlayniteAPI.cs:100-151 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `source/PlayniteSDK/IPlayniteAPI.cs:100` calls `ExpandGameVariables` and `source/Playnite/API/PlayniteAPI.cs:28` 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.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:604 — source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:604-632 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:115-143 — 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 `source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:604` 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.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:308 — source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:308-350 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:233-275 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:308` 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.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) source/Playnite/Database/OldModels/Ver2.cs:2139 — source/Playnite/Database/OldModels/Ver2.cs:2139-2179 | source/PlayniteSDK/Models/PlaytimeCategory.cs:15-55 — before extracting anything, compare `source/Playnite/Database/OldModels/Ver2.cs` and `source/PlayniteSDK/Models/PlaytimeCategory.cs` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) source/Playnite/Database/OldModels/Ver2.cs:1804 — source/Playnite/Database/OldModels/Ver2.cs:1804-1837 | source/PlayniteSDK/Models/GameAction.cs:326-359 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Ver2_GameAction` in one and `GameAction` 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.
D4 · Code Duplication · Duplicated block (32 lines × 3) · ×1
  • Duplicated block (32 lines × 3) source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs:167 — source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs:167-198 | source/Playnite.FullscreenApp/Controls/FilterEnumListSelection.cs:169-200 | source/Playnite.FullscreenApp/Controls/FilterStringListSelection.cs:152-183 — before extracting anything, compare `source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs` and `source/Playnite.FullscreenApp/Controls/FilterStringListSelection.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 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 `source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs:167` 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.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) source/Playnite.DesktopApp/ViewModels/GameDetailsViewModel.cs:92 — source/Playnite.DesktopApp/ViewModels/GameDetailsViewModel.cs:92-118 | source/Playnite.FullscreenApp/ViewModels/GameDetailsViewModel.cs:35-61 — 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.
D4 · Code Duplication · Duplicated block (21–25 lines × 4) · ×1
  • Duplicated block (21–25 lines × 4) source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:613 — source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:613-637 | source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:335-355 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:124-148 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:260-280 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:613` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:663 — source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:663-687 | source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:691-715 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:1678 — source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:1678-1700 | REDACTED:711-733 — 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 `source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:1678` 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 after the matched lines, `source/Playnite.DesktopApp/ViewModels/GameEditViewModel.cs:1702` calls `CalculateInstallSizeWithDialog`, `UpdateGameSizeWithDialog` and `REDACTED:734` 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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) source/Playnite.DesktopApp/DesktopCollectionView.cs:570 — source/Playnite.DesktopApp/DesktopCollectionView.cs:570-590 | source/Playnite.FullscreenApp/FullscreenCollectionView.cs:81-101 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite.DesktopApp/DesktopCollectionView.cs:570` 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.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:158 — source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:158-177 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:293-313 — both copies are in the same file, so extract the 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 `source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:158` 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.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) source/Playnite.DesktopApp/DesktopCollectionView.cs:319 — source/Playnite.DesktopApp/DesktopCollectionView.cs:319-338 | source/Playnite.DesktopApp/DesktopCollectionView.cs:598-617 — both copies are in the same file, so extract the 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 `source/Playnite.DesktopApp/DesktopCollectionView.cs:319` 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, `source/Playnite.DesktopApp/DesktopCollectionView.cs:317` calls `AddRange`, `SelectMany` and `source/Playnite.DesktopApp/DesktopCollectionView.cs:597` 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.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) source/Playnite/MenuItems.cs:141 — source/Playnite/MenuItems.cs:141-159 | source/Playnite/MenuItems.cs:304-323 — both copies are in the same file, so extract the 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 `source/Playnite/MenuItems.cs:141` 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.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) source/Playnite.DesktopApp/Controls/FilterSelectionBox.cs:153 — source/Playnite.DesktopApp/Controls/FilterSelectionBox.cs:153-170 | source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs:117-133 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `source/Playnite.DesktopApp/Controls/FilterSelectionBox.cs:170` calls `UpdateTextStatus` and `source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.cs:133` 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) source/Playnite.DesktopApp/Controls/FilterEnumSelectionBox.cs:127 — source/Playnite.DesktopApp/Controls/FilterEnumSelectionBox.cs:127-142 | source/Playnite.FullscreenApp/Controls/FilterEnumListSelection.cs:132-148 — 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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) source/Playnite/Converters/ListToStringConverter.cs:146 — source/Playnite/Converters/ListToStringConverter.cs:146-161 | source/Playnite/Converters/ListToStringConverter.cs:195-210 — both copies are in the same file, so extract the 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 `source/Playnite/Converters/ListToStringConverter.cs:146` 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.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) source/Playnite/Controllers/GenericGameController.cs:551 — source/Playnite/Controllers/GenericGameController.cs:551-563 | source/Playnite/Controllers/GenericGameController.cs:584-596 | source/Playnite/Controllers/GenericGameController.cs:634-646 — 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 `source/Playnite/Controllers/GenericGameController.cs:551` 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.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) source/Playnite.DesktopApp/DesktopApplication.cs:211 — source/Playnite.DesktopApp/DesktopApplication.cs:211-224 | source/Playnite.FullscreenApp/FullscreenApplication.cs:176-186 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `source/Playnite.FullscreenApp/FullscreenApplication.cs:188` calls `Close`, `TimeSpan` and `source/Playnite.DesktopApp/DesktopApplication.cs:226` 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.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:591 — source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:591-600 | source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:313-322 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:102-111 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:238-247 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite.DesktopApp/Controls/Menus/GameMenu.cs:591` 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.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:107 — source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:107-114 | source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:243-250 | source/Playnite/MenuItems.cs:111-118 | source/Playnite/MenuItems.cs:284-291 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite.FullscreenApp/ViewModels/ExtensionsMenuViewModels.cs:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) source/Playnite.DesktopApp/Controls/ComboBoxList.cs:134 — source/Playnite.DesktopApp/Controls/ComboBoxList.cs:134-140 | source/Playnite.DesktopApp/Controls/ComboBoxListBase.cs:69-76 | source/Playnite.DesktopApp/Controls/FilterSelectionBox.cs:40-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite.DesktopApp/Controls/ComboBoxList.cs:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `source/Playnite.DesktopApp/Controls/ComboBoxList.cs:140` calls `XAttribute`, `nameof` and `source/Playnite.DesktopApp/Controls/ComboBoxListBase.cs:76` 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.
D4 · Code Duplication · Duplicated block (5–8 lines × 8) · ×1
  • Duplicated block (5–8 lines × 8) source/Playnite/Database/DatabaseExplorer.cs:768 — source/Playnite/Database/DatabaseExplorer.cs:768-775 | source/Playnite/Database/DatabaseExplorer.cs:779-786 | source/Playnite/Database/DatabaseExplorer.cs:790-794 | source/Playnite/Database/DatabaseExplorer.cs:801-805 | source/Playnite/Database/DatabaseExplorer.cs:812-816 | source/Playnite/Database/DatabaseExplorer.cs:823-827 | source/Playnite/Database/DatabaseExplorer.cs:834-838 | source/Playnite/Database/DatabaseExplorer.cs:845-849 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite/Database/DatabaseExplorer.cs:768` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `source/Playnite/Database/DatabaseExplorer.cs:794` calls `AddRange`, `OrderBy`, `Select` and `source/Playnite/Database/DatabaseExplorer.cs:775` 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.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) source/Playnite/Diagnostic.cs:253 — source/Playnite/Diagnostic.cs:253-259 | source/Playnite/Diagnostic.cs:260-266 | source/Playnite/Diagnostic.cs:267-273 | source/Playnite/Diagnostic.cs:274-280 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) source/Playnite/Extensions/GameExtensions.cs:213 — source/Playnite/Extensions/GameExtensions.cs:213-219 | source/Playnite/Extensions/GameExtensions.cs:221-227 | source/Playnite/Extensions/GameExtensions.cs:268-274 — 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 `source/Playnite/Extensions/GameExtensions.cs:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) source/Playnite.DesktopApp/Controls/ComboBoxList.cs:134 — source/Playnite.DesktopApp/Controls/ComboBoxList.cs:134-138 | source/Playnite.DesktopApp/Controls/DdItemListSelectionBox.cs:132-136 | source/Playnite.DesktopApp/Controls/FilterSelectionBox.cs:40-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `source/Playnite.DesktopApp/Controls/ComboBoxList.cs:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `source/Playnite.DesktopApp/Controls/DdItemListSelectionBox.cs:138` calls `XAttribute`, `nameof` and `source/Playnite.DesktopApp/Controls/FilterSelectionBox.cs:46` 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.
D4 · Code Duplication · Duplicated block (71 lines × 3) · ×1
  • Duplicated block (71 lines × 3) source/Tools/Playnite.Toolbox/Templates/Extensions/CustomLibraryPlugin/_name_Settings.cs:17 — source/Tools/Playnite.Toolbox/Templates/Extensions/CustomLibraryPlugin/_name_Settings.cs:17-87 | source/Tools/Playnite.Toolbox/Templates/Extensions/CustomMetadataPlugin/_name_Settings.cs:17-87 | source/Tools/Playnite.Toolbox/Templates/Extensions/GenericPlugin/_name_Settings.cs:17-87 — `source/Tools/Playnite.Toolbox/Templates/Extensions/CustomLibraryPlugin/_name_Settings.cs` and `source/Tools/Playnite.Toolbox/Templates/Extensions/CustomMetadataPlugin/_name_Settings.cs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 1 separate duplicated blocks between them, totalling at least 71 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `source/Tools/Playnite.Toolbox/Templates/Extensions/CustomLibraryPlugin/_name_Settings.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.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) source/Playnite.DesktopApp/Controls/GameListItem.cs:49 — source/Playnite.DesktopApp/Controls/GameListItem.cs:49-57 | source/Playnite.DesktopApp/Controls/Views/ExplorerPanel.cs:41-49 | source/Playnite.DesktopApp/Controls/Views/FilterPanel.cs:51-59 | source/Playnite.DesktopApp/Controls/Views/NotificationPanel.cs:41-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) source/Playnite.DesktopApp/Controls/Menus/GroupSettingsMenu.cs:35 — source/Playnite.DesktopApp/Controls/Menus/GroupSettingsMenu.cs:35-39 | source/Playnite.DesktopApp/Controls/Menus/SortSettingsMenu.cs:35-39 | source/Playnite.DesktopApp/Controls/Menus/ViewSelectionMenu.cs:35-39 | source/Playnite.DesktopApp/Controls/Menus/ViewSettingsMenu.cs:36-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 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.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — no coverage collector is wired up — Coverage NOT MEASURED: `--collect:"XPlat Code Coverage"` names a data collector that ships in the `coverlet.collector` package, and this repository wires up none — no test project references it and no runsettings declares one. The absence of coverage here is therefore not evidence about the suite or about our analyzer environment: without a collector, `--collect` produces nothing even from a suite that builds and passes. Add a `coverlet.collector` PackageReference 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.
IC1 · Incompleteness & stubs · Skeleton type · ×1
  • Skeleton type — most members are unfinished source/Playnite/API/DesignData/DesignPlayniteAPI.cs:13 — `DesignPlayniteAPI` has 24 unfinished members out of 25 declared members (methods, properties, indexers and events, whether or not each carries a body) — a scaffolded type that was never implemented.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×1
  • Outbound HTTP without resilience source/Playnite/Common/Web/HttpDownloader.cs:17 — `new HttpClient()` 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.
S1 · Cryptographic Hygiene · Obsolete TLS/SSL protocol version enabled · ×1
  • Obsolete TLS/SSL protocol version enabled source/Playnite/App/PlayniteApplication.cs:107 — `SecurityProtocol` explicitly selects `SecurityProtocolType.Tls11`, a protocol version that is broken (SSL 2.0/3.0) or withdrawn (TLS 1.0/1.1, RFC 8996). Offering an obsolete version does not merely permit it — it is what a downgrade attack negotiates, so the weakest version on the list is the one that decides the connection's strength. Stop pinning versions here: leave the protocol unset (`SecurityProtocolType.SystemDefault`, or simply do not assign it) so the connection uses the OS policy and picks up TLS 1.3 and future versions without a code change. Where a version must be named explicitly, name `Tls12` and `Tls13` only.
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×1
  • NuGet dependencies are not locked — No packages.lock.json and no central package management — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
X15 · Unvalidated length from an untrusted reader · Length read from the parsed input is spent without ever being bounded · ×1
  • Length read from the parsed input is spent without ever being bounded source/Playnite/Common/TGASharpLib.cs:5227 — `NumberOfTags` is read from the stream being parsed at line 5225 (`ReadUInt16`), then used to size an array at line 5227 — and nowhere in this method is `NumberOfTags` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). A file the caller did not write therefore chooses the size directly: a value near `int.MaxValue` allocates until the process dies, and a value that overflows the cast to `int` goes negative and throws out of a parser whose failure path was written for malformed input, not for hostile input. Bound `NumberOfTags` against the bytes actually remaining in the stream before spending it.
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 source/Playnite/Common/Xml.cs:64 — `AreEqual` is public and takes the `XElement` from its caller, and it calls itself at line 64 with a child of the node it was given — and nowhere in `AreEqual` 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 `AreEqual` can intervene. Thread a depth argument through `AreEqual` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack.
Minor — 56 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×18
  • Duplicated predicate source/Playnite/Database/Collections/AppSoftwareCollection.cs:56 — `!dbItem.Icon.IsNullOrEmpty() && dbItem.Icon != item.Icon` appears character-identically in 3 files — source/Playnite/Database/Collections/AppSoftwareCollection.cs, source/Playnite/Database/Collections/GamesCollection.cs, source/Playnite/Database/Collections/PlatformsCollection.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 source/Playnite/WebView/OffscreenWebView.cs:46 — `!settings.UserAgent.IsNullOrWhiteSpace() || settings.ResourceLoadedCallback != null` appears character-identically in 2 files — source/Playnite/WebView/OffscreenWebView.cs, source/Playnite/WebView/WebView.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 source/Playnite.DesktopApp/Controls/GridViewPanel.cs:286 — `(itemIndex < firstIndex || itemIndex > lastIndex) && itemIndex > 0` appears character-identically in 2 files — source/Playnite.DesktopApp/Controls/GridViewPanel.cs, source/Playnite.FullscreenApp/Controls/FullscreenTilePanel.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 source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs:102 — `Computer.WindowsVersion == WindowsVersion.Win10 || Computer.WindowsVersion == WindowsVersion.Win11` appears character-identically in 2 files — source/Playnite.DesktopApp/Controls/Menus/MainMenu.cs, source/Playnite.DesktopApp/ViewModels/InstalledGamesViewModel.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 source/Playnite.DesktopApp/ProgramEntry.cs:50 — `Computer.WindowsVersion == WindowsVersion.Win7 || Computer.WindowsVersion == WindowsVersion.Win8` appears character-identically in 2 files — source/Playnite.DesktopApp/ProgramEntry.cs, source/Playnite.FullscreenApp/ProgramEntry.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 source/Playnite.DesktopApp/ViewModels/GameDetailsViewModel.cs:354 — `Game?.IsInstalling == true || Game?.IsUninstalling == true` appears character-identically in 2 files — source/Playnite.DesktopApp/ViewModels/GameDetailsViewModel.cs, source/Playnite.FullscreenApp/ViewModels/GameDetailsViewModel.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 source/Playnite.DesktopApp/ViewModels/GameDetailsViewModel.cs:358 — `Game?.IsRunning == true || Game?.IsLaunching == true` appears character-identically in 2 files — source/Playnite.DesktopApp/ViewModels/GameDetailsViewModel.cs, source/Playnite.FullscreenApp/ViewModels/GameDetailsViewModel.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 source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs:511 — `GlobalTaskHandler.ProgressTask != null && GlobalTaskHandler.ProgressTask.Status == TaskStatus.Running` appears character-identically in 2 files — source/Playnite.DesktopApp/ViewModels/DesktopAppViewModel.cs, source/Playnite/ViewModels/MainViewModelBase.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 source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs:439 — `a.Id == specProp.Id || a.Name == specProp.Id` appears character-identically in 3 files — source/Playnite.DesktopApp/ViewModels/GameEditViewModelMetadata.cs, source/Playnite/Database/Collections/PlatformsCollection.cs, source/Playnite/Database/Collections/RegionsCollection.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 source/Playnite.DesktopApp/Controls/FilterSelectionBox.cs:161 — `box.FilterProperties != null && box.FilterProperties.Text.IsNullOrEmpty()` appears character-identically in 2 files — source/Playnite.DesktopApp/Controls/FilterSelectionBox.cs, source/Playnite.FullscreenApp/Controls/FilterDbItemtSelection.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 source/Playnite.DesktopApp/ProgramEntry.cs:81 — `cmdLine.Start.IsNullOrEmpty() && !cmdLine.HideSplashScreen && procCount == 1` appears character-identically in 2 files — source/Playnite.DesktopApp/ProgramEntry.cs, source/Playnite.FullscreenApp/ProgramEntry.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:584 — `controller.Enabled && newList.Contains(controller.Path)` appears character-identically in 2 files — REDACTED, source/Playnite.FullscreenApp/Controls/SettingsSections/Input.xaml.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 source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:733 — `dbItem != null && !item.IsEqualJson(dbItem)` appears character-identically in 2 files — source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs, source/Playnite.DesktopApp/ViewModels/EmulatorsViewModel.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 source/Playnite.DesktopApp/Api/MainViewAPI.cs:26 — `mainModel.SelectedGames == null && mainModel.SelectedGame != null` appears character-identically in 2 files — source/Playnite.DesktopApp/Api/MainViewAPI.cs, source/Playnite.FullscreenApp/Api/MainViewAPI.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 source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs:925 — `res.Result && !res.SelectedString.IsNullOrEmpty()` appears character-identically in 3 files — source/Playnite.DesktopApp/ViewModels/DatabaseFieldsManagerViewModel.cs, REDACTED, source/Playnite/ViewModels/MainViewModelBase.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 source/Playnite.DesktopApp/Controls/NullableIntBox.cs:98 — `result >= MinValue && result <= MaxValue` appears character-identically in 2 files — source/Playnite.DesktopApp/Controls/NullableIntBox.cs, source/Playnite.DesktopApp/Controls/NumericDoubleBox.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 source/Playnite/Database/OldModels/Ver2.cs:90 — `string.IsNullOrEmpty(Name) && string.IsNullOrEmpty(objName)` appears character-identically in 2 files — source/Playnite/Database/OldModels/Ver2.cs, source/PlayniteSDK/Models/DatabaseObject.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 source/Playnite/Extensions/GameExtensions.cs:253 — `string.IsNullOrEmpty(inputString) || !inputString.Contains('{')` appears character-identically in 2 files — source/Playnite/Extensions/GameExtensions.cs, source/Playnite/Settings/PlaynitePaths.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.
AX6 · Interface segregation · Fat interface · ×9
  • Fat interface: IGameDatabaseMain (50 members) source/Playnite/Database/GameDatabase.cs:26 — `IGameDatabaseMain` declares 50 members: `UsedPlatforms`, `UsedGenres`, `UsedDevelopers`, `UsedPublishers`, `UsedTags`, `UsedCategories`, `UsedSeries`, `UsedAgeRatings`, `UsedRegions`, `UsedSources`, `UsedFeastures`, `UsedCompletionStatuses`, `SoftwareApps`, `DatabaseFileChanged`, `PlatformsInUseUpdated`, `GenresInUseUpdated`, `DevelopersInUseUpdated`, `PublishersInUseUpdated`, `TagsInUseUpdated`, `CategoriesInUseUpdated`, `AgeRatingsInUseUpdated`, `SeriesInUseUpdated`, `RegionsInUseUpdated`, `SourcesInUseUpdated`, `FeaturesInUseUpdated`, `CompletionStatusesInUseUpdated`, `SetDatabasePath`, `OpenDatabase`, `GetFileStoragePath`, `GetFullFilePath`, `AddFile`, `AddFile`, `RemoveFile`, `GetFileAsImage`, `CopyFile`, `BeginBufferUpdate`, `EndBufferUpdate`, `BufferedUpdate`, `ImportGames`, `GetCompletionStatusSettings`, and 10 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 50 declarations carry 49 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 49 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: IGameDatabase (24 members) source/PlayniteSDK/Database/IGameDatabase.cs:93 — `IGameDatabase` declares 24 members: `Games`, `Platforms`, `Emulators`, `Genres`, `Companies`, `Tags`, `Categories`, `Series`, `AgeRatings`, `Regions`, `Sources`, `Features`, `GameScanners`, `CompletionStatuses`, `ImportExclusions`, `FilterPresets`, `IsOpen`, `DatabaseOpened`, `ImportGame`, `ImportGame`, `GetGameMatchesFilter`, `GetFilteredGames`, `GetGameMatchesFilter`, `GetFilteredGames`. 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 24 declarations carry 21 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 21 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: IItemCollection<TItem> (20 members) source/PlayniteSDK/Database/IItemCollection.cs:134 — `IItemCollection<TItem>` declares 20 members under just 11 distinct name(s): `this[]`, `Get`, `Get`, `Add`, `Add`, `Add`, `Add`, `Add`, `Add`, `Add`, `Remove`, `Remove`, `Update`, `Update`, `BufferedUpdate`, `BeginBufferUpdate`, `EndBufferUpdate`, `GetClone`, `ItemCollectionChanged`, `ItemUpdated`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 20 separate responsibilities: a caller binds to 11 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 20 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
  • Fat interface: IDialogsFactory (30 members) source/PlayniteSDK/IDialogsFactory.cs:360 — `IDialogsFactory` declares 30 members under just 15 distinct name(s): `ShowErrorMessage`, `ShowErrorMessage`, `ShowMessage`, `ShowMessage`, `ShowMessage`, `ShowMessage`, `ShowMessage`, `SelectFolder`, `SelectFolder`, `SelectFile`, `SelectFile`, `SelectFiles`, `SelectFiles`, `SelectIconFile`, `SelectIconFile`, `SelectImagefile`, `SelectImagefile`, `SaveFile`, `SaveFile`, `SaveFile`, `SaveFile`, `SelectString`, `SelectString`, `ShowSelectableString`, `ChooseImageFile`, `ChooseItemWithSearch`, `ActivateGlobalProgress`, `ActivateGlobalProgress`, `CreateWindow`, `GetCurrentAppWindow`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 30 separate responsibilities: a caller binds to 15 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 30 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
  • Fat interface: IMainViewAPI (23 members) source/PlayniteSDK/IMainViewAPI.cs:50 — `IMainViewAPI` declares 23 members: `ActiveDesktopView`, `ActiveFullscreenView`, `SortOrder`, `SortOrderDirection`, `Grouping`, `UIDispatcher`, `SelectedGames`, `FilteredGames`, `OpenPluginSettings`, `SwitchToLibraryView`, `SelectGame`, `SelectGames`, `ApplyFilterPreset`, `ApplyFilterPreset`, `GetActiveFilterPreset`, `GetCurrentFilterSettings`, `OpenSearch`, `OpenSearch`, `OpenEditDialog`, `OpenEditDialog`, `GetSortedFilterPresets`, `GetSortedFilterFullscreenPresets`, `ToggleFullscreenView`. 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 23 declarations carry 20 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 20 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: IPlayniteAPI (23 members) source/PlayniteSDK/IPlayniteAPI.cs:15 — `IPlayniteAPI` declares 23 members: `MainView`, `Database`, `Dialogs`, `Paths`, `Notifications`, `ApplicationInfo`, `WebViews`, `Resources`, `UriHandler`, `ApplicationSettings`, `Addons`, `Emulation`, `ExpandGameVariables`, `ExpandGameVariables`, `ExpandGameVariables`, `StartGame`, `InstallGame`, `UninstallGame`, `AddCustomElementSupport`, `AddSettingsSupport`, `AddConvertersSupport`, `GetConnectedControllers`, `GetConnectedControllers2`. 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 23 declarations carry 21 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 21 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: IPlayniteSettingsAPI (28 members) source/PlayniteSDK/IPlayniteSettingsAPI.cs:79 — `IPlayniteSettingsAPI` declares 28 members: `Version`, `GridItemWidthRatio`, `GridItemHeightRatio`, `FirstTimeWizardComplete`, `DisableHwAcceleration`, `AsyncImageLoading`, `DownloadMetadataOnImport`, `StartInFullscreen`, `DatabasePath`, `MinimizeToTray`, `CloseToTray`, `EnableTray`, `Language`, `UpdateLibStartup`, `DesktopTheme`, `FullscreenTheme`, `StartMinimized`, `StartOnBoot`, `ForcePlayTimeSync`, `PlaytimeImportMode`, `FontFamilyName`, `DiscordPresenceEnabled`, `AgeRatingOrgPriority`, `SidebarVisible`, `SidebarPosition`, `Fullscreen`, `CompletionStatus`, `GetGameExcludedFromImport`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: IWebView (20 members) source/PlayniteSDK/IWebView.cs:125 — `IWebView` declares 20 members: `CanExecuteJavascriptInMainFrame`, `Open`, `OpenDialog`, `NavigateAndWait`, `Navigate`, `GetPageText`, `GetPageTextAsync`, `GetPageSource`, `GetPageSourceAsync`, `GetCurrentAddress`, `DeleteDomainCookies`, `DeleteDomainCookiesRegex`, `DeleteCookies`, `GetCookies`, `SetCookies`, `SetCookies`, `Close`, `LoadingChanged`, `EvaluateScriptAsync`, `WindowHost`. 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 20 declarations carry 19 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 19 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: IDataSerializer (27 members) source/PlayniteSDK/Data/DataSerialization.cs:40 — `IDataSerializer` declares 27 members: `ToYaml`, `FromYaml`, `TryFromYaml`, `TryFromYaml`, `FromYamlFile`, `TryFromYamlFile`, `TryFromYamlFile`, `ToJson`, `ToJsonStream`, `FromJson`, `TryFromJson`, `TryFromJson`, `FromJsonStream`, `TryFromJsonStream`, `TryFromJsonStream`, `FromJsonFile`, `TryFromJsonFile`, `TryFromJsonFile`, `FromToml`, `TryFromToml`, `TryFromToml`, `FromTomlFile`, `TryFromTomlFile`, `TryFromTomlFile`, `GetClone`, `GetClone`, `AreObjectsEqual`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 27 declarations carry 19 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 19 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.
D34 · Knowledge Freshness · Orphaned file · ×3
  • Orphaned file source/Playnite/SortableNameConverter.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 source/Playnite/HdrUtilities.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 source/Playnite.DesktopApp/Controls/SliderWithPopup.xaml.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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×3
  • Silent fallback default in catch source/Playnite/Common/FileSystem.cs:168 — `CanWriteToFolder` 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 source/Playnite/Converters/GenericTypeConverter.cs:70 — `Convert` swallows every exception into `return DependencyProperty.UnsetValue;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch source/Playnite/Native/Windef.cs:193 — `Equals` swallows `InvalidCastException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
D27 · Navigability · Pass-through layer · ×2
  • Pass-through layer source/Playnite/API/PlayniteAPI.cs:143 — PlayniteAPI: all 11 public methods forward their arguments unchanged to RootApi and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call RootApi directly, or give the layer a job.
  • Pass-through layer source/Playnite/Common/GlobalRandom.cs:9 — GlobalRandom: all 5 public methods forward their arguments unchanged to generator and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call generator directly, or give the layer a job.
D18 · Solution Shape · Shell project · ×1
  • Shell project: Playnite.Deps source/Playnite.Deps/Playnite.Deps.csproj — `Playnite.Deps` contributes only 0 significant line(s) — an empty/placeholder project is structural noise. Remove it or fold its contents into a real project.
D20 · ADR Quality · No ADRs found · ×1
  • 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 · Typo in property name 'CustomSearchKeywrods' (missing 'r'). While this is a single instance, it stands out as a spelling error in a codebase that otherwise uses consistent naming conventions for localization keys (LOC.*) and settings. It is likely intended to be 'CustomSearchKeywords'. · ×1
  • Typo in property name 'CustomSearchKeywrods' (missing 'r'). While this is a single instance, it stands out as a spelling error in a codebase that otherwise uses consistent naming conventions for localization keys (LOC.*) and settings. It is likely intended to be 'CustomSearchKeywords'. — Rename 'CustomSearchKeywrods' to 'CustomSearchKeywords' (symbols: Property: public string Playnite.PlayniteSettings.CustomSearchKeywrods, Property: public string Playnite.LOC.URLInputInfo, Property: public string Playnite.LOC.OptionOnceADay, Property: public string Playnite.LOC.SDKDocumentation, Property: public string Playnite.LOC.LoginFailed, Property: public string Playnite.LOC.GameStartedScriptDescription, Property: public string Playnite.LOC.ExtensionDataDir, Property: public string Playnite.LOC.SelectFileTooltip, Property: public string Playnite.LOC.LicenseAccept)
D21 · Naming Consistency · Inconsistent pluralization in property names. 'Genres' is correctly pluralized as a collection, whereas 'Serie' is singular but appears to represent a collection or a specific entity name that is grammatically incorrect for a series (should be 'Series'). If 'Serie' is intended to be a single value, it is still a non-standard English word for the concept (Series). Given 'Genres' is plural, if 'Serie' is also a collection, it should be 'Series'. If it is a single item, the name 'Serie' is a misspelling of 'Series' or a non-standard term. · ×1
  • Inconsistent pluralization in property names. 'Genres' is correctly pluralized as a collection, whereas 'Serie' is singular but appears to represent a collection or a specific entity name that is grammatically incorrect for a series (should be 'Series'). If 'Serie' is intended to be a single value, it is still a non-standard English word for the concept (Series). Given 'Genres' is plural, if 'Serie' is also a collection, it should be 'Series'. If it is a single item, the name 'Serie' is a misspelling of 'Series' or a non-standard term. — Rename 'Serie' to 'Series' to match standard English pluralization and consistency with 'Genres' (symbols: Property: public Series Playnite.GamesCollectionViewEntry.Serie, Property: public List<Genre> Playnite.SDK.Models.Game.Genres)
D24 · Comment Value · redundant comment · ×1
  • redundant comment source/PlayniteSDK/WebViewModels.cs:16 — "Summary: Top level page." — delete - Summary already states this
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 3 of 22 project(s) overshoot their size bounds, lowering Project Cohesion to 7.3/10. The most over is `Playnite` (69221 LoC, 762 public types across 39 namespaces). Review these for cohesion — split a project that spans unrelated responsibilities.
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 — 3 of 302 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 and example/demo trees and test files identified by path convention, largest first; 302 of the 603 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: source/Playnite/SortableNameConverter.cs, source/Playnite/HdrUtilities.cs, source/Playnite.DesktopApp/Controls/SliderWithPopup.xaml.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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
M3 · Folder & project structure · Inconsistent root namespaces · ×1
  • Inconsistent root namespaces — Only 12/22 projects share a common root namespace — the code's module identity is inconsistent.
P1 · CI/CD gates · CI test execution not evidenced · ×1
  • CI test execution not evidenced — A CI pipeline exists but no test-runner invocation (your stack's test command, or a test job) was found — changes may merge without the suite running.
P10 · Library API & versioning · Large public API surface · ×1
  • Large public API surface — 227/227 types (100%) are public. For a library, every public type is a stability contract — make internal-by-default and expose only the intended API.
P12 · CI test-gate honesty · Sleep-based test synchronization · ×1
  • Sleep-based test synchronization — 10 Task.Delay/Thread.Sleep call(s) in test code synchronize with background work by sleeping — a known flakiness precursor on slow runners. Prefer polling with a deadline or completion signals.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 775 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P6 · Release Hygiene · No changelog · ×1
  • 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.)
PF1 · Benchmark discipline · No performance benchmarks · ×1
  • No performance benchmarks — No benchmark suite was found by the two searches this check runs. FIRST, a BenchmarkDotNet package reference in any project file — every project the workspace loaded, plus a walk of project files on disk that never loaded, because a benchmark suite is exactly the project a partial load drops. SECOND, a script harness: a file whose name contains `benchmark` and ends `.py`, `.sh`, `.ps1`, `.bash`, `.rb`, `.js` or `.mjs`, credited ONLY when this repository's CI text also mentions benchmarks — a harness no pipeline runs is read as a fixture, deliberately. Neither search can see a benchmark suite in another ecosystem's idiom (a Go `testing.B` file, a JMH or criterion project, a pytest-benchmark run), so this is 'no benchmark found by those two searches', not a verdict that the repository has none. Where code is performance-sensitive, a benchmark guards against silent regressions — but it's a bonus here, not a deduction.
X2 · Cancellation propagation · Not all async methods take a CancellationToken · ×1
  • Not all async methods take a CancellationToken — Only 4/37 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.
Minor — 15 finding(s)
D19 · Documentation Quality · XML-doc coverage · ×11
  • XML-doc coverage: Playnite.BrowserProcess source/Playnite.BrowserProcess/Playnite.BrowserProcess.csproj — Playnite.BrowserProcess: 0 % XML-doc coverage (0/2).
  • XML-doc coverage: Playnite.DesktopApp source/Playnite.DesktopApp/Playnite.DesktopApp.csproj — Playnite.DesktopApp: 4 % XML-doc coverage (66/1760).
  • XML-doc coverage: Playnite.FullscreenApp source/Playnite.FullscreenApp/Playnite.FullscreenApp.csproj — Playnite.FullscreenApp: 4 % XML-doc coverage (26/621).
  • XML-doc coverage: Playnite source/Playnite/Playnite.csproj — Playnite: 21 % XML-doc coverage (1627/7932).
  • XML-doc coverage: Playnite.SDK source/PlayniteSDK/Playnite.SDK.csproj — Playnite.SDK: 93 % XML-doc coverage (1059/1139).
  • XML-doc coverage: Playnite.Toolbox source/Tools/Playnite.Toolbox/Playnite.Toolbox.csproj — Playnite.Toolbox: 0 % XML-doc coverage (0/56).
  • XML-doc coverage: Playnite.Utilities source/Tools/Playnite.Utilities/Playnite.Utilities.csproj — Playnite.Utilities: 0 % XML-doc coverage (0/18).
  • XML-doc coverage: PlayniteInstaller source/Tools/PlayniteInstaller/PlayniteInstaller.csproj — PlayniteInstaller: 5 % XML-doc coverage (28/592).
  • XML-doc coverage: CustomLibraryPlugin source/Tools/Playnite.Toolbox/Templates/Extensions/CustomLibraryPlugin/CustomLibraryPlugin.csproj — CustomLibraryPlugin: 0 % XML-doc coverage (0/24).
  • XML-doc coverage: CustomMetadataPlugin source/Tools/Playnite.Toolbox/Templates/Extensions/CustomMetadataPlugin/CustomMetadataPlugin.csproj — CustomMetadataPlugin: 0 % XML-doc coverage (0/25).
  • XML-doc coverage: GenericPlugin source/Tools/Playnite.Toolbox/Templates/Extensions/GenericPlugin/GenericPlugin.csproj — GenericPlugin: 0 % XML-doc coverage (0/26).
D10 · Test Quality · Mock framework · ×4
  • Mock framework: Moq — Playnite.DesktopApp.Tests references Moq.
  • Mock framework: Moq — Playnite.FullscreenApp.Tests references Moq.
  • Mock framework: Moq — Playnite.Tests references Moq.
  • Mock framework: Moq — Playnite.Toolbox.Tests references Moq.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a7705927d2584b74bc271a891550d5f1/history.json --exit-code 0 --source .1artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a7705927d2584b74bc271a891550d5f1/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .10artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesdotnet—dotnet list source/Playnite.slnx package --vulnerable --include-transitive --format json0artifacts/raw/dotnet-vulnerable.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—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.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a167aa-cd41-78c3-857e-857dc6e6fffb · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Appendix C — Personal-data map

Every field, property and record parameter whose name is conventional personal data — 6 field(s) across 1 category, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by NAME, from the C# syntax tree, with a deliberately specific identifier classifier — the same one the C1–C5 compliance cards use to decide whether personal data is present, so CardDefinition or FileName don't trip. Two caveats stated rather than glossed: those cards additionally require corroboration (a persistence/account signal, or two distinct PII categories) that this inventory deliberately does not, so it lists more than they gate on; and D32 Data Compliance shares nothing with it — that dimension is a separate semgrep ruleset for personal data leaking into logs, URLs and browser storage, and a clean D32 result says nothing about this list. Informational — it feeds no score.

Name — 6 field(s)
  • PlayniteSettingsAPI.FontFamilyName source/Playnite/API/PlayniteSettingsAPI.cs:71
  • PlayniteSettings.fontFamilyName source/Playnite/Settings/PlayniteSettings.cs:1362
  • PlayniteSettings.FontFamilyName source/Playnite/Settings/PlayniteSettings.cs:1364
  • PlayniteSettings.monospaceFontFamilyName source/Playnite/Settings/PlayniteSettings.cs:1378
  • PlayniteSettings.MonospaceFontFamilyName source/Playnite/Settings/PlayniteSettings.cs:1380
  • IPlayniteSettingsAPI.FontFamilyName source/PlayniteSDK/IPlayniteSettingsAPI.cs:185

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md