Public report of CoplayDev/unity-mcp, 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, 06:59 UTC · Survey ID cd_5e8a3e8bb74649dabf7880b5aaa319f8

CoplayDev/unity-mcp

Measured 23 October 2026, 06:56 UTC, at code version ed4e205

No regression since the last survey Code coverage: not measured

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: Suite not runnable in-image and no committed report.

CAI score 53out of 100 At risk No change 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: 127,305 lines of product code in 3 projects, tests not counted · Estimated rebuild effort: about 4.1 person-years · Weakest lens: Code Health, 47

Findings by how serious they are

87 critical 1111 serious 313 minor

5 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, 06:56 UTC

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

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

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

72of 76 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.
1478of 1511 findings point to an exact file and line, so you can open each one in the code. The other 33 concern the repository as a whole, such as missing documentation.
76dimensions across 6 lenses, read from 127,305 lines of product code in 3 projects.
Chapters

Executive summary

CoplayDev/unity-mcp scores 53 out of 100, but it is rated At risk while a critical security finding is open; the score itself is unchanged.

The weakest lens counts most in the score, and here that is Code Health, which scores 47 and is rated Weak. Its Cognitive Complexity dimension scores 2 out of 10, and until that reaches 4, Code Health can't be rated higher than Adequate. The first actions are to where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.` and to resolve the 1 No ADRs found finding(s) in ADR Quality, and if Code Health rose to 70, the score would rise from 53 to about 58.

87 findings are critical: 72 in Static Analysis (SAST), 11 in Dependency Vulnerabilities, three in Knowledge Freshness and one in IaC & Container Security.

Watchdog couldn't measure Collection changed while being enumerated, Document value interpolated into markup unescaped and Runtime accessibility in this code, so those dimensions are left out of the score. The product code is 127,305 lines, which would take an estimated 4.1 person-years, around €600,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.
Code Health 47 · counts for 46%Security and Compliance 55 · counts for 25%Production Readiness 56 · counts for 14%Performance 60 · counts for 8%Maturity 70 · counts for 4%Architecture 95 · counts for 2%

If Code Health rose from 47 to 70, the lowest score rated Strong, the score would rise from 53 to about 58.

Code composition: what the lines of code are
Business logic 42%Supporting code 20%Tests 39%
New since the last survey: 74 findings

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

  • Churn × Complexity Hotspots · Hotspot: MCPForUnity/Editor/Tools/ReadConsole.cs MCPForUnity/Editor/Tools/ReadConsole.cs
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Cryptographic Hygiene · Weak hash algorithm MCPForUnity/Editor/Helpers/ProjectIdentityUtility.cs
  • Cryptographic Hygiene · Weak hash algorithm MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs
  • Cryptographic Hygiene · Weak hash algorithm MCPForUnity/Editor/Setup/SkillSyncService.cs
  • Cryptographic Hygiene · Weak hash algorithm MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs
  • Cryptographic Hygiene · Password key derivation is priced too cheaply MCPForUnity/Editor/Security/SecureKeyStore/EncryptedFileKeyStore.cs
  • Async correctness · Sync-over-async (deadlock risk) through `Task.WaitAll` MCPForUnity/Editor/Services/McpEditorShutdownCleanup.cs
  • Async correctness · Sync-over-async (deadlock risk) through `.Result` MCPForUnity/Editor/Services/TestJobManager.cs
  • Async correctness · Sync-over-async (deadlock risk) through `.Wait(…)` MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs
  • Async correctness · Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Abstractions/AuthenticationBase.cs
  • Async correctness · Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Abstractions/PackageUploaderBase.cs
  • Async correctness · Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.cs
  • Async correctness · Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.cs
  • Async correctness · Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.cs
  • Async correctness · Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.cs
  • Async correctness · Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.cs
  • Async correctness · Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.cs
  • Async correctness · Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/UnityPackageUploader.cs
  • Cancellation propagation · Async method without CancellationToken: GetTestsAsync MCPForUnity/Editor/Services/TestRunnerService.cs
  • Cancellation propagation · Async method without CancellationToken: RunTestsAsync MCPForUnity/Editor/Services/TestRunnerService.cs
  • Cancellation propagation · Async local function without CancellationToken: Runner MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs
  • Cancellation propagation · Async method without CancellationToken: StopAsync MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs
  • Cancellation propagation · Async method without CancellationToken: VerifyAsync MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs
  • Cancellation propagation · Async method without CancellationToken: ReregisterToolsAsync MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs
  • Cancellation propagation · Async local function without CancellationToken: AwaitHandler MCPForUnity/Editor/Tools/CommandRegistry.cs
  • Cancellation propagation · Async method without CancellationToken: GenerateImpl TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/AudioTypePreviewGenerator.cs
  • Cancellation propagation · Async method without CancellationToken: GeneratePreviewsInScene TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/MaterialTypePreviewGenerator.cs
  • Cancellation propagation · Async method without CancellationToken: GeneratePreviewsInScene TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs
  • Cancellation propagation · Async method without CancellationToken: GeneratePreviewsInScene TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/PrefabTypePreviewGenerator.cs
  • Cancellation propagation · Async method without CancellationToken: GenerateImpl TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/TextureTypePreviewGenerator.cs
  • Cancellation propagation · Async method without CancellationToken: GenerateImpl TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/CustomPreviewGenerator.cs
  • Cancellation propagation · Async method without CancellationToken: LoadImage TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/UI/Data/AssetPreview.cs
  • Cancellation propagation · Async method without CancellationToken: ValidatePackageUploadedVersions TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/Data/Abstractions/WorkflowBase.cs
  • Cancellation propagation · Async method without CancellationToken: GetPackageThumbnail TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/Services/Api/PackageDownloadingService.cs
  • Cancellation propagation · Async method without CancellationToken: GetPackageUploadedVersions TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/Services/Api/PackageDownloadingService.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Dependencies/PlatformDetectors/PlatformDetectorBase.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Dependencies/PlatformDetectors/PlatformDetectorBase.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Helpers/BlenderDetection.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Helpers/BlenderDetection.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/GameObjectSerializer.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Helpers/McpLogRecord.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Helpers/ParamCoercion.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Helpers/ParamCoercion.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Helpers/ParamCoercion.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Helpers/ParamCoercion.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Helpers/ParamCoercion.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Helpers/ParamCoercion.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Helpers/ParamCoercion.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Helpers/ParamCoercion.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Helpers/ProjectIdentityUtility.cs
  • Incompleteness & stubs · Both branches are identical — the condition decides nothing CustomTools/RoslynRuntimeCompilation/RoslynRuntimeCompiler.cs
  • Incompleteness & stubs · Both branches are identical — the condition decides nothing CustomTools/RoslynRuntimeCompilation/RoslynRuntimeCompiler.cs
  • Incompleteness & stubs · Both branches are identical — the condition decides nothing MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs
  • Async & latency hygiene · Sync-over-async blocking MCPForUnity/Editor/Services/BridgeControlService.cs
  • Async & latency hygiene · Sync-over-async blocking MCPForUnity/Editor/Services/Transport/TransportManager.cs
  • Async & latency hygiene · Sync-over-async blocking MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs
  • Async & latency hygiene · Sync-over-async blocking MCPForUnity/Editor/Setup/SkillSyncService.cs
  • Async & latency hygiene · Sync-over-async blocking MCPForUnity/Editor/Setup/SkillSyncService.cs
  • Async & latency hygiene · Sync-over-async blocking MCPForUnity/Editor/Setup/SkillSyncService.cs
  • Async & latency hygiene · Sync-over-async blocking MCPForUnity/Editor/Setup/SkillSyncService.cs
  • Async & latency hygiene · Sync-over-async blocking MCPForUnity/Editor/Setup/SkillSyncService.cs
  • Async & latency hygiene · Sync-over-async blocking TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs

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

Fixed since the last survey: 286 findings

These 286 critical or serious findings were in the previous survey, on 9 October 2026, and are gone from this one. The first 100 are listed here.

  • Supply-chain Provenance & Signing REDACTED
  • Supply-chain Provenance & Signing REDACTED
  • Cancellation propagation · Async method without CancellationToken: ImportSelection MCPForUnity/Editor/MenuItems/BlenderBridgeMenu.cs
  • Cancellation propagation · Async method without CancellationToken: ImportScene MCPForUnity/Editor/MenuItems/BlenderBridgeMenu.cs
  • Cancellation propagation · Async method without CancellationToken: Screenshot MCPForUnity/Editor/MenuItems/BlenderBridgeMenu.cs
  • Cancellation propagation · Async method without CancellationToken: RunAsync MCPForUnity/Editor/MenuItems/BlenderBridgeMenu.cs
  • Cancellation propagation · Async method without CancellationToken: RefreshCore MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs
  • Cancellation propagation · Async method without CancellationToken: RefreshCore MCPForUnity/Editor/Services/AssetGen/OpenRouterModelCatalog.cs
  • Cancellation propagation · Async method without CancellationToken: AutoStartAsync MCPForUnity/Editor/Services/HttpAutoStartHandler.cs
  • Cancellation propagation · Async method without CancellationToken: ReconnectAsync MCPForUnity/Editor/Services/HttpAutoStartHandler.cs
  • Cancellation propagation · Async method without CancellationToken: ConnectBridgeAsync MCPForUnity/Editor/Services/HttpAutoStartHandler.cs
  • Cancellation propagation · Async method without CancellationToken: StartCoreAsync MCPForUnity/Editor/Services/Transport/TransportManager.cs
  • Cancellation propagation · Async method without CancellationToken: StopAsync MCPForUnity/Editor/Services/Transport/TransportManager.cs
  • Cancellation propagation · Async method without CancellationToken: VerifyAsync MCPForUnity/Editor/Services/Transport/TransportManager.cs
  • Cancellation propagation · Async method without CancellationToken: HandleCommand MCPForUnity/Editor/Tools/AssetGen/ImportModel.cs
  • Cancellation propagation · Async method without CancellationToken: Search MCPForUnity/Editor/Tools/AssetGen/ImportModel.cs
  • Cancellation propagation · Async method without CancellationToken: Preview MCPForUnity/Editor/Tools/AssetGen/ImportModel.cs
  • Cancellation propagation · Async method without CancellationToken: HandleCommand MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs
  • Cancellation propagation · Async method without CancellationToken: StatusAsync MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs
  • Cancellation propagation · Async method without CancellationToken: ScreenshotAsync MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs
  • Cancellation propagation · Async method without CancellationToken: ImportModelAsync MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs
  • Cancellation propagation · Async method without CancellationToken: ExportFromBlenderAsync MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs
  • Cancellation propagation · Async method without CancellationToken: SetupBloomAsync MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs
  • Cancellation propagation · Async method without CancellationToken: CompareScreenshotAsync MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs
  • Cancellation propagation · Async method without CancellationToken: HandleCommand MCPForUnity/Editor/Tools/Profiler/ManageProfiler.cs
  • Cancellation propagation · Async method without CancellationToken: GetCountersAsync MCPForUnity/Editor/Tools/Profiler/Operations/CounterOps.cs
  • Cancellation propagation · Async method without CancellationToken: VerifySelection MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs
  • Cancellation propagation · Async method without CancellationToken: ProbeConnection MCPForUnity/Editor/Windows/Components/AssetGen/McpBlenderBridgePanel.cs
  • Cancellation propagation · Async method without CancellationToken: RunActionAsync MCPForUnity/Editor/Windows/Components/AssetGen/McpBlenderBridgePanel.cs
  • Cancellation propagation · Async method without CancellationToken: OnHttpServerToggleClicked MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs
  • Cancellation propagation · Async method without CancellationToken: OnConnectionToggleClicked MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs
  • Cancellation propagation · Async method without CancellationToken: EndOrphanedSessionAsync MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs
  • Cancellation propagation · Async method without CancellationToken: OnGetApiKeyClicked MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs
  • Cancellation propagation · Async method without CancellationToken: VerifyBridgeConnectionAsync MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs
  • Cancellation propagation · Async method without CancellationToken: VerifyBridgeConnectionInternalAsync MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs
  • Cancellation propagation · Async method without CancellationToken: Export TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Exporter/DefaultPackageExporter.cs
  • Cancellation propagation · Async method without CancellationToken: GeneratePreviews TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Exporter/DefaultPackageExporter.cs
  • Cancellation propagation · Async method without CancellationToken: WaitAndWritePreviewsChunked TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/NativePreviewGenerator.cs
  • Cancellation propagation · Async method without CancellationToken: WaitAndWritePreviewIteration TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/NativePreviewGenerator.cs
  • Cancellation propagation · Async method without CancellationToken: WaitForEndOfFrame TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/NativePreviewGenerator.cs
  • Cancellation propagation · Async method without CancellationToken: GeneratePreviews TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/UI/Views/PreviewListView.cs
  • Cancellation propagation · Async method without CancellationToken: OpenPreviewSceneForCurrentPipeline TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Utility/PreviewSceneUtility.cs
  • Cancellation propagation · Async method without CancellationToken: OpenPreviewSceneBiRP TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Utility/PreviewSceneUtility.cs
  • Cancellation propagation · Async method without CancellationToken: Authenticate TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/Services/Api/AuthenticationService.cs
  • Cancellation propagation · Async method without CancellationToken: Refresh TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/AccountToolbar.cs
  • Cancellation propagation · Async method without CancellationToken: Export TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/PackageUploadElement.cs
  • Cancellation propagation · Async method without CancellationToken: Upload TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/PackageUploadElement.cs
  • Cancellation propagation · Async method without CancellationToken: ValidateUnityVersionsBeforeUpload TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/PackageUploadElement.cs
  • Cancellation propagation · Async method without CancellationToken: OnUploadingStopped TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/PackageUploadElement.cs
  • Cancellation propagation · Async method without CancellationToken: LoginWithSessionToken TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/LoginView.cs
  • Cancellation propagation · Async method without CancellationToken: LoginWithCloudToken TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/LoginView.cs
  • Cancellation propagation · Async method without CancellationToken: LoginWithCredentials TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/LoginView.cs
  • Cancellation propagation · Async method without CancellationToken: DownloadAndSetThumbnail TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/PackageListView.cs
  • Cancellation propagation · Async method without CancellationToken: OnAuthenticationSuccess TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/UploaderWindow.cs
  • Cancellation propagation · Async method without CancellationToken: RefreshPackages TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/UploaderWindow.cs
  • Cancellation propagation · Async method without CancellationToken: CheckForUpdatesAfterEditorUpdate TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Utility/ASToolsUpdater.cs
  • Cancellation propagation · Async method without CancellationToken: CheckForUpdates TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Utility/ASToolsUpdater.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Dependencies/DependencyManager.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/AssetGenPaths.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/AssetPathUtility.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/AssetPathUtility.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/BlenderDetection.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/BlenderDetection.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/BlenderDetection.cs
  • Exception handling · Swallowed exception (caught, then discarded) REDACTED
  • Exception handling · Swallowed exception (caught, then discarded) REDACTED
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/McpJobStateStore.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/McpLog.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/PortManager.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/PortManager.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/PortManager.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/ProjectIdentityUtility.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/ProjectIdentityUtility.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/ProjectIdentityUtility.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/PropertyConversion.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/TelemetryHelper.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/McpCiBoot.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Resources/Project/ProjectInfo.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Resources/Project/ProjectInfo.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Security/SecureKeyStore/EncryptedFileKeyStore.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Security/SecureKeyStore/LinuxSecretToolKeyStore.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Security/SecureKeyStore/LinuxSecretToolKeyStore.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Services/AssetGen/AssetGenJobManager.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Services/AssetGen/AssetGenJobManager.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Services/AssetGen/AssetGenJobManager.cs
  • Exception handling · Swallowed exception (empty catch) MCPForUnity/Editor/Services/AssetGen/Http/UnityWebRequestTransport.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Services/AssetGen/Import/ModelImportPipeline.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Services/AssetGen/Import/ModelImportPipeline.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Services/AssetGen/Providers/AssetGenProviders.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Services/AssetGen/Providers/OpenRouterAdapter.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Services/AssetGen/Providers/OpenRouterAdapter.cs
  • Exception handling · Swallowed exception (caught, then discarded) MCPForUnity/Editor/Services/AssetGen/Providers/TripoAdapter.cs
Rebuild cost: about €600,000 · Estimate
Cost to rebuild€190,000 to €1,000,000, for 3,244 to 10,614 hours of work, about 4.1 person-years for 2 to 8 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 53. 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: 127,305 lines of product code
Comment linesThe estimate prices 118,222 lines. Comment lines count towards the size of 127,305 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
Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.
Raises the score by about 4 points · Medium effort · Nullable reference types
2
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 1 point · Low effort · ADR Quality
3
Swallowed exception (empty catch)
Raises the score by about 2 points · Medium effort · Exception handling

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €600,000 to build again, about 4.1 person-years of work. Its weakest lens is Code Health, at 47 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.3 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 31,025 lines over the last 90 days, which is about 125,824 lines a year. At that pace, the extra work comes to an estimated 13.3 to 79.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.

arch MCPForUnity.Editor Editor MCPForUnity.Runtime Runtime MCPForUnity.Editor->MCPForUnity.Runtime mcpforunityserver mcpforunityserver

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.

59 modules, with 25 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 19 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 (global)2 .github.scripts3 Server.src4 Server.src.cli.commands5 Server.src.cli.main6 Server.src.cli.utils.config7 Server.src.cli.utils.connection8 Server.src.core.config9 Server.src.core.telemetry10 Server.src.main11 Server.src.models.models12 Server.src.services13 Server.src.services.api_key_service14 Server.src.transport.models15 Server.src.transport.plugin_registry16 tools.local_harness17 Server.src.cli18 Server.src.cli.utils19 Server.src.core20 Server.src.models21 Server.src.services.custom_tool_service22 Server.src.services.resources23 Server.src.services.resources.active_tool24 Server.src.services.resources.custom_tools25 Server.src.services.resources.gameobject26 Server.src.services.resources.layers27 Server.src.services.resources.menu_items28 Server.src.services.resources.prefab29 Server.src.services.resources.prefab_stage30 Server.src.services.resources.project_info31 Server.src.services.resources.selection32 Server.src.services.resources.tags33 Server.src.services.resources.tests34 Server.src.services.resources.windows35 Server.src.services.tools36 Server.src.services.tools.run_tests37 Server.src.transport.legacy.unity_connection38 Server.src.transport.plugin_hub39 tools40 Server.src.transport.legacy
1 (global)
2 .github.scripts
3 Server.src
4 Server.src.cli.commands
5 Server.src.cli.main
6 Server.src.cli.utils.config
7 Server.src.cli.utils.connection
8 Server.src.core.config
9 Server.src.core.telemetry
10 Server.src.main
11 Server.src.models.models
12 Server.src.services
13 Server.src.services.api_key_service
14 Server.src.transport.models
15 Server.src.transport.plugin_registry
16 tools.local_harness
17 Server.src.cli1
18 Server.src.cli.utils2
19 Server.src.core3
20 Server.src.models1
21 Server.src.services.custom_tool_service3
22 Server.src.services.resources7
23 Server.src.services.resources.active_tool1
24 Server.src.services.resources.custom_tools1
25 Server.src.services.resources.gameobject3
26 Server.src.services.resources.layers1
27 Server.src.services.resources.menu_items1
28 Server.src.services.resources.prefab2
29 Server.src.services.resources.prefab_stage1
30 Server.src.services.resources.project_info1
31 Server.src.services.resources.selection1
32 Server.src.services.resources.tags1
33 Server.src.services.resources.tests1
34 Server.src.services.resources.windows1
35 Server.src.services.tools3
36 Server.src.services.tools.run_tests2
37 Server.src.transport.legacy.unity_connection1
38 Server.src.transport.plugin_hub51
39 tools4
40 Server.src.transport.legacy2
Uses a module listed above itPart of a loopThe module itself
1 (global)2 .github.scripts3 Server.src4 Server.src.cli.commands5 Server.src.cli.main6 Server.src.cli.utils.config7 Server.src.cli.utils.connection8 Server.src.core.config9 Server.src.core.telemetry10 Server.src.main11 Server.src.models.models12 Server.src.services13 Server.src.services.api_key_service14 Server.src.transport.models15 Server.src.transport.plugin_registry16 tools.local_harness17 Server.src.cli18 Server.src.cli.utils19 Server.src.core20 Server.src.models21 Server.src.services.custom_tool_service22 Server.src.services.resources23 Server.src.services.resources.active_tool24 Server.src.services.resources.custom_tools25 Server.src.services.resources.gameobject26 Server.src.services.resources.layers27 Server.src.services.resources.menu_items28 Server.src.services.resources.prefab29 Server.src.services.resources.prefab_stage30 Server.src.services.resources.project_info31 Server.src.services.resources.selection32 Server.src.services.resources.tags33 Server.src.services.resources.tests34 Server.src.services.resources.windows35 Server.src.services.tools36 Server.src.services.tools.run_tests37 Server.src.transport.legacy.unity_connection38 Server.src.transport.plugin_hub39 tools40 Server.src.transport.legacy(global)1.github.scripts2Server.src3Server.src.cli.commands4Server.src.cli.main5Server.src.cli.utils.config6Server.src.cli.utils.connection7Server.src.core.config8Server.src.core.telemetry9Server.src.main10Server.src.models.models11Server.src.services12Server.src.services.api_key_service13Server.src.transport.models14Server.src.transport.plugin_registry15tools.local_harness16Server.src.cli17Server.src.cli.utils18Server.src.core19Server.src.models20Server.src.services.custom_tool_service21Server.src.services.resources22Server.src.services.resources.active_tool23Server.src.services.resources.custom_tools24Server.src.services.resources.gameobject25Server.src.services.resources.layers26Server.src.services.resources.menu_items27Server.src.services.resources.prefab28Server.src.services.resources.prefab_stage29Server.src.services.resources.project_info30Server.src.services.resources.selection31Server.src.services.resources.tags32Server.src.services.resources.tests33Server.src.services.resources.windows34Server.src.services.tools35Server.src.services.tools.run_tests36Server.src.transport.legacy.unity_connection37Server.src.transport.plugin_hub38tools39Server.src.transport.legacy401231371131121111113215142+19 more modules (most-connected shown)

At a glance — Code Health · 47% · Weak · gated by D2, X5 ·

At a glance — Architecture · 95% · Exemplary ·

At a glance — Maturity · 70% · Adequate ·

At a glance — Readiness · 56% · Adequate · gated by P3 ·

At a glance — Security · 55% · Adequate · gated by D29, D30, C1 ·

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 — Injection81High / Critical
A03:2025 — Software Supply Chain Failures27High / Critical
A02:2025 — Security Misconfiguration4High / Critical

Roadmap

First, resolve nullable reference type ambiguities by ensuring symbols are tested before use or removing unnecessary null-conditional operators. Next, eliminate all empty catch blocks to prevent swallowed exceptions and correct async void methods to ensure proper asynchronous execution. Finally, improve structured logging by removing interpolated messages and strengthen data protection by vaulting keys and encrypting sensitive columns to close security gaps.

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

Do thisHelpsEffortDimension
Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.+4.3 ptsMediumNullable reference types
Resolve the 1 No ADRs found finding(s) in ADR Quality.+1.2 ptsLowADR Quality
Swallowed exception (empty catch)+2.1 ptsMediumException handling
async void method: ImportSelection+1.9 ptsMediumAsync correctness
Resolve the 1 UPM dependency `com.unity.ide.windsurf` is a git source with no revision finding(s) in Dependency Hygiene.+0.7 ptsLowDependency Hygiene
Interpolated log message defeats structured logging+1.5 ptsMediumStructured logging
Strengthen data-at-rest protection: vault your keys (Azure Key Vault / AWS KMS / IDataProtector key ring) and encrypt the most sensitive columns (EF HasConversion encryption or provider-native column encryption) — partial coverage still leaves gaps.+1.4 ptsMediumData Protection
Resolve the 5 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5).+0.6 ptsLowDependency Vulnerabilities

File quality

Per-file score 0–10 — a quality signature. Of 243 files carrying findings, judged against the Production bar: 5% slop · 66% mixed · 29% near-clean.

FileScoreBandWorst signal
REDACTED0.2SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.2SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.4SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs5.7MixedCyclomatic Complexity: McpClientConfigSection.ApplyStatusToUi (cyclomatic 21)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED

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

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

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

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

Could not be resolved — 5

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. 72 of 76 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 1.0 — 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 — 76 dimensions across the health lenses
D1D2D3D4D5D6D9D10D11D12D13D14D15D16D17D19D20D21D22D28D29D30D31D34D35D36D37D43D44AX10AX3AX4AX6AX8C1C2C4GD1IC1M1M2M3M4P1P10P3P4P5P6PF1PF2PF3S1X1X12X13X14X15X16X17X18X19X2X20X21X22X23X25X26X28X29X3X30X32X4X5

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, 1478 of 1511 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 · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ 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 01a1678b-f80e-7943-8d7c-d6fff04d1baf.

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.

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a coverage step in CI (`pytest tests/ -v --tb=short --cov --cov-report=xml --cov-rep…`) shows that coverage is collected and tracked in your own CI. The suite could not be built/run in-image and no machine-readable report was present in the working tree at scan time, so the number could not be read — it is excluded from the score rather than treated as unmeasured-by-the-team. To have it read, commit the lcov/Cobertura artifact your CI produces (a hosted scan measures a clone of the repository, so only a committed report reaches it — `git add -f` that one file if it is gitignored), or make the suite runnable in-image. For context only, test code is ≈ 44% of production LoC (55,358 test / 126,622 production) — a rough proxy, NOT a coverage measurement. You can widen what we reach: optional: commit the lcov/Cobertura artifact your CI produces (a hosted scan measures a clone of the repository, so only a committed report reaches it — `git add -f` that one file if it is gitignored), or make the suite runnable in-image, and the real number is read.
  • 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 1,419 test(s) behind this row are the ones the C# collector could read, and this repository also carries at least 115 test source file(s) (.py, .mjs) 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.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its Python distribution dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Unity UPM manifest (Packages/manifest.json or a package's package.json), but the licence verdict published here was taken over its Python distribution dependencies. Nothing was read about its Upm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `MCPForUnity/Editor/Services/AssetGen/FalModelSchema.cs`, `MCPForUnity/Editor/Tools/Graphics/SkyboxOps.cs`, `website/src/components/HomeFeatures/index.js`, `website/src/components/HomeHero/index.js`, `website/src/components/HomeStats/index.js` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (docker-compose.yml). compose up failed (exit 17 — an image could not be built) — failed to solve: python:3.13-slim: failed to resolve source metadata for docker.io/library/python:3.13-slim: failed to do request: Head "https://registry-1.docker.io/v2/library/python/manifests/3.13-slim": Forbidden; runtime evidence skipped.
  • 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. 16 further occurrence(s) are not listed individually; the score already reflects all 56.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 22 further occurrence(s) are not listed individually; the score already reflects all 62.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's C# was parsed (it ships no .sln or .csproj, so it was read as syntax-only projects), but this check proves its findings from resolved symbols and a reference-free parse resolves none. It abstained rather than report a clean bill it could not earn. That is a gap in this analyzer's reach into build-less repositories — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's C# was parsed (it ships no .sln or .csproj, so it was read as syntax-only projects), but this check proves its findings from resolved symbols and a reference-free parse resolves none. It abstained rather than report a clean bill it could not earn. That is a gap in this analyzer's reach into build-less repositories — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 198 further occurrence(s) are not listed individually; the score already reflects all 238.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

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

The LLM boundary

LLM-set scores this run (4): D19, D21, D22, 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 Complexity4.4 / 10Weak✓ 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 4.4 / 10 · rule-coverage 100% · ceiling Prevented

216 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was script_apply_edits.script_apply_edits at 146. 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 ScreenshotUtility.GetGlyph at 41 — they are counted neither in the figure above nor in this dimension's score. 9 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: MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs (ScreenshotUtility.GetGlyph at 41), MCPForUnity/Editor/Tools/Physics/ManagePhysics.cs (ManagePhysics.HandleCommand at 25), MCPForUnity/Editor/Services/AssetGen/ImageResultFormat.cs (ImageResultFormat.FromBytes at 24), TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/AssetUtilityService.cs (AssetUtilityService.GetAssetPathsFromAssets at 22), MCPForUnity/Editor/Tools/GameObjects/GameObjectMoveRelative.cs (GameObjectMoveRelative.GetDirectionVector at 20), and 4 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

script_apply_edits.script_apply_edits (cyclomatic 146)Server/src/services/tools/script_apply_edits.py:727
script_apply_edits._iter_csharp_tokens (cyclomatic 121)Server/src/services/tools/script_apply_edits.py:17
ManageScript.EditScript (cyclomatic 106)MCPForUnity/Editor/Tools/ManageScript.cs:1239
ManageScript.TryComputeMethodSpan (cyclomatic 99)MCPForUnity/Editor/Tools/ManageScript.cs:1826
GameObjectSerializer.GetComponentData (cyclomatic 80)MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:232

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

What to do

  1. Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with script_apply_edits.script_apply_edits (cyclomatic 146), script_apply_edits._iter_csharp_tokens (cyclomatic 121). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 4.4 to about 4.7/10, projected with the scoring formula itself and assuming each lands exactly at 120; 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 Complexity2.0 / 10Critical✓ 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 2.0 / 10 · rule-coverage 100% · ceiling Prevented

347 method(s) exceeded the cognitive complexity threshold of 15; the worst was script_apply_edits._iter_csharp_tokens at 396.

script_apply_edits._iter_csharp_tokens (cognitive 396)Server/src/services/tools/script_apply_edits.py:17
script_apply_edits.script_apply_edits (cognitive 264)Server/src/services/tools/script_apply_edits.py:727
ManageScript.EditScript (cognitive 221)MCPForUnity/Editor/Tools/ManageScript.cs:1239
ManageScript.TryComputeMethodSpan (cognitive 175)MCPForUnity/Editor/Tools/ManageScript.cs:1826
ServerManagementService.StopLocalHttpServerInternal (cognitive 169)REDACTED:596

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

What to do

  1. Bring the 9 bodies over 120 down to 120 or less in Cognitive Complexity — start with script_apply_edits._iter_csharp_tokens (cognitive 396), script_apply_edits.script_apply_edits (cognitive 264), ManageScript.EditScript (cognitive 221). — 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 9 together lifts Cognitive Complexity from 2.0 to about 2.7/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.3 / 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.3 / 10 · rule-coverage 100% · ceiling Prevented

77 god class(es) detected.

FileTooLong: ProBuilder/ManageProBuilder.cs · ×28MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs
MethodTooLong: ManageScript.EditScript · ×24MCPForUnity/Editor/Tools/ManageScript.cs:1239
ClassTooLong: ManageScriptableObject · ×17MCPForUnity/Editor/Tools/ManageScriptableObject.cs
TooManyMethods: ManageProBuilder · ×8MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs

What to do

  1. Resolve the 28 FileTooLong finding(s) in God Classes — start with ManageProBuilder.cs, ManageScript.cs, ManageScene.cs. — One of this dimension's main actionable groups (28 warning-level).
  2. Resolve the 24 MethodTooLong finding(s) in God Classes — start with ManageScript.cs (4), ManageUI.cs (2), GameObjectSerializer.cs. — One of this dimension's main actionable groups (24 warning-level).
  3. Resolve the 17 ClassTooLong finding(s) in God Classes — start with ManageScriptableObject.cs, ManagePrefabs.cs, MCPForUnityEditorWindow.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.1 / 10Stronggated by 251 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.1 / 10 · rule-coverage 100% · ceiling Verified

242 duplicated block group(s) detected. A further 9 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 15 of the 251 are in trees this repository does not ship — vendored, example/demo, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (6 lines × 2) · ×17MCPForUnity/Editor/Tools/ManageUI.cs:921
Duplicated block (11 lines × 2) · ×16MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:209
Duplicated block (10 lines × 2) · ×13MCPForUnity/Editor/Tools/Physics/PhysicsSettingsOps.cs:131
Duplicated block (5 lines × 2) · ×13MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:36
Duplicated block (9 lines × 2) · ×11MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:165

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

What to do

  1. Resolve the 17 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with ManageUI.cs (2), ObjectMemoryOps.cs, PhysicsQueryOps.cs. — One of this dimension's main actionable groups (17 warning-level).
  2. Resolve the 16 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with AnimatorControl.cs (2), PhysicsRigidbodyOps.cs, AssetPathUtility.cs. — One of this dimension's main actionable groups (16 warning-level).
  3. Resolve the 13 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with LineWrite.cs (2), PhysicsSettingsOps.cs, PhysicsMaterialOps.cs. — One of this dimension's main actionable groups (13 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 · Coupling7.3 / 10Strong✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

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

3 production modules (Python+Unity), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence.

Off the main sequence: MCPForUnity.Runtime

What to do

  1. Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  2. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 2 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.8 / 10 · rule-coverage 100% · ceiling Verified

2 of 136 classes have LCOM4 above 3.

Low cohesion: PathResolverService (LCOM4 4) · ×2MCPForUnity/Editor/Services/PathResolverService.cs:17

What to do

  1. Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with PathResolverService.cs, WorkflowBase.cs. — One of this dimension's main actionable groups (2 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

1515 test methods: 1215 unit, 300 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 8 `it`/`test` case(s) across 1 test file(s) declaring at least one; its tier split is read from package names and paths only. The Python suite contributes 1507 test function(s) across 104 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Prevented

4 skipped (4 with a documented reason), 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 1419 tests. Measured on the C# suite only — at least 115 test source file(s) (.py, .mjs) went unread, so its test quality is unmeasured and is not in these counts.

Skipped (documented): Summary_ContainsOnlyInstalledClients · ×4TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/ConfigureDetectedClientsTests.cs:15

✓ On the Gold path — maintain.

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

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

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

0 flaky across 1 measured tier(s). Python (2 distributions): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene9.4 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

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

7 outdated, 0 deprecated direct UPM dependency(ies) of 8 graded, 1 pinning defect(s), across 4 UPM manifest(s) and 1 committed packages-lock.json. Currency is graded on the version each project RESOLVED in its lockfile, not the minimum its manifest declares, and against the newest release that project's own Unity editor can take — a later release requiring a newer editor is not counted as an upgrade this repository is behind on, because installing it is not something the owner can do without changing editor. Whether any of these packages is UNMAINTAINED is not graded: the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either — that is a source question, not a registry one. Known CVEs in this dependency graph are D30's question.

UPM dependency `com.unity.ide.windsurf` is a git source with no revision
Outdated: com.unity.collab-proxy · ×7

What to do

  1. Resolve the 1 UPM dependency `com.unity.ide.windsurf` is a git source with no revision finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).
  2. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D13 · Secret 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

Secret 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 43 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 8 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (35 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. This repository publishes itself under MIT, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's Python distribution dependencies and nothing else. The repository also declares package.json and a Unity UPM manifest (Packages/manifest.json or a package's package.json), and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.4 / 10Stronggated by 19 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.4 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs (21×28=588); MCPForUnity/Editor/Tools/Sprite2D/SpriteControllerBuilder.cs (12×41=492); MCPForUnity/Editor/Tools/ManageScene.cs (6×44=264) Repeated repair below the complexity floor: MCPForUnity/Editor/Tools/CommandRegistry.cs (3 of 5 changes were fixes); Server/src/cli/commands/camera.py (3 of 3 changes were fixes)

Hotspot: MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs · ×17MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs:206
Repeated repair: MCPForUnity/Editor/Tools/CommandRegistry.cs · ×2MCPForUnity/Editor/Tools/CommandRegistry.cs:114

What to do

  1. Resolve the 17 Hotspot finding(s) in Churn × Complexity Hotspots — start with SpriteImportSetup.cs, SpriteControllerBuilder.cs, ManageScene.cs. — One of this dimension's main actionable groups (17 warning-level).
  2. Resolve the 2 Repeated repair finding(s) in Churn × Complexity Hotspots — start with CommandRegistry.cs, camera.py. — One of this dimension's main actionable groups (2 warning-level).

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

D16 · Bus Factor8.3 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

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

58 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs. Counted over 342 of the 598 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)

What to do

  1. Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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

D17 · Explicit Debt10.0 / 10Stronggated by 4 serious 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 10.0 / 10 · rule-coverage 100% · ceiling Prevented

4 deducted task-comment markers across 126622 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×4Server/src/services/resources/prefab.py:97

What to do

  1. Resolve the 4 TodoComment finding(s) in Explicit Debt — start with prefab.py, gameobject.py, plugin_hub.py. — One of this dimension's main actionable groups (4 warning-level).
  2. 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.

D19 · Documentation QualityExemplary◐ 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 Exemplary / 10 · rule-coverage 100% · ceiling Documented

The documentation is comprehensive and well-structured for a large architecture/roadmap project: the root README covers releases, an external-analytics doc explains cookieless analytics with public vs private visibility, and dedicated docs cover instance routing, physics management, Python three-layer design, remote auth, and a detailed 2026 roadmap. The release-notes document is clipped mid-series but its outline (Release Notes; v10.x series; What's Changed) exists, so the absence of an overview section in the root README does not trigger any defect. The repository's documentation is comprehensive and well-structured. The READMEs for each project (MCP for Unity) describe what they are and how to use their contents, while architecture/design docs cover the full scope (privacy-first telemetry, transport modes, API compatibility shims, release workflows). A single clipped architecture doc section does not invalidate its completeness; all outlined sections appear in the visible text. The READMEs are focused on usage rather than installation/contribution for their directories. (9 of 25 sampled documents could not be assessed: 1 of 3 evaluation groups failed.)

Documentation: contradicts the codewebsite/docs/contributing/releases.md

✓ On the Gold path — maintain.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D22 · Internal API ConsistencyStrong◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

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

3 API inconsistencies across 18 exposed types.

Duplicate intent with ambiguous naming. Both methods appear to query the same Unity physics setting (Auto Sync Transforms), but one is explicitly 2D and the other is generic. In Unity, 'Auto Sync Transforms' is a global setting affecting both 2D and 3D physics, making the 2D-specific name potentially misleading or redundant.
Duplicate intent with ambiguous naming. Same issue as the getters; two setters for what is likely the same underlying Unity property.
Inconsistent method naming and parameter structure. `CaptureToProjectFolder` implies capturing the screen (default behavior) but requires a `folderOverride` parameter. `CaptureFromCameraToProjectFolder` explicitly specifies the source (Camera) but has a different parameter list (e.g., `include...` suggests additional options not present in the first method). This forces users to remember two different signatures for similar 'save screenshot' operations.

What to do

  1. Resolve the 1 Duplicate intent with ambiguous naming. Both methods appear to query the… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Duplicate intent with ambiguous naming. Same issue as the getters; two… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Inconsistent method naming and parameter structure.… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

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

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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

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

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)0.1 / 10Critical✓ 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 0.1 / 10 · rule-coverage 100% · ceiling Documented

81 finding(s): 0 critical, 72 high, 8 medium, 1 low. 44 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 5 file(s) — `MCPForUnity/Editor/Services/AssetGen/FalModelSchema.cs` (line 197), `MCPForUnity/Editor/Tools/Graphics/SkyboxOps.cs` (line 20), `website/src/components/HomeFeatures/index.js` (lines 65–90), `website/src/components/HomeHero/index.js` (lines 14–101), `website/src/components/HomeStats/index.js` (lines 18–38) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 5 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 9 REDACTED finding(s) charged to Static Analysis (SAST) — the other 44 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (53 issue-level, 9 of them charged here).
  2. Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (9 issue-level).
  3. Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).

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

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

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 0.0 / 10 · rule-coverage 100% · ceiling Documented

18 finding(s): 5 critical, 6 high, 7 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 5 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 4 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4). — One of this dimension's main actionable groups (4 issue-level).
  3. Resolve the 1 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D31 · IaC & Container Security9.4 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

4 finding(s): 0 critical, 1 high, 2 medium, 1 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

D34 · Knowledge Freshness5.8 / 10Adequate✓ 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 5.8 / 10 · rule-coverage 100% · ceiling Documented

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

Orphaned knowledge · ×3MCPForUnity/Editor/External/Tommy.cs:1
Orphaned file · ×143MCPForUnity/Editor/Helpers/EditorWindowScreenshotUtility.cs:1
Further orphaned files (smaller)

What to do

  1. Resolve the 143 Orphaned file finding(s) in Knowledge Freshness — start with CachingService.cs (2), Package.cs (2), EditorWindowScreenshotUtility.cs. — One of this dimension's main actionable groups (143 recommendation-level).
  2. Resolve the 3 Orphaned knowledge finding(s) in Knowledge Freshness — start with Tommy.cs, SkillSyncService.cs, ScriptUtilityService.cs. — One of this dimension's main actionable groups (3 issue-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.9 / 10Stronggated by 4 serious findings✓ 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 9.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: REDACTED↔EditorPrefsWindow.cs 50%; McpClientConfigSection.cs↔EditorPrefsWindow.cs 50%; ConfigJsonBuilder.cs↔McpClientConfigSection.cs 50%

Change coupling: REDACTED ↔ EditorPrefsWindow.cs · ×4REDACTED:1

What to do

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

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

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ 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 5.0 / 10 · rule-coverage 100% · ceiling Documented

2/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

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

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.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 0 platform declaration(s) and 8 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.4 / 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. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.

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.

AX6 · Interface segregation9.8 / 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.

  • `IMcpClientConfigurator` declares 16 members: `Id`, `DisplayName`, `Status`, `ConfiguredTransport`, `SupportsAutoConfigure`, `IsInstalled`, `SupportedTransports`, `GetConfigureActionLabel`, `GetConfigPath`, `CheckStatus`, `Configure`, `Unregister`, `GetManualSnippet`, `GetInstallationSteps`, `SupportsSkills`, `GetSkillInstallPath`. 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. — MCPForUnity/Editor/Clients/IMcpClientConfigurator.cs:9

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
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.

C1 · Data Protection3.5 / 10Weak✓ Tool-verified

Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.

Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.

What to do

  • Strengthen data-at-rest protection: vault your keys (Azure Key Vault / AWS KMS / IDataProtector key ring) and encrypt the most sensitive columns (EF HasConversion encryption or provider-native column encryption) — partial coverage still leaves gaps.
  • Enforce HTTPS (UseHttpsRedirection / RequireHttpsMetadata) so data in transit is always encrypted.
C2 · Access Controls7.0 / 10Strong✓ Tool-verified

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

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

  • Authorization IS enforced here (by imperative guard methods that throw on violation) — this is NOT a claim that the code is unprotected. What's missing is a NAMED rule set: the guards encode the access rules inline, so the rules can't be listed, reviewed or tested apart from the call sites that apply them. Recommendation, not a defect.

What to do

  • Name the access rules — give each one a named predicate/policy object your guards consult, so the rule set can be reviewed and unit-tested independently of the call sites that enforce it.
C4 · Data Retention6.5 / 10Adequate✓ Tool-verified

Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).

Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.

  • A retention mechanism is present, but the data-lifecycle is not yet complete — missing: a scheduled purge / cleanup job (PurgeOlderThan / CleanupJob), a documented retention period / data-expiry.

What to do

  • Complete the data-lifecycle story: an expiry limit (a declared maximum age for the stored data — a retention-age setting, or a store-level TTL where your storage offers one), a scheduled purge/cleanup job that enforces it, and a documented retention period covering the personal data.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

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.

IC1 · Incompleteness & stubs7.8 / 10Strong✓ 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.

  • The `if` and its `else` contain the same 1 statement, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body. (×3) — CustomTools/RoslynRuntimeCompilation/RoslynRuntimeCompiler.cs:246, CustomTools/RoslynRuntimeCompilation/RoslynRuntimeCompiler.cs:358, MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs:181
  • Control only reaches here when `string.IsNullOrEmpty(name)` is false, because the guard on line 18 exits otherwise. This test is therefore always true and its `else`, and any code it is meant to skip, is unreachable. Implement the distinction that was intended, or delete the test. — MCPForUnity/Editor/Tools/GameObjects/GameObjectCreate.cs:101
  • Control only reaches here when `diagnostics.HasErrors` is false, because the guard on line 67 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test. — MCPForUnity/Editor/Tools/Sprite2D/SpriteFullSetup.cs:77
  • A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×35) — MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:235, MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:245, MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:480, …

What to do

  • 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)7.5 / 10Strong✓ 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 1 of 4 project(s) that lack one — worth up to 0.5 pts.
M2 · Architecture documentation5.0 / 10Adequate✓ 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.

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

  • Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.

What to do

  • Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
M4 · Documentation accuracy8.8 / 10Strong◐ 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.

  • Server/README.md changes into `unity-mcp/Server`, but no such folder exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — Server/README.md:108
  • Server/README.md links to `../docs/guides/REMOTE_SERVER_AUTH.md`, but `docs/guides/REMOTE_SERVER_AUTH.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — Server/README.md:236
  • Server/README.md links to `../docs/reference/REMOTE_SERVER_AUTH_ARCHITECTURE.md`, but `docs/reference/REMOTE_SERVER_AUTH_ARCHITECTURE.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — Server/README.md:236
  • docs/development/README-DEV-zh.md names `tools/list_changed`, but no file or folder `tools/list_changed` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/development/README-DEV-zh.md:61
  • docs/i18n/README-zh.md links to `../development/README-DEV.md`, but `docs/development/README-DEV.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/i18n/README-zh.md:166
  • docs/i18n/README-zh.md links to `../reference/CUSTOM_TOOLS.md`, but `docs/reference/CUSTOM_TOOLS.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/i18n/README-zh.md:166
  • docs/i18n/README-zh.md links to `../reference/TELEMETRY.md`, but `docs/reference/TELEMETRY.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/i18n/README-zh.md:174
  • website/docs/architecture/external-analytics.md links to `./telemetry`, but `website/docs/architecture/telemetry` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/architecture/external-analytics.md:17
  • website/docs/architecture/external-analytics.md documents the environment variable `COPLAY_STATS_TOKEN`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/architecture/external-analytics.md:49
  • website/docs/architecture/instance-routing.md links to `/guides/multi-instance`, but `guides/multi-instance` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/architecture/instance-routing.md:17
  • website/docs/architecture/python-layers.md links to `/reference/tools`, but `reference/tools` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/architecture/python-layers.md:45
  • website/docs/architecture/python-layers.md links to `/guides/tool-groups`, but `guides/tool-groups` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/architecture/python-layers.md:47
  • website/docs/architecture/transports.md links to `/guides/multi-instance`, but `guides/multi-instance` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/architecture/transports.md:80
  • website/docs/architecture/transports.md links to `/migrations/v8`, but `migrations/v8` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/architecture/transports.md:98
  • website/docs/contributing/dev-setup.md names `tools/list_changed`, but no file or folder `tools/list_changed` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/contributing/dev-setup.md:139
  • website/docs/contributing/testing.md links to `/architecture/unity-compat`, but `architecture/unity-compat` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/contributing/testing.md:82
  • website/docs/getting-started/clients.md links to `/guides/multi-instance`, but `guides/multi-instance` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/getting-started/clients.md:34
  • website/docs/getting-started/first-prompt.md links to `./install`, but `website/docs/getting-started/install` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/getting-started/first-prompt.md:15
  • website/docs/getting-started/first-prompt.md links to `/guides/tool-groups`, but `guides/tool-groups` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/getting-started/first-prompt.md:50
  • website/docs/getting-started/first-prompt.md links to `/guides/multi-instance`, but `guides/multi-instance` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/getting-started/first-prompt.md:55
  • website/docs/getting-started/first-prompt.md links to `./clients`, but `website/docs/getting-started/clients` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/getting-started/first-prompt.md:60
  • website/docs/getting-started/first-prompt.md links to `/reference/tools`, but `reference/tools` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/getting-started/first-prompt.md:62
  • website/docs/getting-started/install.md links to `/guides/client-configurators`, but `guides/client-configurators` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/getting-started/install.md:74
  • website/docs/guides/claude-code-cli.md links to `/guides/troubleshooting#macos-claude-cli-fails-to-start-dyld-icu-library-not-loaded`, but `guides/troubleshooting` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/guides/claude-code-cli.md:71
  • website/docs/guides/multi-instance.md links to `/reference/tools/core/set_active_instance`, but `reference/tools/core/set_active_instance` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/guides/multi-instance.md:124
  • website/docs/guides/multi-instance.md links to `/reference/resources`, but `reference/resources` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/guides/multi-instance.md:125
  • website/docs/guides/multi-instance.md links to `/architecture/instance-routing`, but `architecture/instance-routing` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/guides/multi-instance.md:126
  • website/docs/guides/tool-groups.md links to `/reference/tools/core/manage_tools`, but `reference/tools/core/manage_tools` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/guides/tool-groups.md:80
  • website/docs/guides/tool-groups.md links to `/reference/resources`, but `reference/resources` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/guides/tool-groups.md:81
  • website/docs/guides/uv-setup.md runs `powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1`, but `https:/astral.sh/uv/install.ps1` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/guides/uv-setup.md:65
  • website/docs/migrations/v6.md links to `/img/v6_new_ui_dark.png`, but `img/v6_new_ui_dark.png` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/migrations/v6.md:5
  • website/docs/migrations/v6.md links to `/img/v6_new_ui_light.png`, but `img/v6_new_ui_light.png` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/migrations/v6.md:8
  • website/docs/migrations/v6.md links to `/img/v6_new_ui_asset_store_version.png`, but `img/v6_new_ui_asset_store_version.png` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/migrations/v6.md:59
  • website/docs/migrations/v6.md names `SetupWizard.cs`, but no file or folder `SetupWizard.cs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/migrations/v6.md:233
  • website/docs/migrations/v6.md names `PackageDetector.cs`, but no file or folder `PackageDetector.cs` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/migrations/v6.md:234
  • website/docs/migrations/v8.md links to `/img/networking-architecture.png`, but `img/networking-architecture.png` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/migrations/v8.md:15
  • website/docs/reference/cli.md links to `/architecture/python-layers`, but `architecture/python-layers` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/reference/cli.md:11
  • website/docs/reference/cli.md links to `/guides/multi-instance`, but `guides/multi-instance` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/reference/cli.md:44
  • website/docs/reference/cli.md links to `/reference/tools/core/manage_scene`, but `reference/tools/core/manage_scene` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/reference/cli.md:56
  • website/docs/reference/cli.md links to `/reference/tools/core/manage_gameobject`, but `reference/tools/core/manage_gameobject` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — website/docs/reference/cli.md:57

What to do

  • Reconcile the README with reality: Server/README.md changes into `unity-mcp/Server`, but no such folder exists; Server/README.md links to `../docs/guides/REMOTE_SERVER_AUTH.md`, but `docs/guides/REMOTE_SERVER_AUTH.md` does not exist; Server/README.md links to `../docs/reference/REMOTE_SERVER_AUTH_ARCHITECTURE.md`, but `docs/reference/REMOTE_SERVER_AUTH_ARCHITECTURE.md` does not exist; docs/development/README-DEV-zh.md names `tools/list_changed`, but no file or folder `tools/list_changed` exists; docs/i18n/README-zh.md links to `../development/README-DEV.md`, but `docs/development/README-DEV.md` does not exist.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

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

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

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 `semgrep --config=auto` plus gitleaks for committed secrets — this tree has no MSBuild project file, so CodeQL's csharp pack (which traces a build) and NuGet security analyzers (which are referenced from a project) have nothing to attach to as a CI step. What was searched, so you can tell an absence from a miss: the 136004 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: `semgrep --config=auto` plus gitleaks for committed secrets — this tree has no MSBuild project file, so CodeQL's csharp pack (which traces a build) and NuGet security analyzers (which are referenced from a project) have nothing to attach to — 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 & Rollback7.0 / 10Strong✓ 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.

  • Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.

What to do

  • Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
  • No persistence guard on critical data stores — use Docker named volumes (or your orchestrator's persistent-volume equivalent) so the data store can't be wiped by a container recreate (or, in cloud, set purge-protection / soft-delete / prevent_destroy).
P6 · Release Hygiene10.0 / 10Exemplary✓ 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.

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.0 / 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 9 use(s) across 99,794 production line(s) (~0.1/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.

  • 9 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). (×8) — MCPForUnity/Editor/Services/BridgeControlService.cs:141, MCPForUnity/Editor/Services/Transport/TransportManager.cs:192, MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs:236, …
  • `Item1.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). — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:168

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 Hygiene6.0 / 10Adequate✓ 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.

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

  • MD5/SHA1 is 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. (×5) — MCPForUnity/Editor/Helpers/PortManager.cs:331, MCPForUnity/Editor/Helpers/ProjectIdentityUtility.cs:92, MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:1190, …
  • `Iterations` fixes PBKDF2-SHA-256 at 200,000 iterations. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price. — MCPForUnity/Editor/Security/SecureKeyStore/EncryptedFileKeyStore.cs:20

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (`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 5 sites, not one: `MCPForUnity/Editor/Helpers/PortManager.cs:331` (SHA1), `MCPForUnity/Editor/Helpers/ProjectIdentityUtility.cs:92` (SHA1), `MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:1190` (SHA1), `MCPForUnity/Editor/Setup/SkillSyncService.cs:499` (SHA1), `MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:885` (MD5). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Raise the cost parameter to current guidance — PBKDF2 at 1,300,000 (HMAC-SHA1), 600,000 (SHA-256) or 210,000 (SHA-512) iterations; scrypt at N=2^17, r=8, p=1; bcrypt at a work factor of 10 or more — or move to a memory-hard KDF (Argon2id, scrypt) where the platform offers one. Read the parameter from configuration and tune it to roughly 100 ms per derivation on the slowest hardware that must run it, so the price can be raised again without shipping new code.
X1 · Async correctness4.9 / 10Weak✓ Tool-verified

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

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

  • `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) — MCPForUnity/Editor/MenuItems/BlenderBridgeMenu.cs:22, MCPForUnity/Editor/MenuItems/BlenderBridgeMenu.cs:29, MCPForUnity/Editor/MenuItems/BlenderBridgeMenu.cs:36, …
  • 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. (×8) — MCPForUnity/Editor/Services/BridgeControlService.cs:141, MCPForUnity/Editor/Services/Transport/TransportManager.cs:192, MCPForUnity/Editor/Setup/SkillSyncService.cs:293, …
  • `Task.WaitAll` blocks this thread until the tasks complete — sync-over-async: it can deadlock under a synchronization context and it parks a thread for as long as the work runs. `await Task.WhenAll(…)` instead. — MCPForUnity/Editor/Services/McpEditorShutdownCleanup.cs:47
  • Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout. (×10) — MCPForUnity/Editor/Services/TestJobManager.cs:735, TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Abstractions/AuthenticationBase.cs:37, TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Abstractions/PackageUploaderBase.cs:26, …
  • `.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). — MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:493
  • Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` wastes a thread and, if the task needs a context this one is holding, deadlocks. `Dispose()` returns void by contract, so it cannot simply `await`: signal the work to stop first (cancel its token, set its stop flag) so the wait is short, give the wait a TIMEOUT so a hung task cannot hang shutdown, and — where callers can use it — add an awaitable teardown (`DisposeAsync`/`StopAsync`) beside the synchronous one and let `Dispose()` remain the bounded fallback. — MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs:236

What to do

  • async void method: ImportSelection
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 stream5.8 / 10Adequate✓ Tool-verified

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

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

  • `RedirectStandardError` is set here, but nothing in this type ever reads `StandardError` — while `StandardOutput` is read to the end. The child blocks as soon as it fills the StandardError pipe (~4 KB, never more than 64 KB), and it can then never finish writing StandardOutput, so the read-to-end above never returns and the `WaitForExit` timeout beside it does not help: the timeout bounds the WAIT, not the read that precedes it. Drain both — read one stream on a background thread (`BeginErrorReadLine()` with an `ErrorDataReceived` handler, or a `Task` running the second `ReadToEndAsync()`) and await both before `WaitForExit()` — or stop redirecting the stream you do not consume. — MCPForUnity/Editor/Security/SecureKeyStore/LinuxSecretToolKeyStore.cs:91

What to do

  • Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
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 reader10.0 / 10Exemplary○ Nothing flagged

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

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

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.

  • `TrySetShaderProperty` is public and takes the `JToken` from its caller, and it calls itself at line 221 with a child of the node it was given — and nowhere in `TrySetShaderProperty` 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 `TrySetShaderProperty` can intervene. Thread a depth argument through `TrySetShaderProperty` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack. — MCPForUnity/Editor/Helpers/MaterialOps.cs:221

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 correctness10.0 / 10Exemplary○ Nothing flagged

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.

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 propagation7.4 / 10Strong✓ 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 51/90 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
  • No CancellationToken parameter — this work can't be stopped early once started. (×37) — MCPForUnity/Editor/Services/HttpAutoStartHandler.cs:287, MCPForUnity/Editor/Services/HttpBridgeReloadHandler.cs:146, MCPForUnity/Editor/Services/StdioBridgeReloadHandler.cs:133, …
  • Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one. (×2) — MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:1004, MCPForUnity/Editor/Tools/CommandRegistry.cs:433

What to do

  • Thread a CancellationToken through async methods so work stops promptly on cancellation.
X20 · Mistyped argument guard5.0 / 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 698 rejects `projectDir` and line 700 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(projectDir)` is true of a value that is NOT null: it is satisfied by an EMPTY `projectDir`, and on that path `projectDir` 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. — MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:700
  • The guard on line 117 rejects `providerJobId` and line 117 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(providerJobId)` is true of a value that is NOT null: it is satisfied by an EMPTY `providerJobId`, and on that path `providerJobId` 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. — MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:117
  • The guard on line 89 rejects `providerJobId` and line 89 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(providerJobId)` is true of a value that is NOT null: it is satisfied by an EMPTY `providerJobId`, and on that path `providerJobId` 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. — MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs:89
  • The guard on line 80 rejects `providerJobId` and line 80 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(providerJobId)` is true of a value that is NOT null: it is satisfied by an EMPTY `providerJobId`, and on that path `providerJobId` 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. — MCPForUnity/Editor/Services/AssetGen/Providers/MeshyAdapter.cs:80
  • The guard on line 40 rejects `uid` and line 40 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(uid)` is true of a value that is NOT null: it is satisfied by an EMPTY `uid`, and on that path `uid` 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. — MCPForUnity/Editor/Services/AssetGen/Providers/SketchfabAdapter.cs:40
  • The guard on line 50 rejects `uid` and line 50 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(uid)` is true of a value that is NOT null: it is satisfied by an EMPTY `uid`, and on that path `uid` 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. — MCPForUnity/Editor/Services/AssetGen/Providers/SketchfabAdapter.cs:50
  • The guard on line 86 rejects `providerJobId` and line 86 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(providerJobId)` is true of a value that is NOT null: it is satisfied by an EMPTY `providerJobId`, and on that path `providerJobId` 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. — MCPForUnity/Editor/Services/AssetGen/Providers/TripoAdapter.cs:86

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.

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.

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 handling4.7 / 10Weak✓ 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. (×39) — MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:1013, MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs:171, MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs:169, …
  • `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:317

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 logging5.5 / 10Adequate✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it. (×11) — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/ApiUtility.cs:48, TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Exporter/DefaultPackageExporter.cs:67, TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Exporter/LegacyPackageExporter.cs:72, …

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • This method contradicts itself about `mcpServers`: line 98 assigns it with `as TomlTable`, which hands back null rather than throwing when the value is not a `TomlTable`, but line 101 then dereferences it directly with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `mcpServers` once before the first use and handle the null case, or cast with `(TomlTable)` so the failure is reported where it happens — rather than leaving the two readings side by side. — MCPForUnity/Editor/Helpers/CodexConfigHelper.cs:101
  • This method contradicts itself about `tr`: line 244 assigns it with `as Transform`, which hands back null rather than throwing when the value is not a `Transform`, but line 249 then dereferences it directly as `tr.GetInstanceIDCompat` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `tr` once before the first use and handle the null case, or cast with `(Transform)` so the failure is reported where it happens — rather than leaving the two readings side by side. — MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:249
  • This method contradicts itself about `cam`: line 273 assigns it with `as Camera`, which hands back null rather than throwing when the value is not a `Camera`, but line 279 then dereferences it directly as `cam.nearClipPlane` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `cam` once before the first use and handle the null case, or cast with `(Camera)` so the failure is reported where it happens — rather than leaving the two readings side by side. — MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:279
  • This method contradicts itself about `model`: line 57 writes `model?.`, which says `model` can be null, but line 64 then dereferences it directly with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `model` truly cannot be null here, the `?.` is misleading. Settle it one way — test `model` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — MCPForUnity/Editor/Services/AssetGen/FalModelSchema.cs:64
  • This method contradicts itself about `metadata`: line 58 assigns it with `as JObject`, which hands back null rather than throwing when the value is not a `JObject`, but line 82 then dereferences it directly with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `metadata` once before the first use and handle the null case, or cast with `(JObject)` so the failure is reported where it happens — rather than leaving the two readings side by side. — MCPForUnity/Editor/Services/AssetGen/FalModelSchema.cs:82
  • This method contradicts itself about `input`: line 73 writes `input?.`, which says `input` can be null, but line 74 then dereferences it directly with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `input` truly cannot be null here, the `?.` is misleading. Settle it one way — test `input` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — MCPForUnity/Editor/Services/AssetGen/FalModelSchema.cs:74
  • This method contradicts itself about `job`: line 153 writes `job?.AnimationType`, which says `job` can be null, but line 155 then dereferences it directly as `job.TargetSize` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `job` truly cannot be null here, the `?.` is misleading. Settle it one way — test `job` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — MCPForUnity/Editor/Services/AssetGen/Import/ModelImportPipeline.cs:155
  • This method contradicts itself about `response`: line 151 writes `response?.`, which says `response` can be null, but line 153 then dereferences it directly with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `response` truly cannot be null here, the `?.` is misleading. Settle it one way — test `response` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — MCPForUnity/Editor/Services/Blender/BlenderSocketClient.cs:153
  • This method contradicts itself about `@params`: line 1342 writes `@params?.`, which says `@params` can be null, but line 1350 then dereferences it directly with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `@params` truly cannot be null here, the `?.` is misleading. Settle it one way — test `@params` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — MCPForUnity/Editor/Tools/ManageScriptableObject.cs:1350
  • This method contradicts itself about `settings`: line 858 assigns it with `as JObject`, which hands back null rather than throwing when the value is not a `JObject`, but line 861 then dereferences it directly with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `settings` once before the first use and handle the null case, or cast with `(JObject)` so the failure is reported where it happens — rather than leaving the two readings side by side. — MCPForUnity/Editor/Tools/ManageTexture.cs:861
  • This method contradicts itself about `faceList`: line 428 assigns it with `as System.Collections.IList`, which hands back null rather than throwing when the value is not a `System.Collections.IList`, but line 430 then dereferences it directly as `faceList.Add` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `faceList` once before the first use and handle the null case, or cast with `(System.Collections.IList)` so the failure is reported where it happens — rather than leaving the two readings side by side. — MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:430
  • This method contradicts itself about `typedList`: line 540 assigns it with `as System.Collections.IList`, which hands back null rather than throwing when the value is not a `System.Collections.IList`, but line 542 then dereferences it directly as `typedList.Add` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `typedList` once before the first use and handle the null case, or cast with `(System.Collections.IList)` so the failure is reported where it happens — rather than leaving the two readings side by side. — MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:542
  • This method contradicts itself about `typedList`: line 1406 assigns it with `as System.Collections.IList`, which hands back null rather than throwing when the value is not a `System.Collections.IList`, but line 1408 then dereferences it directly as `typedList.Add` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `typedList` once before the first use and handle the null case, or cast with `(System.Collections.IList)` so the failure is reported where it happens — rather than leaving the two readings side by side. — MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1408
  • This method contradicts itself about `typedList`: line 1507 assigns it with `as System.Collections.IList`, which hands back null rather than throwing when the value is not a `System.Collections.IList`, but line 1509 then dereferences it directly as `typedList.Add` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `typedList` once before the first use and handle the null case, or cast with `(System.Collections.IList)` so the failure is reported where it happens — rather than leaving the two readings side by side. — MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1509
  • This method contradicts itself about `propertyValue`: line 136 assigns it with `as SerializedProperty`, which hands back null rather than throwing when the value is not a `SerializedProperty`, but line 137 then dereferences it directly as `propertyValue.stringValue` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `propertyValue` once before the first use and handle the null case, or cast with `(SerializedProperty)` so the failure is reported where it happens — rather than leaving the two readings side by side. — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ModelUtilityService.cs:137
  • 0/599 C# file(s) are in a nullable-enabled context. This repository commits no project file, so nothing sets <Nullable>enable</Nullable> for it: a file is enabled only by its own `#nullable enable`, by a Unity `csc.rsp` with `-nullable:enable` for its assembly, or as a file-based app (`#:` directives) whose `#:property Nullable` does not turn it off. NRTs catch a whole class of null-deref bugs at compile time.

What to do

  • Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.
  • Put every file in a nullable-enabled context — `#nullable enable` at its top, or commit a project file with <Nullable>enable</Nullable> — and resolve warnings rather than suppressing with `!`.

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 D2, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture95%ExemplaryStrongest area.
Maturity70%AdequateAcceptable, with room to improve.
Readiness56%Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security55%Adequate — gated by D29, D30, C1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60%AdequateAcceptable, with room to improve.
Unscored — 3 check(s) recorded observations but carry no score

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

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • X10 Duplicated predicate — 12 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Repo shows no audit-logging mechanism (IAuditable, an immutable audit log, an EF SaveChanges interceptor) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
  • C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
Not included — 40 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 17 — an image could not be built) — failed to solve: python:3.13-slim: failed to resolve source metadata for docker.io/library/python:3.13-slim: failed to do request: Head "https://registry-1.docker.io/v2/library/python/manifests/3.13-slim": Forbidden; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D27 Navigability — Most of this repository's production source (.cs) was not read by navigability analysis, so tracing effort was not assessed — whatever else resolved (another language's projects) is not this repository's navigability. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 5 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (26 value object(s))
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable (this repository commits no MSBuild project, so its C# was read as syntax-only projects — a handler marked ONLY by an interface from a package is not visible without a build)
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
  • P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — 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
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X24 Document value interpolated into markup unescaped — This check needs a compiled C# program and this repository commits no project file to compile, so only its syntax could be read. That is a limit of the analyzer, not a finding about your code.
  • X27 Collection changed while being enumerated — This check needs a compiled C# program and this repository commits no project file to compile, so only its syntax could be read. That is a limit of the analyzer, not a finding about your code.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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 — 87 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 28 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×3
  • Orphaned knowledge MCPForUnity/Editor/External/Tommy.cs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge MCPForUnity/Editor/Setup/SkillSyncService.cs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical vulnerability · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
D31 · IaC & Container Security · High IaC · ×1
  • REDACTED
Serious — 1111 finding(s)
X3 · Exception handling · Swallowed exception (empty catch) · ×39
  • Swallowed exception (empty catch) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:1013 — 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) MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs:171 — 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) MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs:169 — 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) MCPForUnity/Editor/Dependencies/PlatformDetectors/PlatformDetectorBase.cs:141 — 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) MCPForUnity/Editor/Dependencies/PlatformDetectors/PlatformDetectorBase.cs:186 — 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) MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs:226 — 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) MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs:268 — 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) MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs:327 — 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) MCPForUnity/Editor/Helpers/AssetPathUtility.cs:437 — 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) MCPForUnity/Editor/Helpers/BlenderDetection.cs:117 — 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) MCPForUnity/Editor/Helpers/BlenderDetection.cs:181 — 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) REDACTED:24 — 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) REDACTED:153 — 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) REDACTED:166 — 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) REDACTED:266 — 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) MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:582 — 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) MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:605 — 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) MCPForUnity/Editor/Helpers/MaterialOps.cs:223 — 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) MCPForUnity/Editor/Helpers/MaterialOps.cs:356 — 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) MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs:38 — 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) MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs:96 — 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) MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs:129 — 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) MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs:260 — 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) MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs:273 — 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) MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs:276 — 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.
  • + 14 more in this group — see findings.md.
X2 · Cancellation propagation · Async method without CancellationToken · ×37
  • Async method without CancellationToken: WaitForServerAndConnectAsync MCPForUnity/Editor/Services/HttpAutoStartHandler.cs:287 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: ResumeHttpWithRetriesAsync MCPForUnity/Editor/Services/HttpBridgeReloadHandler.cs:146 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: ResumeStdioWithRetriesAsync MCPForUnity/Editor/Services/StdioBridgeReloadHandler.cs:133 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetTestsAsync MCPForUnity/Editor/Services/TestRunnerService.cs:186 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RunTestsAsync MCPForUnity/Editor/Services/TestRunnerService.cs:213 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RetrieveTestRootAsync MCPForUnity/Editor/Services/TestRunnerService.cs:581 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: WaitForBridgeReadyAsync MCPForUnity/Editor/Services/Transport/Transports/StdioTransportClient.cs:77 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: StopAsync MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs:132 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: VerifyAsync MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs:200 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: StopConnectionLoopsAsync MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs:328 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: ReregisterToolsAsync MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs:577 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: HandleSocketClosureAsync MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs:745 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: HandleCommand MCPForUnity/Editor/Tools/BatchExecute.cs:34 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CheckUpdatesAsync MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:676 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CaptureCompositedScreenshotAsync MCPForUnity/Editor/Tools/ManageScene.cs:755 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: TakeSnapshotAsync MCPForUnity/Editor/Tools/Profiler/Operations/MemorySnapshotOps.cs:20 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: HandleCommand MCPForUnity/Editor/Tools/RefreshUnity.cs:33 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: RefreshCatalog MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs:193 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: TryAutoStartSessionAsync MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:755 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GetLoginUrlAsync MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:1026 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: CaptureCompositedAsync MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:197 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: Export TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Exporter/LegacyPackageExporter.cs:36 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GenerateImpl TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/AudioTypePreviewGenerator.cs:69 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GeneratePreviewsInScene TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/MaterialTypePreviewGenerator.cs:42 — No CancellationToken parameter — this work can't be stopped early once started.
  • Async method without CancellationToken: GeneratePreviewsInScene TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs:40 — No CancellationToken parameter — this work can't be stopped early once started.
  • + 12 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×28
  • FileTooLong: ProBuilder/ManageProBuilder.cs MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs — FileTooLong — 1511 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1011 over it, 3.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Tools/ManageScript.cs MCPForUnity/Editor/Tools/ManageScript.cs — FileTooLong — 1474 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 974 over it, 2.95× 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: Tools/ManageScene.cs MCPForUnity/Editor/Tools/ManageScene.cs — FileTooLong — 1271 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 771 over it, 2.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: tools/local_harness.py tools/local_harness.py — FileTooLong — 1159 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 659 over it, 2.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: External/Tommy.cs MCPForUnity/Editor/External/Tommy.cs — FileTooLong — 1130 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 630 over it, 2.26× 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: Tools/ManageUI.cs MCPForUnity/Editor/Tools/ManageUI.cs — FileTooLong — 1106 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 606 over it, 2.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: tools/script_apply_edits.py Server/src/services/tools/script_apply_edits.py — FileTooLong — 1031 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 531 over it, 2.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: transport/plugin_hub.py Server/src/transport/plugin_hub.py — FileTooLong — 782 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 282 over it, 1.56× 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: Clients/McpClientConfiguratorBase.cs MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs — FileTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 254 over it, 1.51× 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: Tools/ManageScriptableObject.cs MCPForUnity/Editor/Tools/ManageScriptableObject.cs — FileTooLong — 753 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 253 over it, 1.51× 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: legacy/unity_connection.py Server/src/transport/legacy/unity_connection.py — FileTooLong — 700 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 200 over it, 1.40× 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: Prefabs/ManagePrefabs.cs MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs — FileTooLong — 677 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 177 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Connection/McpConnectionSection.cs MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs — FileTooLong — 673 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 173 over it, 1.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Windows/MCPForUnityEditorWindow.cs MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs — FileTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 135 over it, 1.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Transports/StdioBridgeHost.cs MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs — FileTooLong — 634 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 134 over it, 1.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Tools/ManageTexture.cs MCPForUnity/Editor/Tools/ManageTexture.cs — FileTooLong — 614 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 114 over it, 1.23× 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: tools/unity_docs.py Server/src/services/tools/unity_docs.py — FileTooLong — 582 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 82 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: Tools/ManageAsset.cs MCPForUnity/Editor/Tools/ManageAsset.cs — FileTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 71 over it, 1.14× 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: commands/animation.py Server/src/cli/commands/animation.py — FileTooLong — 557 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 57 over it, 1.11× 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: Blender/BlenderBridgeTool.cs MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs — FileTooLong — 553 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 53 over it, 1.11× 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: Helpers/ScreenshotUtility.cs MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs — FileTooLong — 544 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 44 over it, 1.09× 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: tools/manage_script.py Server/src/services/tools/manage_script.py — FileTooLong — 534 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 34 over it, 1.07× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Helpers/ComponentOps.cs MCPForUnity/Editor/Helpers/ComponentOps.cs — FileTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 27 over it, 1.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Tools/ExecuteCode.cs MCPForUnity/Editor/Tools/ExecuteCode.cs — FileTooLong — 526 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 26 over it, 1.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Physics/PhysicsQueryOps.cs MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs — FileTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 11 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 3 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×24
  • MethodTooLong: ManageScript.EditScript MCPForUnity/Editor/Tools/ManageScript.cs:1239 — MethodTooLong — EditScript runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.88× 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: ManageUI.RenderUI MCPForUnity/Editor/Tools/ManageUI.cs:820 — MethodTooLong — RenderUI runs 229 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 129 over it, 2.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: GameObjectSerializer.GetComponentData MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:232 — MethodTooLong — GetComponentData runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GameObjectCreate.Handle MCPForUnity/Editor/Tools/GameObjects/GameObjectCreate.cs:15 — MethodTooLong — Handle runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× 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: ManageScript.ApplyTextEdits MCPForUnity/Editor/Tools/ManageScript.cs:517 — MethodTooLong — ApplyTextEdits runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× 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: ManageProBuilder.CreateShapeViaGenerator MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:606 — MethodTooLong — CreateShapeViaGenerator runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× 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: ManageScriptableObject.TrySetValueRecursive MCPForUnity/Editor/Tools/ManageScriptableObject.cs:788 — MethodTooLong — TrySetValueRecursive runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× 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: MCPForUnityEditorWindow.CreateGUI MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs:147 — MethodTooLong — CreateGUI runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ServerManagementService.StopLocalHttpServerInternal REDACTED:596 — MethodTooLong — StopLocalHttpServerInternal 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: GameObjectModify.Handle MCPForUnity/Editor/Tools/GameObjects/GameObjectModify.cs:15 — MethodTooLong — Handle 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: ManageScript.TryComputeMethodSpan MCPForUnity/Editor/Tools/ManageScript.cs:1826 — MethodTooLong — TryComputeMethodSpan runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× 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: ManageScene.CaptureScreenshot MCPForUnity/Editor/Tools/ManageScene.cs:516 — MethodTooLong — CaptureScreenshot 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: ManageScript.HandleCommand MCPForUnity/Editor/Tools/ManageScript.cs:123 — MethodTooLong — HandleCommand 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: ManagePrefabs.ApplyModificationsToPrefabObject MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:744 — MethodTooLong — ApplyModificationsToPrefabObject runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TOMLParser.Parse MCPForUnity/Editor/External/Tommy.cs:648 — MethodTooLong — Parse runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× 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: ManageGameObjectCommon.FindObjectsInternal MCPForUnity/Editor/Tools/GameObjects/ManageGameObjectCommon.cs:33 — MethodTooLong — FindObjectsInternal runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StdioBridgeHost.HandleClientAsync MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:563 — MethodTooLong — HandleClientAsync 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: ReadConsole.GetConsoleEntries MCPForUnity/Editor/Tools/ReadConsole.cs:345 — MethodTooLong — GetConsoleEntries 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: ScriptParser.RemoveStringsAndComments TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:285 — MethodTooLong — RemoveStringsAndComments 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: JointOps.ConfigureJoint MCPForUnity/Editor/Tools/Physics/JointOps.cs:150 — MethodTooLong — ConfigureJoint runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ManageTexture.ConfigureTextureImporter MCPForUnity/Editor/Tools/ManageTexture.cs:844 — MethodTooLong — ConfigureTextureImporter runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ManageUI.ApplyInlineStyles MCPForUnity/Editor/Tools/ManageUI.cs:1593 — MethodTooLong — ApplyInlineStyles runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ClipPresets.CreatePreset MCPForUnity/Editor/Tools/Animation/ClipPresets.cs:14 — MethodTooLong — CreatePreset runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× 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: TransportCommandDispatcher.ProcessCommand MCPForUnity/Editor/Services/Transport/TransportCommandDispatcher.cs:271 — MethodTooLong — ProcessCommand runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×17
  • Hotspot: MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs:206 — MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in SpriteImportSetup.SliceSheet at line 206. 18 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.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: MCPForUnity/Editor/Tools/Sprite2D/SpriteControllerBuilder.cs MCPForUnity/Editor/Tools/Sprite2D/SpriteControllerBuilder.cs:64 — MCPForUnity/Editor/Tools/Sprite2D/SpriteControllerBuilder.cs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in SpriteControllerBuilder.BuildController at line 64. 11 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Tools/Sprite2D/SpriteControllerBuilder.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: MCPForUnity/Editor/Tools/ManageScene.cs MCPForUnity/Editor/Tools/ManageScene.cs:516 — MCPForUnity/Editor/Tools/ManageScene.cs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in ManageScene.CaptureScreenshot at line 516. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Tools/ManageScene.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: tools/local_harness.py tools/local_harness.py:1436 — tools/local_harness.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in local_harness.main at line 1436. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- tools/local_harness.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: Server/src/services/tools/manage_sprite.py Server/src/services/tools/manage_sprite.py:56 — Server/src/services/tools/manage_sprite.py changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in manage_sprite.manage_sprite at line 56. 5 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- Server/src/services/tools/manage_sprite.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: MCPForUnity/Editor/Tools/Sprite2D/SpriteClipBuilder.cs MCPForUnity/Editor/Tools/Sprite2D/SpriteClipBuilder.cs:57 — MCPForUnity/Editor/Tools/Sprite2D/SpriteClipBuilder.cs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in SpriteClipBuilder.CreateClips at line 57. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Tools/Sprite2D/SpriteClipBuilder.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: MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:689 — MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in BlenderBridgeTool.CheckUpdatesBlocking at line 689. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.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: MCPForUnity/Editor/Tools/Sprite2D/SpriteFullSetup.cs MCPForUnity/Editor/Tools/Sprite2D/SpriteFullSetup.cs:26 — MCPForUnity/Editor/Tools/Sprite2D/SpriteFullSetup.cs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in SpriteFullSetup.Run at line 26. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Tools/Sprite2D/SpriteFullSetup.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: MCPForUnity/Editor/Tools/ReadConsole.cs MCPForUnity/Editor/Tools/ReadConsole.cs:345 — MCPForUnity/Editor/Tools/ReadConsole.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in ReadConsole.GetConsoleEntries at line 345. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Tools/ReadConsole.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: MCPForUnity/Editor/Tools/RefreshUnity.cs MCPForUnity/Editor/Tools/RefreshUnity.cs:33 — MCPForUnity/Editor/Tools/RefreshUnity.cs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in RefreshUnity.HandleCommand at line 33. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Tools/RefreshUnity.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: MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs:465 — MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in McpAssetGenSection.PopulateModelDropdown at line 465. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.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: MCPForUnity/Editor/Tools/Sprite2D/SpriteNamingDetector.cs MCPForUnity/Editor/Tools/Sprite2D/SpriteNamingDetector.cs:77 — MCPForUnity/Editor/Tools/Sprite2D/SpriteNamingDetector.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in SpriteNamingDetector.Words at line 77. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Tools/Sprite2D/SpriteNamingDetector.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: MCPForUnity/Editor/Tools/AssetGen/AssetGenToolHelpers.cs MCPForUnity/Editor/Tools/AssetGen/AssetGenToolHelpers.cs:68 — MCPForUnity/Editor/Tools/AssetGen/AssetGenToolHelpers.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in AssetGenToolHelpers.ListModels at line 68. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Tools/AssetGen/AssetGenToolHelpers.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: Server/src/utils/focus_nudge.py Server/src/utils/focus_nudge.py:411 — Server/src/utils/focus_nudge.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in focus_nudge._find_unity_pid_by_project_path_windows at line 411. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- Server/src/utils/focus_nudge.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: tools/check_unity_test_results.py tools/check_unity_test_results.py:17 — tools/check_unity_test_results.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in check_unity_test_results.check_results at line 17. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- tools/check_unity_test_results.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:27 — MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in FalAdapter.SubmitAsync at line 27. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.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: MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs:207 — MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in FalModelCatalog.Details at line 207. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-21..2026-10-19, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-21 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.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.
D3 · God Classes · ClassTooLong · ×17
  • ClassTooLong: ManageScriptableObject MCPForUnity/Editor/Tools/ManageScriptableObject.cs — ClassTooLong — 742 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 342 over it, 1.86× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: ManagePrefabs MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs — ClassTooLong — 665 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 265 over it, 1.66× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: MCPForUnityEditorWindow MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs — ClassTooLong — 614 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 214 over it, 1.54× 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: ManageTexture MCPForUnity/Editor/Tools/ManageTexture.cs — ClassTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 206 over it, 1.52× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: TOMLParser MCPForUnity/Editor/External/Tommy.cs — ClassTooLong — 590 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 190 over it, 1.48× 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: ManageAsset MCPForUnity/Editor/Tools/ManageAsset.cs — ClassTooLong — 557 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 157 over it, 1.39× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: BlenderBridgeTool MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs — ClassTooLong — 534 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 134 over it, 1.34× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: ComponentOps MCPForUnity/Editor/Helpers/ComponentOps.cs — ClassTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 118 over it, 1.30× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: PhysicsQueryOps MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs — ClassTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 104 over it, 1.26× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: UnityReflect MCPForUnity/Editor/Tools/UnityReflect.cs — ClassTooLong — 489 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 89 over it, 1.22× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: McpClientConfigSection MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs — ClassTooLong — 474 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 74 over it, 1.19× 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: WebSocketTransportClient MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs — ClassTooLong — 463 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 63 over it, 1.16× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ScreenshotUtility MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs — ClassTooLong — 453 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 53 over it, 1.13× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: ClaudeCliMcpConfigurator MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs — ClassTooLong — 440 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 40 over it, 1.10× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: McpToolsSection MCPForUnity/Editor/Windows/Components/Tools/McpToolsSection.cs — ClassTooLong — 425 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 25 over it, 1.06× 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: ManagePackages MCPForUnity/Editor/Tools/ManagePackages.cs — ClassTooLong — 414 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 14 over it, 1.04× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
  • ClassTooLong: McpAssetGenSection MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs — ClassTooLong — 401 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 1 over it, 1.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×17
  • Duplicated block (6 lines × 2) MCPForUnity/Editor/Tools/ManageUI.cs:921 — MCPForUnity/Editor/Tools/ManageUI.cs:921-926 | MCPForUnity/Editor/Tools/ManageUI.cs:1161-1166 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ManageUI.cs:921` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `MCPForUnity/Editor/Tools/ManageUI.cs:927` calls `DestroyImmediate` and `MCPForUnity/Editor/Tools/ManageUI.cs:1167` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) MCPForUnity/Editor/Tools/Profiler/Operations/ObjectMemoryOps.cs:27 — MCPForUnity/Editor/Tools/Profiler/Operations/ObjectMemoryOps.cs:27-32 | MCPForUnity/Editor/Tools/Profiler/Operations/ObjectMemoryOps.cs:42-47 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/Profiler/Operations/ObjectMemoryOps.cs:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:205 — MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:205-210 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:428-433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:58 — MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:58-63 | MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:112-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs:34 — MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs:34-39 | MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs:48-53 — before extracting anything, compare `MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs` and `MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) MCPForUnity/Editor/Tools/ManageScene.cs:912 — MCPForUnity/Editor/Tools/ManageScene.cs:912-917 | MCPForUnity/Editor/Tools/ManageScene.cs:1054-1059 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) MCPForUnity/Editor/Tools/ManageUI.cs:860 — MCPForUnity/Editor/Tools/ManageUI.cs:860-865 | MCPForUnity/Editor/Tools/ManageUI.cs:1115-1120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) MCPForUnity/Editor/Tools/ManageScript.cs:1353 — MCPForUnity/Editor/Tools/ManageScript.cs:1353-1358 | MCPForUnity/Editor/Tools/ManageScript.cs:1390-1395 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ManageScript.cs:1353` 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, `MCPForUnity/Editor/Tools/ManageScript.cs:1348` calls `ErrorResponse` and `MCPForUnity/Editor/Tools/ManageScript.cs:1385` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) MCPForUnity/Editor/Tools/ManageTexture.cs:392 — MCPForUnity/Editor/Tools/ManageTexture.cs:392-397 | MCPForUnity/Editor/Tools/ManageTexture.cs:477-482 — both copies are in the same file, so extract the 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 `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 (6 lines × 2) MCPForUnity/Editor/Tools/Physics/JointOps.cs:87 — MCPForUnity/Editor/Tools/Physics/JointOps.cs:87-92 | MCPForUnity/Editor/Tools/Physics/JointOps.cs:350-355 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) MCPForUnity/Editor/Tools/AssetGen/AssetGenToolHelpers.cs:48 — MCPForUnity/Editor/Tools/AssetGen/AssetGenToolHelpers.cs:48-53 | MCPForUnity/Editor/Tools/AssetGen/ImportModel.cs:144-149 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) MCPForUnity/Editor/Tools/ExecuteCode.cs:716 — MCPForUnity/Editor/Tools/ExecuteCode.cs:716-721 | MCPForUnity/Editor/Tools/ExecuteCode.cs:732-737 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ExecuteCode.cs:716` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:616 — MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:616-621 | MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:626-631 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:616` 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 (6 lines × 2) MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs:19 — MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs:19-24 | MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs:207-212 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) Server/src/services/tools/find_in_file.py:110 — Server/src/services/tools/find_in_file.py:110-115 | Server/src/services/tools/manage_script.py:134-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/Screenshotters/MaterialScreenshotter.cs:19 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/Screenshotters/MaterialScreenshotter.cs:19-24 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/Screenshotters/MeshScreenshotter.cs:20-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:35 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:35-40 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:111-116 — both copies are in the same file, so extract the 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 `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:35` 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) · ×16
  • Duplicated block (11 lines × 2) MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:209 — MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:209-219 | MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:333-343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:209` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) MCPForUnity/Editor/Helpers/AssetPathUtility.cs:256 — MCPForUnity/Editor/Helpers/AssetPathUtility.cs:256-266 | MCPForUnity/Editor/Windows/Components/Advanced/McpAdvancedSection.cs:469-479 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) MCPForUnity/Editor/Models/McpClient.cs:30 — MCPForUnity/Editor/Models/McpClient.cs:30-40 | MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs:203-213 — 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 `MCPForUnity/Editor/Models/McpClient.cs:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) MCPForUnity/Editor/Resources/Scene/GameObjectResource.cs:133 — MCPForUnity/Editor/Resources/Scene/GameObjectResource.cs:133-143 | MCPForUnity/Editor/Resources/Scene/GameObjectResource.cs:219-229 — both copies are in the same file, so extract the 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) MCPForUnity/Editor/Tools/Animation/ClipPresets.cs:389 — MCPForUnity/Editor/Tools/Animation/ClipPresets.cs:389-399 | MCPForUnity/Editor/Tools/Animation/ControllerCreate.cs:446-456 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) MCPForUnity/Editor/Tools/ManageEditor.cs:275 — MCPForUnity/Editor/Tools/ManageEditor.cs:275-285 | MCPForUnity/Editor/Tools/ManageEditor.cs:340-350 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) MCPForUnity/Editor/Tools/UnityReflect.cs:700 — MCPForUnity/Editor/Tools/UnityReflect.cs:700-710 | MCPForUnity/Editor/Tools/UnityReflect.cs:742-752 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/UnityReflect.cs:700` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) MCPForUnity/Editor/Services/StartupConfigRewrite.cs:65 — MCPForUnity/Editor/Services/StartupConfigRewrite.cs:65-75 | MCPForUnity/Editor/Tools/CommandRegistry.cs:115-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Services/StartupConfigRewrite.cs:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:14 — MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:14-24 | MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:36-46 — both copies are in the same file, so extract the 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) MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:59 — MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:59-69 | MCPForUnity/Editor/Tools/Animation/AnimatorRead.cs:95-105 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) MCPForUnity/Editor/Tools/Cameras/CameraConfigure.cs:165 — MCPForUnity/Editor/Tools/Cameras/CameraConfigure.cs:165-175 | MCPForUnity/Editor/Tools/Cameras/CameraCreate.cs:96-106 — 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 `MCPForUnity/Editor/Tools/Cameras/CameraConfigure.cs:165` 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, `MCPForUnity/Editor/Tools/Cameras/CameraConfigure.cs:176` calls `RecordObject` and `MCPForUnity/Editor/Tools/Cameras/CameraCreate.cs:107` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) MCPForUnity/Editor/Tools/ManageTexture.cs:194 — MCPForUnity/Editor/Tools/ManageTexture.cs:194-205 | MCPForUnity/Editor/Tools/ManageTexture.cs:328-338 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ManageTexture.cs:194` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:115 — MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:115-125 | MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:164-175 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:115` 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) MCPForUnity/Editor/Clients/Configurators/ClaudeCodeConfigurator.cs:19 — MCPForUnity/Editor/Clients/Configurators/ClaudeCodeConfigurator.cs:19-29 | MCPForUnity/Editor/Clients/Configurators/ClaudeDesktopConfigurator.cs:22-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.
  • Duplicated block (11 lines × 2) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckFileMenuNames.cs:40 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckFileMenuNames.cs:40-50 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckFileMenuNames.cs:69-79 — both copies are in the same file, so extract the 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 `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckFileMenuNames.cs:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/Data/AssetsWorkflow.cs:89 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/Data/AssetsWorkflow.cs:89-99 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/Data/HybridPackageWorkflow.cs:76-86 — 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.
X1 · Async correctness · async void method · ×16
  • async void method: ImportSelection MCPForUnity/Editor/MenuItems/BlenderBridgeMenu.cs:22 — `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: ImportScene MCPForUnity/Editor/MenuItems/BlenderBridgeMenu.cs:29 — `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: Screenshot MCPForUnity/Editor/MenuItems/BlenderBridgeMenu.cs:36 — `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: ProbeConnection MCPForUnity/Editor/Windows/Components/AssetGen/McpBlenderBridgePanel.cs:249 — `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: OnHttpServerToggleClicked MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:682 — `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: OnConnectionToggleClicked MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:837 — `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: OnGetApiKeyClicked MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:991 — `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: GeneratePreviews TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/UI/Views/PreviewListView.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: Refresh TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/AccountToolbar.cs:59 — `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: Upload TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/PackageUploadElement.cs:150 — `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: LoginWithSessionToken TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/LoginView.cs:175 — `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: LoginWithCloudToken TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/LoginView.cs:193 — `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: LoginWithCredentials TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/LoginView.cs:209 — `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: DownloadAndSetThumbnail TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/PackageListView.cs:229 — `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: OnAuthenticationSuccess TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/UploaderWindow.cs:119 — `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: CheckForUpdatesAfterEditorUpdate TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Utility/ASToolsUpdater.cs:45 — `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.
X5 · Nullable reference types · Symbol treated as nullable, then dereferenced unguarded · ×15
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Helpers/CodexConfigHelper.cs:101 — This method contradicts itself about `mcpServers`: line 98 assigns it with `as TomlTable`, which hands back null rather than throwing when the value is not a `TomlTable`, but line 101 then dereferences it directly with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `mcpServers` once before the first use and handle the null case, or cast with `(TomlTable)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:249 — This method contradicts itself about `tr`: line 244 assigns it with `as Transform`, which hands back null rather than throwing when the value is not a `Transform`, but line 249 then dereferences it directly as `tr.GetInstanceIDCompat` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `tr` once before the first use and handle the null case, or cast with `(Transform)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:279 — This method contradicts itself about `cam`: line 273 assigns it with `as Camera`, which hands back null rather than throwing when the value is not a `Camera`, but line 279 then dereferences it directly as `cam.nearClipPlane` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `cam` once before the first use and handle the null case, or cast with `(Camera)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Services/AssetGen/FalModelSchema.cs:64 — This method contradicts itself about `model`: line 57 writes `model?.`, which says `model` can be null, but line 64 then dereferences it directly with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `model` truly cannot be null here, the `?.` is misleading. Settle it one way — test `model` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Services/AssetGen/FalModelSchema.cs:82 — This method contradicts itself about `metadata`: line 58 assigns it with `as JObject`, which hands back null rather than throwing when the value is not a `JObject`, but line 82 then dereferences it directly with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `metadata` once before the first use and handle the null case, or cast with `(JObject)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Services/AssetGen/FalModelSchema.cs:74 — This method contradicts itself about `input`: line 73 writes `input?.`, which says `input` can be null, but line 74 then dereferences it directly with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `input` truly cannot be null here, the `?.` is misleading. Settle it one way — test `input` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Services/AssetGen/Import/ModelImportPipeline.cs:155 — This method contradicts itself about `job`: line 153 writes `job?.AnimationType`, which says `job` can be null, but line 155 then dereferences it directly as `job.TargetSize` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `job` truly cannot be null here, the `?.` is misleading. Settle it one way — test `job` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Services/Blender/BlenderSocketClient.cs:153 — This method contradicts itself about `response`: line 151 writes `response?.`, which says `response` can be null, but line 153 then dereferences it directly with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `response` truly cannot be null here, the `?.` is misleading. Settle it one way — test `response` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Tools/ManageScriptableObject.cs:1350 — This method contradicts itself about `@params`: line 1342 writes `@params?.`, which says `@params` can be null, but line 1350 then dereferences it directly with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `@params` truly cannot be null here, the `?.` is misleading. Settle it one way — test `@params` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Tools/ManageTexture.cs:861 — This method contradicts itself about `settings`: line 858 assigns it with `as JObject`, which hands back null rather than throwing when the value is not a `JObject`, but line 861 then dereferences it directly with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `settings` once before the first use and handle the null case, or cast with `(JObject)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:430 — This method contradicts itself about `faceList`: line 428 assigns it with `as System.Collections.IList`, which hands back null rather than throwing when the value is not a `System.Collections.IList`, but line 430 then dereferences it directly as `faceList.Add` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `faceList` once before the first use and handle the null case, or cast with `(System.Collections.IList)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:542 — This method contradicts itself about `typedList`: line 540 assigns it with `as System.Collections.IList`, which hands back null rather than throwing when the value is not a `System.Collections.IList`, but line 542 then dereferences it directly as `typedList.Add` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `typedList` once before the first use and handle the null case, or cast with `(System.Collections.IList)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1408 — This method contradicts itself about `typedList`: line 1406 assigns it with `as System.Collections.IList`, which hands back null rather than throwing when the value is not a `System.Collections.IList`, but line 1408 then dereferences it directly as `typedList.Add` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `typedList` once before the first use and handle the null case, or cast with `(System.Collections.IList)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1509 — This method contradicts itself about `typedList`: line 1507 assigns it with `as System.Collections.IList`, which hands back null rather than throwing when the value is not a `System.Collections.IList`, but line 1509 then dereferences it directly as `typedList.Add` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `typedList` once before the first use and handle the null case, or cast with `(System.Collections.IList)` so the failure is reported where it happens — rather than leaving the two readings side by side.
  • Symbol treated as nullable, then dereferenced unguarded TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ModelUtilityService.cs:137 — This method contradicts itself about `propertyValue`: line 136 assigns it with `as SerializedProperty`, which hands back null rather than throwing when the value is not a `SerializedProperty`, but line 137 then dereferences it directly as `propertyValue.stringValue` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `propertyValue` once before the first use and handle the null case, or cast with `(SerializedProperty)` so the failure is reported where it happens — rather than leaving the two readings side by side.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×13
  • Duplicated block (10 lines × 2) MCPForUnity/Editor/Tools/Physics/PhysicsSettingsOps.cs:131 — MCPForUnity/Editor/Tools/Physics/PhysicsSettingsOps.cs:131-140 | MCPForUnity/Editor/Tools/Physics/PhysicsSettingsOps.cs:236-245 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/Physics/PhysicsSettingsOps.cs:131` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:112 — MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:112-121 | MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:148-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 `MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:112` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) MCPForUnity/Editor/Windows/Components/Tools/McpToolsSection.cs:688 — MCPForUnity/Editor/Windows/Components/Tools/McpToolsSection.cs:688-697 | MCPForUnity/Editor/Windows/Components/Tools/McpToolsSection.cs:712-721 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Windows/Components/Tools/McpToolsSection.cs:688` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) MCPForUnity/Editor/Tools/AssetGen/GenerateImage.cs:77 — MCPForUnity/Editor/Tools/AssetGen/GenerateImage.cs:77-86 | MCPForUnity/Editor/Tools/AssetGen/GenerateModel.cs:76-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/AssetGen/GenerateImage.cs:77` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `MCPForUnity/Editor/Tools/AssetGen/GenerateModel.cs:87` calls `ErrorResponse` and `MCPForUnity/Editor/Tools/AssetGen/GenerateImage.cs:87` 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) MCPForUnity/Editor/Tools/UnityReflect.cs:711 — MCPForUnity/Editor/Tools/UnityReflect.cs:711-720 | MCPForUnity/Editor/Tools/UnityReflect.cs:754-763 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/UnityReflect.cs:711` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) MCPForUnity/Editor/Tools/Vfx/LineWrite.cs:80 — MCPForUnity/Editor/Tools/Vfx/LineWrite.cs:80-89 | MCPForUnity/Editor/Tools/Vfx/TrailWrite.cs:36-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 `MCPForUnity/Editor/Tools/Vfx/LineWrite.cs:80` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) MCPForUnity/Editor/Tools/Graphics/RenderingStatsOps.cs:150 — MCPForUnity/Editor/Tools/Graphics/RenderingStatsOps.cs:150-159 | MCPForUnity/Editor/Tools/Profiler/Operations/CounterOps.cs:126-138 — 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 `MCPForUnity/Editor/Tools/Graphics/RenderingStatsOps.cs:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) MCPForUnity/Editor/Tools/ManageScript.cs:473 — MCPForUnity/Editor/Tools/ManageScript.cs:473-483 | MCPForUnity/Editor/Tools/ManageScript.cs:752-761 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/ManageScript.cs:473` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) MCPForUnity/Editor/Tools/Vfx/LineWrite.cs:165 — MCPForUnity/Editor/Tools/Vfx/LineWrite.cs:165-174 | MCPForUnity/Editor/Tools/Vfx/TrailWrite.cs:119-128 — 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 `MCPForUnity/Editor/Tools/Vfx/LineWrite.cs:165` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Server/src/services/tools/script_apply_edits.py:1272 — Server/src/services/tools/script_apply_edits.py:1272-1281 | Server/src/services/tools/script_apply_edits.py:1359-1368 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) MCPForUnity/Editor/Services/Server/PidFileManager.cs:264 — MCPForUnity/Editor/Services/Server/PidFileManager.cs:264-273 | REDACTED:17-26 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs:44 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs:44-54 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/PrefabTypePreviewGenerator.cs:45-54 — before extracting anything, compare `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs` and `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/PrefabTypePreviewGenerator.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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 `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/PrefabTypePreviewGenerator.cs:45` calls `GetDefaultParticleShader` and `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs:44` does not — after which the two agree again for 5 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) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/AssetsWorkflowElement.cs:81 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/AssetsWorkflowElement.cs:81-90 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/HybridPackageWorkflowElement.cs:37-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/AssetsWorkflowElement.cs:81` 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 (5 lines × 2) · ×13
  • Duplicated block (5 lines × 2) MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:36 — MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:36-40 | MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:106-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:134 — MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:134-138 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:329-333 — both copies are in the same file, so extract the 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 `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 (5 lines × 2) MCPForUnity/Editor/Tools/Physics/JointOps.cs:246 — MCPForUnity/Editor/Tools/Physics/JointOps.cs:246-250 | MCPForUnity/Editor/Tools/Physics/JointOps.cs:258-262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:12 — MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:12-16 | MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:159-163 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:52 — MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:52-56 | MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:104-108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) Server/src/cli/commands/physics.py:253 — Server/src/cli/commands/physics.py:253-257 | Server/src/cli/commands/physics.py:434-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) Server/src/cli/commands/texture.py:122 — Server/src/cli/commands/texture.py:122-126 | Server/src/cli/commands/texture.py:134-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Server/src/cli/commands/texture.py: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) Server/src/services/tools/manage_script.py:455 — Server/src/services/tools/manage_script.py:455-459 | Server/src/services/tools/manage_script.py:496-500 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) Server/src/services/tools/script_apply_edits.py:1038 — Server/src/services/tools/script_apply_edits.py:1038-1042 | Server/src/services/tools/script_apply_edits.py:1184-1188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) tools/stress_editor_state.py:63 — tools/stress_editor_state.py:63-67 | tools/stress_mcp.py:64-68 — 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 `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 (5 lines × 2) Server/src/cli/commands/graphics.py:477 — Server/src/cli/commands/graphics.py:477-481 | Server/src/cli/commands/physics.py:404-408 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) Server/src/services/tools/manage_editor.py:55 — Server/src/services/tools/manage_editor.py:55-59 | Server/src/services/tools/manage_gameobject.py:320-324 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckAudioClipping.cs:41 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckAudioClipping.cs:41-45 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckAudioClipping.cs:50-54 — both copies are in the same file, so extract the 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 (9 lines × 2) · ×11
  • Duplicated block (9 lines × 2) MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:165 — MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:165-173 | MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:605-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.
  • Duplicated block (9 lines × 2) MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:33 — MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:33-41 | MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:165-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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, `MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:44` calls `ErrorResponse` and `MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:174` 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 (9 lines × 2) MCPForUnity/Editor/Tools/AssetGen/AssetGenToolHelpers.cs:22 — MCPForUnity/Editor/Tools/AssetGen/AssetGenToolHelpers.cs:22-30 | MCPForUnity/Editor/Tools/AssetGen/ImportModel.cs:119-127 — 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 `MCPForUnity/Editor/Tools/AssetGen/AssetGenToolHelpers.cs:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:1221 — MCPForUnity/Editor/Tools/ManageScriptableObject.cs:1221-1230 | MCPForUnity/Editor/Tools/ManageScriptableObject.cs:1254-1262 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ManageScriptableObject.cs:1221` 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) MCPForUnity/Runtime/Serialization/UnityTypeConverters.cs:75 — MCPForUnity/Runtime/Serialization/UnityTypeConverters.cs:75-83 | MCPForUnity/Runtime/Serialization/UnityTypeConverters.cs:184-192 — both copies are in the same file, so extract the 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 `MCPForUnity/Runtime/Serialization/UnityTypeConverters.cs:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `Quaternion` in one and `Vector4` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) Server/src/cli/commands/asset.py:153 — Server/src/cli/commands/asset.py:153-161 | Server/src/cli/commands/texture.py:616-624 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) Server/src/cli/commands/batch.py:60 — Server/src/cli/commands/batch.py:60-68 | Server/src/cli/commands/batch.py:108-116 — both copies are in the same file, so extract the 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, `Server/src/cli/commands/batch.py:70` calls `echo` and `Server/src/cli/commands/batch.py:118` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) Server/src/services/tools/manage_script.py:162 — Server/src/services/tools/manage_script.py:162-170 | Server/src/services/tools/manage_script.py:228-236 — both copies are in the same file, so extract the 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) Server/src/cli/commands/build.py:115 — Server/src/cli/commands/build.py:115-134 | Server/src/cli/commands/physics.py:417-425 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) Server/src/cli/commands/build.py:165 — Server/src/cli/commands/build.py:165-180 | Server/src/cli/commands/profiler.py:19-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) Server/src/services/resources/cameras.py:22 — Server/src/services/resources/cameras.py:22-30 | Server/src/services/resources/tests.py:43-57 — 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 `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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×10
  • Sync-over-async blocking — 9 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 MCPForUnity/Editor/Services/BridgeControlService.cs:141 — `.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 MCPForUnity/Editor/Services/Transport/TransportManager.cs:192 — `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
  • Sync-over-async blocking MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs:236 — `.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 MCPForUnity/Editor/Setup/SkillSyncService.cs:293 — `.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 MCPForUnity/Editor/Setup/SkillSyncService.cs:294 — `.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 MCPForUnity/Editor/Setup/SkillSyncService.cs:305 — `.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 MCPForUnity/Editor/Setup/SkillSyncService.cs:308 — `.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 MCPForUnity/Editor/Setup/SkillSyncService.cs:312 — `.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:168 — `Item1.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).
X1 · Async correctness · Sync-over-async (deadlock risk) through `.Result` · ×10
  • Sync-over-async (deadlock risk) through `.Result` MCPForUnity/Editor/Services/TestJobManager.cs:735 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Abstractions/AuthenticationBase.cs:37 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Abstractions/PackageUploaderBase.cs:26 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.cs:28 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.cs:105 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.cs:128 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.cs:151 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.cs:176 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.cs:239 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
  • Sync-over-async (deadlock risk) through `.Result` TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/UnityPackageUploader.cs:81 — Reading `.Result` of a task that has not completed blocks this thread until it does — the same block as `.Wait()`: under a synchronization context (Blazor, a UI thread, classic ASP.NET) it deadlocks, and on the thread pool it parks a thread for as long as the work runs. `await` the task instead (make the caller `async`); where a synchronous entry point must stay, keep the block in ONE documented bridge with a timeout.
X1 · Async correctness · Sync-over-async (deadlock risk) · ×9
  • Sync-over-async (deadlock risk) MCPForUnity/Editor/Services/BridgeControlService.cs:141 — 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) MCPForUnity/Editor/Services/Transport/TransportManager.cs:192 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
  • Sync-over-async (deadlock risk) MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs:236 — Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` wastes a thread and, if the task needs a context this one is holding, deadlocks. `Dispose()` returns void by contract, so it cannot simply `await`: signal the work to stop first (cancel its token, set its stop flag) so the wait is short, give the wait a TIMEOUT so a hung task cannot hang shutdown, and — where callers can use it — add an awaitable teardown (`DisposeAsync`/`StopAsync`) beside the synchronous one and let `Dispose()` remain the bounded fallback.
  • Sync-over-async (deadlock risk) MCPForUnity/Editor/Setup/SkillSyncService.cs:293 — 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) MCPForUnity/Editor/Setup/SkillSyncService.cs:294 — 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) MCPForUnity/Editor/Setup/SkillSyncService.cs:305 — 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) MCPForUnity/Editor/Setup/SkillSyncService.cs:308 — 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) MCPForUnity/Editor/Setup/SkillSyncService.cs:312 — 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) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:168 — 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 · TooManyMethods · ×8
  • TooManyMethods: ManageProBuilder MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs — TooManyMethods — 1501 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. 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: ServerManagementService REDACTED — TooManyMethods — 491 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ManageScene MCPForUnity/Editor/Tools/ManageScene.cs — TooManyMethods — 1223 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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: SkillSyncService MCPForUnity/Editor/Setup/SkillSyncService.cs — TooManyMethods — 375 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. 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: ManageScript MCPForUnity/Editor/Tools/ManageScript.cs — TooManyMethods — 1247 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. 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: ManageUI MCPForUnity/Editor/Tools/ManageUI.cs — TooManyMethods — 1092 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. 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: StdioBridgeHost MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs — TooManyMethods — 607 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. 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: McpConnectionSection MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs — TooManyMethods — 660 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×8
  • Duplicated block (12 lines × 2) MCPForUnity/Editor/Tools/ManageScript.cs:977 — MCPForUnity/Editor/Tools/ManageScript.cs:977-988 | MCPForUnity/Editor/Tools/ManageScript.cs:991-1002 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ManageScript.cs:977` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) MCPForUnity/Editor/Tools/ManageUI.cs:210 — MCPForUnity/Editor/Tools/ManageUI.cs:210-221 | MCPForUnity/Editor/Tools/ManageUI.cs:1259-1270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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, `MCPForUnity/Editor/Tools/ManageUI.cs:223` calls `ReadAllText`, `ToBase64String`, `GetBytes` and `MCPForUnity/Editor/Tools/ManageUI.cs:1272` 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 (12 lines × 2) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:650 — MCPForUnity/Editor/Tools/ManageScriptableObject.cs:650-667 | MCPForUnity/Editor/Tools/ManageScriptableObject.cs:683-694 — both copies are in the same file, so extract the 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 that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1052 — MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1052-1063 | MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1220-1231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) Server/src/core/telemetry_decorator.py:125 — Server/src/core/telemetry_decorator.py:125-136 | Server/src/core/telemetry_decorator.py:150-161 — both copies are in the same file, so extract the 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 (12 lines × 2) Server/src/services/tools/manage_texture.py:302 — Server/src/services/tools/manage_texture.py:302-313 | Server/src/services/tools/manage_texture.py:325-336 — both copies are in the same file, so extract the 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 that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) MCPForUnity/Editor/Tools/GameObjects/GameObjectComponentHelpers.cs:491 — MCPForUnity/Editor/Tools/GameObjects/GameObjectComponentHelpers.cs:491-502 | MCPForUnity/Editor/Tools/GameObjects/ManageGameObjectCommon.cs:219-230 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs:58 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs:58-69 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/PrefabTypePreviewGenerator.cs:61-72 — before extracting anything, compare `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs` and `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/PrefabTypePreviewGenerator.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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 `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs:58` 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×8
  • Duplicated block (8 lines × 2) MCPForUnity/Editor/Tools/GameObjects/GameObjectComponentHelpers.cs:420 — MCPForUnity/Editor/Tools/GameObjects/GameObjectComponentHelpers.cs:420-427 | MCPForUnity/Editor/Tools/GameObjects/GameObjectComponentHelpers.cs:434-441 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/GameObjects/GameObjectComponentHelpers.cs:420` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:2391 — MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:2391-2398 | MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:2414-2421 — both copies are in the same file, so extract the 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) MCPForUnity/Editor/Tools/Graphics/LightBakingOps.cs:231 — MCPForUnity/Editor/Tools/Graphics/LightBakingOps.cs:231-238 | MCPForUnity/Editor/Tools/Graphics/LightBakingOps.cs:296-303 — both copies are in the same file, so extract the 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) MCPForUnity/Editor/Tools/Graphics/RenderPipelineOps.cs:258 — MCPForUnity/Editor/Tools/Graphics/RenderPipelineOps.cs:258-265 | MCPForUnity/Editor/Tools/Graphics/VolumeOps.cs:629-637 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) MCPForUnity/Editor/Tools/ManageUI.cs:1784 — MCPForUnity/Editor/Tools/ManageUI.cs:1784-1791 | MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:797-805 — 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 `MCPForUnity/Editor/Tools/ManageUI.cs:1784` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:123 — MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:123-130 | MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:159-166 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:96 — MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:96-103 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:756-763 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/CachingService/PreviewDatabaseContractResolver.cs:17 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/CachingService/PreviewDatabaseContractResolver.cs:17-24 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/UI/Data/Serialization/ValidatorStateDataContractResolver.cs:17-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×7
  • Duplicated block (14 lines × 2) MCPForUnity/Editor/Tools/Cameras/CameraConfigure.cs:298 — MCPForUnity/Editor/Tools/Cameras/CameraConfigure.cs:298-311 | MCPForUnity/Editor/Tools/Cameras/CameraConfigure.cs:330-343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) MCPForUnity/Editor/Tools/ManageMaterial.cs:209 — MCPForUnity/Editor/Tools/ManageMaterial.cs:209-222 | MCPForUnity/Editor/Tools/ManageMaterial.cs:274-287 — both copies are in the same file, so extract the 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) MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs:112 — MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs:112-125 | MCPForUnity/Editor/Tools/Vfx/ManageVFX.cs:201-214 — before extracting anything, compare `MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs` and `MCPForUnity/Editor/Tools/Vfx/ManageVFX.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs:112` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) MCPForUnity/Editor/Tools/AssetGen/GenerateAudio.cs:35 — MCPForUnity/Editor/Tools/AssetGen/GenerateAudio.cs:35-48 | MCPForUnity/Editor/Tools/AssetGen/GenerateModel.cs:35-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 `MCPForUnity/Editor/Tools/AssetGen/GenerateAudio.cs:35` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) MCPForUnity/Editor/Tools/Physics/JointOps.cs:155 — MCPForUnity/Editor/Tools/Physics/JointOps.cs:155-168 | MCPForUnity/Editor/Tools/Physics/JointOps.cs:326-339 — both copies are in the same file, so extract the 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) MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:26 — MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:26-39 | MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:170-183 — 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 that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:26` calls `Get`, `ToLowerInvariant` and `MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:170` 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 (14 lines × 2) Server/src/services/tools/script_apply_edits.py:322 — Server/src/services/tools/script_apply_edits.py:322-335 | Server/src/services/tools/script_apply_edits.py:340-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 × 2) · ×7
  • Duplicated block (7 lines × 2) MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:34 — MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:34-40 | MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:172-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) MCPForUnity/Editor/Tools/ManageBuild.cs:66 — MCPForUnity/Editor/Tools/ManageBuild.cs:66-74 | MCPForUnity/Editor/Tools/ManageBuild.cs:444-450 — both copies are in the same file, so extract the 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 that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) Server/src/cli/commands/build.py:206 — Server/src/cli/commands/build.py:206-212 | Server/src/cli/commands/packages.py:54-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) Server/src/cli/commands/code.py:249 — Server/src/cli/commands/code.py:249-255 | Server/src/services/tools/find_in_file.py:154-164 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) Server/src/services/tools/script_apply_edits.py:1074 — Server/src/services/tools/script_apply_edits.py:1074-1080 | Server/src/services/tools/script_apply_edits.py:1231-1237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) Server/src/cli/commands/graphics.py:13 — Server/src/cli/commands/graphics.py:13-19 | Server/src/cli/commands/physics.py:8-14 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) tools/stress_editor_state.py:53 — tools/stress_editor_state.py:53-59 | tools/stress_mcp.py:54-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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.
X20 · Mistyped argument guard · Argument guard throws the exception its own condition disproves · ×7
  • Argument guard throws the exception its own condition disproves MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:700 — The guard on line 698 rejects `projectDir` and line 700 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(projectDir)` is true of a value that is NOT null: it is satisfied by an EMPTY `projectDir`, and on that path `projectDir` 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 MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:117 — The guard on line 117 rejects `providerJobId` and line 117 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(providerJobId)` is true of a value that is NOT null: it is satisfied by an EMPTY `providerJobId`, and on that path `providerJobId` 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 MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs:89 — The guard on line 89 rejects `providerJobId` and line 89 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(providerJobId)` is true of a value that is NOT null: it is satisfied by an EMPTY `providerJobId`, and on that path `providerJobId` 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 MCPForUnity/Editor/Services/AssetGen/Providers/MeshyAdapter.cs:80 — The guard on line 80 rejects `providerJobId` and line 80 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(providerJobId)` is true of a value that is NOT null: it is satisfied by an EMPTY `providerJobId`, and on that path `providerJobId` 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 MCPForUnity/Editor/Services/AssetGen/Providers/SketchfabAdapter.cs:40 — The guard on line 40 rejects `uid` and line 40 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(uid)` is true of a value that is NOT null: it is satisfied by an EMPTY `uid`, and on that path `uid` 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 MCPForUnity/Editor/Services/AssetGen/Providers/SketchfabAdapter.cs:50 — The guard on line 50 rejects `uid` and line 50 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(uid)` is true of a value that is NOT null: it is satisfied by an EMPTY `uid`, and on that path `uid` 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 MCPForUnity/Editor/Services/AssetGen/Providers/TripoAdapter.cs:86 — The guard on line 86 rejects `providerJobId` and line 86 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(providerJobId)` is true of a value that is NOT null: it is satisfied by an EMPTY `providerJobId`, and on that path `providerJobId` 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.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×6
  • Duplicated block (15 lines × 2) MCPForUnity/Editor/Tools/ManageScript.cs:357 — MCPForUnity/Editor/Tools/ManageScript.cs:357-371 | MCPForUnity/Editor/Tools/ManageScript.cs:455-469 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ManageScript.cs:357` 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) MCPForUnity/Editor/Tools/ManageUI.cs:185 — MCPForUnity/Editor/Tools/ManageUI.cs:185-199 | MCPForUnity/Editor/Tools/ManageUI.cs:277-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/ManageUI.cs:185` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `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 (15 lines × 2) MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:556 — MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:556-570 | MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:607-621 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:556` 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) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:1398 — MCPForUnity/Editor/Tools/ManageScriptableObject.cs:1398-1412 | MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:514-528 — 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, `MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:510` calls `IsValidFolder`, `Split` and `MCPForUnity/Editor/Tools/ManageScriptableObject.cs:1396` 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) MCPForUnity/Editor/Tools/Graphics/ManageGraphics.cs:12 — MCPForUnity/Editor/Tools/Graphics/ManageGraphics.cs:12-26 | MCPForUnity/Editor/Tools/Physics/ManagePhysics.cs:12-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/Graphics/ManageGraphics.cs:12` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) MCPForUnity/Editor/Tools/ManagePackages.cs:30 — MCPForUnity/Editor/Tools/ManagePackages.cs:30-44 | MCPForUnity/Editor/Tools/UnityReflect.cs:106-120 — 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 `MCPForUnity/Editor/Tools/ManagePackages.cs:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `MCPForUnity/Editor/Tools/UnityReflect.cs:103` calls `GetActualIsCompiling`, `ErrorResponse` and `MCPForUnity/Editor/Tools/ManagePackages.cs:29` 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 (13 lines × 2) · ×6
  • Duplicated block (13 lines × 2) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1405 — MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1405-1417 | MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1506-1518 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1520` calls `ToString`, `IsNullOrEmpty` and `MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1419` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) MCPForUnity/Editor/Tools/ManageScene.cs:965 — MCPForUnity/Editor/Tools/ManageScene.cs:965-977 | MCPForUnity/Editor/Tools/ManageScene.cs:1087-1099 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ManageScene.cs:965` 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) MCPForUnity/Editor/Tools/Animation/ControllerLayers.cs:70 — MCPForUnity/Editor/Tools/Animation/ControllerLayers.cs:70-82 | MCPForUnity/Editor/Tools/Animation/ControllerLayers.cs:139-151 — both copies are in the same file, so extract the 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 (13 lines × 2) MCPForUnity/Editor/Tools/ManageAsset.cs:340 — MCPForUnity/Editor/Tools/ManageAsset.cs:340-352 | MCPForUnity/Editor/Tools/ManageAsset.cs:763-777 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ManageAsset.cs:340` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `MCPForUnity/Editor/Tools/ManageAsset.cs:338` calls `ErrorResponse` and `MCPForUnity/Editor/Tools/ManageAsset.cs:762` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) Server/src/cli/commands/animation.py:56 — Server/src/cli/commands/animation.py:56-69 | Server/src/cli/commands/probuilder.py:630-642 — 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 (13 lines × 2) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/UI/Elements/PreviewWindowDescriptionElement.cs:73 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/UI/Elements/PreviewWindowDescriptionElement.cs:73-85 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/UI/Elements/ValidatorDescriptionElement.cs:90-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. 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 (10 lines × 3) · ×6
  • Duplicated block (10 lines × 3) MCPForUnity/Editor/Tools/ManageUI.cs:718 — MCPForUnity/Editor/Tools/ManageUI.cs:718-727 | MCPForUnity/Editor/Tools/ManageUI.cs:1406-1415 | MCPForUnity/Editor/Tools/ManageUI.cs:1450-1459 — 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 `MCPForUnity/Editor/Tools/ManageUI.cs:718` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `MCPForUnity/Editor/Tools/ManageUI.cs:716` calls `GetInt` and `MCPForUnity/Editor/Tools/ManageUI.cs:1404` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) MCPForUnity/Editor/Services/PackageUpdateService.cs:31 — MCPForUnity/Editor/Services/PackageUpdateService.cs:31-40 | MCPForUnity/Editor/Services/PackageUpdateService.cs:88-97 | MCPForUnity/Editor/Services/PackageUpdateService.cs:157-166 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) MCPForUnity/Editor/Tools/ExecuteCode.cs:81 — MCPForUnity/Editor/Tools/ExecuteCode.cs:81-90 | MCPForUnity/Editor/Tools/ManageBuild.cs:21-30 | MCPForUnity/Editor/Tools/ManagePackages.cs:29-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/ExecuteCode.cs:81` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `MCPForUnity/Editor/Tools/ManageBuild.cs:32` calls `Contains`, `ErrorResponse` and `MCPForUnity/Editor/Tools/ManagePackages.cs:41` 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 (10 lines × 3) MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs:305 — MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs:305-315 | MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs:595-606 | MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs:955-964 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs:304` calls `Label`, `AddToClassList` and `MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs:595` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) Server/src/cli/commands/camera.py:120 — Server/src/cli/commands/camera.py:120-129 | Server/src/cli/commands/camera.py:150-159 | Server/src/cli/commands/camera.py:427-436 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Server/src/cli/commands/camera.py:167` calls `argument`, `option` and `Server/src/cli/commands/camera.py: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.
  • Duplicated block (10 lines × 3) Server/src/services/tools/manage_texture.py:301 — Server/src/services/tools/manage_texture.py:301-310 | Server/src/services/tools/manage_texture.py:324-333 | Server/src/services/tools/manage_texture.py:362-371 — 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. 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 (16 lines × 2) · ×5
  • Duplicated block (16 lines × 2) MCPForUnity/Editor/Tools/Animation/ControllerLayers.cs:93 — MCPForUnity/Editor/Tools/Animation/ControllerLayers.cs:93-108 | MCPForUnity/Editor/Tools/Animation/ControllerLayers.cs:161-176 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/Animation/ControllerLayers.cs:93` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) MCPForUnity/Editor/Tools/ManageUI.cs:141 — MCPForUnity/Editor/Tools/ManageUI.cs:141-156 | MCPForUnity/Editor/Tools/ManageUI.cs:239-254 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ManageUI.cs:141` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:43 — MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:43-58 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:594-609 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) MCPForUnity/Editor/Tools/ManageScene.cs:1472 — MCPForUnity/Editor/Tools/ManageScene.cs:1472-1487 | MCPForUnity/Editor/Tools/ManageScene.cs:1496-1511 — both copies are in the same file, so extract the 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 (16 lines × 2) MCPForUnity/Editor/Tools/Vfx/LineWrite.cs:124 — MCPForUnity/Editor/Tools/Vfx/LineWrite.cs:124-139 | MCPForUnity/Editor/Tools/Vfx/TrailWrite.cs:80-95 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `MCPForUnity/Editor/Tools/Vfx/TrailWrite.cs:98` calls `Add` and `MCPForUnity/Editor/Tools/Vfx/LineWrite.cs:142` 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 (9 lines × 3) · ×5
  • Duplicated block (9 lines × 3) MCPForUnity/Editor/Tools/ManageComponents.cs:72 — MCPForUnity/Editor/Tools/ManageComponents.cs:72-80 | MCPForUnity/Editor/Tools/ManageComponents.cs:131-139 | MCPForUnity/Editor/Tools/ManageComponents.cs:192-200 — 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 `MCPForUnity/Editor/Tools/ManageComponents.cs:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) MCPForUnity/Editor/Tools/ManageMaterial.cs:373 — MCPForUnity/Editor/Tools/ManageMaterial.cs:373-381 | MCPForUnity/Editor/Tools/ManageUI.cs:692-700 | MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:389-397 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/ManageMaterial.cs:373` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:139 — MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:139-147 | MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:365-373 | MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:413-421 — 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 `MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:139` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `camera` to `int height) RenderCameraToBase64(Camera` in one and `Camera` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 3) Server/src/cli/commands/camera.py:215 — Server/src/cli/commands/camera.py:215-223 | Server/src/services/tools/manage_animation.py:94-102 | Server/src/services/tools/manage_scene.py:123-133 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (9 lines × 3) Server/src/services/tools/utils.py:328 — Server/src/services/tools/utils.py:328-336 | Server/src/services/tools/utils.py:372-380 | Server/src/services/tools/utils.py:389-397 — 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. 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.
S1 · Cryptographic Hygiene · Weak hash algorithm · ×5
  • Weak hash algorithm MCPForUnity/Editor/Helpers/PortManager.cs:331 — 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 MCPForUnity/Editor/Helpers/ProjectIdentityUtility.cs:92 — 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 MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:1190 — 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 MCPForUnity/Editor/Setup/SkillSyncService.cs:499 — 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 MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:885 — 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.
D17 · Explicit Debt · TodoComment · ×4
  • TodoComment Server/src/services/resources/prefab.py:97 — # TODO: Use these typed response classes for better type safety once — 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 Server/src/services/resources/gameobject.py:122 — # TODO: Use these typed response classes for better type safety once — 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 Server/src/transport/plugin_hub.py:885 — # TODO: Make this more deterministic by detecting Unity's actual reload state — 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 Server/src/transport/legacy/unity_connection.py:855 — # TODO: Make this more deterministic by detecting Unity's actual reload state — 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.
D35 · Change Coupling · Change coupling · ×4
  • Change coupling: REDACTED ↔ EditorPrefsWindow.cs REDACTED:1 — `REDACTED` and `MCPForUnity/Editor/Windows/EditorPrefs/EditorPrefsWindow.cs` change together 50% of the time (6 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 6 shared commits counted here, the most recent 3 are `30151170` fix(editor): survive domain reloads in HTTP auto-start and reload-res…; `e9dac019` Harden HTTP defaults and improve stop-server fallback (#751); `17c6a36c` feat: Add beta server mode with PyPI pre-release support (#640) — run `git show` on any of them.
  • Change coupling: McpClientConfigSection.cs ↔ EditorPrefsWindow.cs MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs:1 — `MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs` and `MCPForUnity/Editor/Windows/EditorPrefs/EditorPrefsWindow.cs` change together 50% of the time (6 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 6 shared commits counted here, the most recent 3 are `45e5c883` chore(review): fold in minor review findings; `3a1a34b6` Add Cline configurator and auto-select server channel (#739); `aa0cde55` fix: make release sync_beta deterministic and bump beta post-release … — run `git show` on any of them.
  • Change coupling: ConfigJsonBuilder.cs ↔ McpClientConfigSection.cs MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs:1 — `MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs` and `MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs` change together 50% of the time (6 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 6 shared commits counted here, the most recent 3 are `863d08df` Centralize uvx dev-flags logic and cache offline probe result; `7128a357` Add --offline flag to uvx launches for faster startup when cache is w…; `3a1a34b6` Add Cline configurator and auto-select server channel (#739) — run `git show` on any of them.
  • Change coupling: SpriteControllerBuilder.cs ↔ SpriteImportSetup.cs MCPForUnity/Editor/Tools/Sprite2D/SpriteControllerBuilder.cs:1 — `MCPForUnity/Editor/Tools/Sprite2D/SpriteControllerBuilder.cs` and `MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `316ca13d` fix(sprite): close the 2026-09-27 review findings; `75a233b1` fix(sprite): close the second audit round; `ed73c24f` fix(sprite): refuse a rejected path instead of forwarding null to Unity — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×4
  • Duplicated block (17 lines × 2) MCPForUnity/Editor/Windows/Components/Resources/McpResourcesSection.cs:148 — MCPForUnity/Editor/Windows/Components/Resources/McpResourcesSection.cs:148-164 | MCPForUnity/Editor/Windows/Components/Tools/McpToolsSection.cs:268-284 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (17 lines × 2) MCPForUnity/Editor/Tools/Vfx/LineRead.cs:34 — MCPForUnity/Editor/Tools/Vfx/LineRead.cs:34-50 | MCPForUnity/Editor/Tools/Vfx/TrailRead.cs:31-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/Vfx/LineRead.cs:34` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) Server/src/cli/commands/prefab.py:50 — Server/src/cli/commands/prefab.py:50-67 | Server/src/cli/commands/scene.py:259-275 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (17 lines × 2) Server/src/services/tools/find_gameobjects.py:110 — Server/src/services/tools/find_gameobjects.py:110-126 | Server/src/services/tools/manage_components.py:140-156 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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 (11–12 lines × 2) · ×4
  • Duplicated block (11–12 lines × 2) MCPForUnity/Editor/Tools/Animation/ClipPresets.cs:160 — MCPForUnity/Editor/Tools/Animation/ClipPresets.cs:160-171 | MCPForUnity/Editor/Tools/Animation/ClipPresets.cs:241-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/Animation/ClipPresets.cs:160` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) MCPForUnity/Editor/Tools/Cameras/CameraControl.cs:88 — MCPForUnity/Editor/Tools/Cameras/CameraControl.cs:88-99 | MCPForUnity/Editor/Tools/Cameras/CameraControl.cs:134-144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11–12 lines × 2) MCPForUnity/Editor/Tools/GameObjects/GameObjectModify.cs:102 — MCPForUnity/Editor/Tools/GameObjects/GameObjectModify.cs:102-112 | MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:758-769 — 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 `MCPForUnity/Editor/Tools/GameObjects/GameObjectModify.cs:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `MCPForUnity/Editor/Tools/GameObjects/GameObjectModify.cs:114` calls `Contains`, `Info` and `MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:770` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11–12 lines × 2) Server/src/services/tools/script_apply_edits.py:1015 — Server/src/services/tools/script_apply_edits.py:1015-1025 | Server/src/services/tools/script_apply_edits.py:1159-1170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×4
  • Duplicated block (7 lines × 3) MCPForUnity/Editor/Tools/Cameras/CameraConfigure.cs:17 — MCPForUnity/Editor/Tools/Cameras/CameraConfigure.cs:17-23 | MCPForUnity/Editor/Tools/Cameras/CameraConfigure.cs:46-52 | MCPForUnity/Editor/Tools/Cameras/CameraConfigure.cs:75-81 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 3) Server/src/cli/commands/packages.py:31 — Server/src/cli/commands/packages.py:31-37 | Server/src/cli/commands/packages.py:57-63 | Server/src/cli/commands/packages.py:142-148 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) Server/src/cli/commands/build.py:71 — Server/src/cli/commands/build.py:71-83 | Server/src/cli/commands/profiler.py:103-109 | Server/src/cli/commands/profiler.py:116-122 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (7 lines × 3) Server/src/cli/commands/graphics.py:144 — Server/src/cli/commands/graphics.py:144-150 | Server/src/cli/commands/graphics.py:351-357 | Server/src/cli/commands/physics.py:134-140 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×4
  • Duplicated block (6 lines × 3) MCPForUnity/Editor/Tools/ManageBuild.cs:66 — MCPForUnity/Editor/Tools/ManageBuild.cs:66-72 | MCPForUnity/Editor/Tools/ManageBuild.cs:223-229 | MCPForUnity/Editor/Tools/ManageBuild.cs:444-449 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 3) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:96 — MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:96-101 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:643-648 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:756-761 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) Server/src/cli/commands/build.py:59 — Server/src/cli/commands/build.py:59-64 | Server/src/cli/commands/build.py:208-213 | Server/src/cli/commands/packages.py:56-61 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (6 lines × 3) MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs:181 — MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs:181-186 | MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs:179-184 | MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs:284-289 — before extracting anything, compare `MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs` and `MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 74 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 (26 lines × 2) · ×3
  • Duplicated block (26 lines × 2) MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs:44 — MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs:44-69 | MCPForUnity/Editor/Tools/Vfx/ManageVFX.cs:133-158 — before extracting anything, compare `MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs` and `MCPForUnity/Editor/Tools/Vfx/ManageVFX.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (26 lines × 2) Server/src/cli/commands/ui.py:99 — Server/src/cli/commands/ui.py:99-124 | Server/src/cli/commands/ui.py:220-245 — both copies are in the same file, so extract the 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 (26 lines × 2) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/UI/Data/PreviewGeneratorSettings.cs:127 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/UI/Data/PreviewGeneratorSettings.cs:127-152 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/UI/Data/ValidatorSettings.cs:170-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/UI/Data/PreviewGeneratorSettings.cs:127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×3
  • Duplicated block (24 lines × 2) MCPForUnity/Editor/Services/PackageUpdateService.cs:31 — MCPForUnity/Editor/Services/PackageUpdateService.cs:31-54 | MCPForUnity/Editor/Services/PackageUpdateService.cs:88-111 — both copies are in the same file, so extract the 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 (24 lines × 2) MCPForUnity/Editor/Tools/ManageTexture.cs:425 — MCPForUnity/Editor/Tools/ManageTexture.cs:425-448 | MCPForUnity/Editor/Tools/ManageTexture.cs:505-528 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ManageTexture.cs:425` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) Server/src/cli/commands/animation.py:408 — Server/src/cli/commands/animation.py:408-431 | Server/src/cli/commands/animation.py:470-493 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×3
  • Duplicated block (11 lines × 3) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:17 — MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:17-27 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:335-345 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:568-578 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:331` calls `Get`, `IsNullOrEmpty`, `ErrorResponse` and `MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:15` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 3) MCPForUnity/Editor/Tools/Physics/JointOps.cs:152 — MCPForUnity/Editor/Tools/Physics/JointOps.cs:152-162 | MCPForUnity/Editor/Tools/Physics/JointOps.cs:323-333 | MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:13-23 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:580 — MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:580-590 | MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:591-601 | MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:602-612 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:580` 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×3
  • Duplicated block (8 lines × 3) MCPForUnity/Editor/Tools/Graphics/RendererFeatureOps.cs:251 — MCPForUnity/Editor/Tools/Graphics/RendererFeatureOps.cs:251-258 | MCPForUnity/Editor/Tools/Graphics/RendererFeatureOps.cs:291-298 | MCPForUnity/Editor/Tools/Graphics/RendererFeatureOps.cs:337-344 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) MCPForUnity/Editor/Tools/AssetGen/GenerateAudio.cs:22 — MCPForUnity/Editor/Tools/AssetGen/GenerateAudio.cs:22-29 | MCPForUnity/Editor/Tools/AssetGen/GenerateImage.cs:21-28 | MCPForUnity/Editor/Tools/AssetGen/GenerateModel.cs:22-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/AssetGen/GenerateAudio.cs:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `MCPForUnity/Editor/Tools/AssetGen/GenerateImage.cs:30` calls `ErrorResponse` and `MCPForUnity/Editor/Tools/AssetGen/GenerateAudio.cs:30` 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 (8 lines × 3) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckPackageNaming.cs:149 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckPackageNaming.cs:149-156 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckPackageNaming.cs:179-186 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckPackageNaming.cs:204-211 — 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 `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckPackageNaming.cs:149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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.
IC1 · Incompleteness & stubs · Both branches are identical · ×3
  • Both branches are identical — the condition decides nothing CustomTools/RoslynRuntimeCompilation/RoslynRuntimeCompiler.cs:246 — The `if` and its `else` contain the same 1 statement, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body.
  • Both branches are identical — the condition decides nothing CustomTools/RoslynRuntimeCompilation/RoslynRuntimeCompiler.cs:358 — The `if` and its `else` contain the same 1 statement, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body.
  • Both branches are identical — the condition decides nothing MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs:181 — The `if` and its `else` contain the same 1 statement, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body.
D15 · Churn × Complexity Hotspots · Repeated repair · ×2
  • Repeated repair: MCPForUnity/Editor/Tools/CommandRegistry.cs MCPForUnity/Editor/Tools/CommandRegistry.cs:114 — MCPForUnity/Editor/Tools/CommandRegistry.cs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is CommandRegistry.IsRunningInAssetImportWorker at line 114), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(transport): answer an unknown command without a console error”; “fix(screenshot): wait for end-of-frame without PlayerLoop re-entry”; “fix(discovery): register discovered types in a deterministic order”. 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 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- MCPForUnity/Editor/Tools/CommandRegistry.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: Server/src/cli/commands/camera.py Server/src/cli/commands/camera.py:495 — Server/src/cli/commands/camera.py 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 camera.screenshot at line 495), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): send an [x,y,z] --view-target to Unity as a position”; “fix: camera CLI discarded its output and ignored --format”; “fix: correct inverted run_command arguments in the camera CLI”. 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 18:48:53 +00:00' --until='2026-10-19 18:48:53 +00:00' --full-history --no-merges -- Server/src/cli/commands/camera.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×2
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×2
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×2
  • 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) Server/src/cli/commands/animation.py:18 — Server/src/cli/commands/animation.py:18-32 | Server/src/cli/commands/camera.py:17-31 | Server/src/cli/commands/probuilder.py:30-44 | Server/src/cli/commands/vfx.py:19-33 — 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) Server/src/cli/commands/vfx.py:85 — Server/src/cli/commands/vfx.py:85-105 | Server/src/cli/commands/vfx.py:115-129 | Server/src/cli/commands/vfx.py:158-170 | Server/src/cli/commands/vfx.py:180-192 — 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 (22 lines × 3) · ×2
  • Duplicated block (22 lines × 3) MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs:156 — MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs:156-177 | MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs:154-175 | MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs:253-274 — before extracting anything, compare `MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs` and `MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 74 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 `MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs:156` 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 (22 lines × 3) Server/src/cli/commands/gameobject.py:471 — Server/src/cli/commands/gameobject.py:471-495 | Server/src/cli/commands/material.py:170-193 | Server/src/cli/commands/material.py:217-238 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:614 — MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:614-634 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:652-672 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:614` 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 (21 lines × 2) Server/src/cli/commands/code.py:135 — Server/src/cli/commands/code.py:135-155 | Server/src/cli/commands/script.py:112-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Server/src/cli/commands/code.py:160` calls `argument` and `Server/src/cli/commands/script.py:137` 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 (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) Server/src/cli/commands/asset.py:112 — Server/src/cli/commands/asset.py:112-133 | Server/src/cli/commands/material.py:54-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.
  • Duplicated block (22 lines × 2) Server/src/core/telemetry_decorator.py:40 — Server/src/core/telemetry_decorator.py:40-61 | Server/src/core/telemetry_decorator.py:83-104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) REDACTED:31 — REDACTED:31-48 | REDACTED:80-97 — both copies are in the same file, so extract the 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 (18 lines × 2) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:287 — MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:287-304 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:308-325 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 `results` to `Collider[]` in one and `Collider2D[]` 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 (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) Server/src/cli/commands/prefab.py:101 — Server/src/cli/commands/prefab.py:101-119 | Server/src/cli/commands/prefab.py:147-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs:20 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs:20-38 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/PrefabTypePreviewGenerator.cs:20-38 — before extracting anything, compare `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs` and `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/PrefabTypePreviewGenerator.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 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 `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/Custom/TypeGenerators/ModelTypePreviewGenerator.cs:20` 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 (16–18 lines × 2) · ×2
  • Duplicated block (16–18 lines × 2) MCPForUnity/Editor/Tools/ManageAsset.cs:48 — MCPForUnity/Editor/Tools/ManageAsset.cs:48-65 | MCPForUnity/Editor/Tools/ManageTexture.cs:48-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/ManageAsset.cs:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16–18 lines × 2) MCPForUnity/Editor/Tools/UnityReflect.cs:143 — MCPForUnity/Editor/Tools/UnityReflect.cs:143-160 | MCPForUnity/Editor/Tools/UnityReflect.cs:264-279 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/UnityReflect.cs:143` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×2
  • Duplicated block (17 lines × 4) Server/src/services/tools/manage_animation.py:81 — Server/src/services/tools/manage_animation.py:81-98 | Server/src/services/tools/manage_camera.py:146-162 | Server/src/services/tools/manage_probuilder.py:145-161 | Server/src/services/tools/manage_vfx.py:98-114 — before extracting anything, compare `Server/src/services/tools/manage_animation.py` and `Server/src/services/tools/manage_vfx.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 4) Server/src/cli/commands/asset.py:169 — Server/src/cli/commands/asset.py:169-186 | Server/src/cli/commands/asset.py:194-211 | Server/src/cli/commands/material.py:92-112 | Server/src/cli/commands/prefab.py:23-39 — 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.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×2
  • Duplicated block (15 lines × 3) Server/src/cli/commands/probuilder.py:558 — Server/src/cli/commands/probuilder.py:558-572 | Server/src/cli/commands/probuilder.py:608-622 | Server/src/cli/commands/probuilder.py:650-664 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Server/src/cli/commands/probuilder.py:577` calls `option` and `Server/src/cli/commands/probuilder.py:627` 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 × 3) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Models/Category.cs:17 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Models/Category.cs:17-55 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Models/Package.cs:29-77 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Models/PackageAdditionalData.cs:24-38 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Models/Category.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. 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 (11 lines × 4) · ×2
  • Duplicated block (11 lines × 4) MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:186 — MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:186-196 | MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs:168-178 | MCPForUnity/Editor/Services/AssetGen/Providers/MeshyAdapter.cs:195-205 | MCPForUnity/Editor/Services/AssetGen/Providers/SketchfabAdapter.cs:79-89 — before extracting anything, compare `MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs` and `MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 76 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 `MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:186` 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 × 4) Server/src/cli/commands/animation.py:22 — Server/src/cli/commands/animation.py:22-32 | Server/src/cli/commands/camera.py:21-31 | Server/src/cli/commands/probuilder.py:34-44 | Server/src/cli/commands/vfx.py:23-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 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.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×2
  • Duplicated block (11 lines × 6) MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:14 — MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:14-24 | MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:75-85 | MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:147-157 | MCPForUnity/Editor/Tools/Animation/ControllerLayers.cs:13-23 | MCPForUnity/Editor/Tools/Animation/ControllerLayers.cs:66-76 | MCPForUnity/Editor/Tools/Animation/ControllerLayers.cs:135-145 — there are 6 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 6 sites; resolving a subset leaves the remainder to drift apart. 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 × 6) MCPForUnity/Editor/Tools/Animation/ClipCreate.cs:89 — MCPForUnity/Editor/Tools/Animation/ClipCreate.cs:89-99 | MCPForUnity/Editor/Tools/Animation/ClipCreate.cs:158-168 | MCPForUnity/Editor/Tools/Animation/ClipCreate.cs:229-239 | MCPForUnity/Editor/Tools/Animation/ClipCreate.cs:334-344 | MCPForUnity/Editor/Tools/Animation/ClipCreate.cs:509-519 | MCPForUnity/Editor/Tools/Animation/ClipCreate.cs:560-570 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: PathResolverService (LCOM4 4) MCPForUnity/Editor/Services/PathResolverService.cs:17 — PathResolverService'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: WorkflowBase (LCOM4 4) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/Data/Abstractions/WorkflowBase.cs:20 — WorkflowBase'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.
IC1 · Incompleteness & stubs · Condition was already decided · ×2
  • Condition was already decided — an earlier guard makes this test constant MCPForUnity/Editor/Tools/GameObjects/GameObjectCreate.cs:101 — Control only reaches here when `string.IsNullOrEmpty(name)` is false, because the guard on line 18 exits otherwise. This test is therefore always true and its `else`, and any code it is meant to skip, is unreachable. Implement the distinction that was intended, or delete the test.
  • Condition was already decided — an earlier guard makes this test constant MCPForUnity/Editor/Tools/Sprite2D/SpriteFullSetup.cs:77 — Control only reaches here when `diagnostics.HasErrors` is false, because the guard on line 67 exits otherwise. This test is therefore always false and everything it guards is unreachable. Implement the distinction that was intended, or delete the test.
X2 · Cancellation propagation · Async local function without CancellationToken · ×2
  • Async local function without CancellationToken: Runner MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:1004 — Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
  • Async local function without CancellationToken: AwaitHandler MCPForUnity/Editor/Tools/CommandRegistry.cs:433 — Neither takes a CancellationToken nor reads the one of the function it sits in, while it calls something that takes one — this work can't be stopped early once started. Take the token, or pass on the enclosing one.
D1 · Cyclomatic Complexity · script_apply_edits.script_apply_edits (cyclomatic 146) · ×1
  • script_apply_edits.script_apply_edits (cyclomatic 146) Server/src/services/tools/script_apply_edits.py:727 — script_apply_edits.script_apply_edits has cyclomatic complexity 146 (threshold 15). To reduce it, separate the cases: extract each independent 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 · script_apply_edits._iter_csharp_tokens (cyclomatic 121) · ×1
  • script_apply_edits._iter_csharp_tokens (cyclomatic 121) Server/src/services/tools/script_apply_edits.py:17 — script_apply_edits._iter_csharp_tokens has cyclomatic complexity 121 (threshold 15). To reduce it, separate the cases: extract each independent 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 · ManageScript.EditScript (cyclomatic 106) · ×1
  • ManageScript.EditScript (cyclomatic 106) MCPForUnity/Editor/Tools/ManageScript.cs:1239 — ManageScript.EditScript has cyclomatic complexity 106 (threshold 15). Of this number, 100 points are the body's own statements and 6 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 · ManageScript.TryComputeMethodSpan (cyclomatic 99) · ×1
  • ManageScript.TryComputeMethodSpan (cyclomatic 99) MCPForUnity/Editor/Tools/ManageScript.cs:1826 — ManageScript.TryComputeMethodSpan has cyclomatic complexity 99 (threshold 15). To reduce it, separate the cases: extract each independent 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 · GameObjectSerializer.GetComponentData (cyclomatic 80) · ×1
  • GameObjectSerializer.GetComponentData (cyclomatic 80) MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:232 — GameObjectSerializer.GetComponentData has cyclomatic complexity 80 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FalModelSchema.Parse (cyclomatic 78) · ×1
  • FalModelSchema.Parse (cyclomatic 78) MCPForUnity/Editor/Services/AssetGen/FalModelSchema.cs:55 — FalModelSchema.Parse has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent 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 · ManageProBuilder.CreateShapeViaGenerator (cyclomatic 69) · ×1
  • ManageProBuilder.CreateShapeViaGenerator (cyclomatic 69) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:606 — ManageProBuilder.CreateShapeViaGenerator has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent 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 · ServerManagementService.StopLocalHttpServerInternal (cyclomatic 67) · ×1
  • ServerManagementService.StopLocalHttpServerInternal (cyclomatic 67) REDACTED:596 — ServerManagementService.StopLocalHttpServerInternal has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent 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 · ManageGraphics.HandleCommand (cyclomatic 63) · ×1
  • ManageGraphics.HandleCommand (cyclomatic 63) MCPForUnity/Editor/Tools/Graphics/ManageGraphics.cs:10 — ManageGraphics.HandleCommand has cyclomatic complexity 63 (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 · GameObjectCreate.Handle (cyclomatic 62) · ×1
  • GameObjectCreate.Handle (cyclomatic 62) MCPForUnity/Editor/Tools/GameObjects/GameObjectCreate.cs:15 — GameObjectCreate.Handle has cyclomatic complexity 62 (threshold 15). Of this number, 61 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 · ScriptParser.RemoveStringsAndComments (cyclomatic 62) · ×1
  • ScriptParser.RemoveStringsAndComments (cyclomatic 62) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:285 — ScriptParser.RemoveStringsAndComments has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent 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 · CSharpLexer.Advance (cyclomatic 61) · ×1
  • CSharpLexer.Advance (cyclomatic 61) MCPForUnity/Editor/Tools/ManageScript.cs:893 — CSharpLexer.Advance has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent 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 · manage_script.apply_text_edits (cyclomatic 61) · ×1
  • manage_script.apply_text_edits (cyclomatic 61) Server/src/services/tools/manage_script.py:92 — manage_script.apply_text_edits has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent 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 · ManageScriptableObject.TrySetValueRecursive (cyclomatic 57) · ×1
  • ManageScriptableObject.TrySetValueRecursive (cyclomatic 57) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:788 — ManageScriptableObject.TrySetValueRecursive 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 · manage_texture._normalize_import_settings (cyclomatic 57) · ×1
  • manage_texture._normalize_import_settings (cyclomatic 57) Server/src/services/tools/manage_texture.py:218 — manage_texture._normalize_import_settings 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 · ManageUI.RenderUI (cyclomatic 56) · ×1
  • ManageUI.RenderUI (cyclomatic 56) MCPForUnity/Editor/Tools/ManageUI.cs:820 — ManageUI.RenderUI has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent 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 · GameObjectModify.Handle (cyclomatic 55) · ×1
  • GameObjectModify.Handle (cyclomatic 55) MCPForUnity/Editor/Tools/GameObjects/GameObjectModify.cs:15 — GameObjectModify.Handle 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 · ManagePrefabs.ApplyModificationsToPrefabObject (cyclomatic 53) · ×1
  • ManagePrefabs.ApplyModificationsToPrefabObject (cyclomatic 53) MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:744 — ManagePrefabs.ApplyModificationsToPrefabObject has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageScript.ApplyTextEdits (cyclomatic 52) · ×1
  • ManageScript.ApplyTextEdits (cyclomatic 52) MCPForUnity/Editor/Tools/ManageScript.cs:517 — ManageScript.ApplyTextEdits has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent 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 · manage_ui.manage_ui (cyclomatic 48) · ×1
  • manage_ui.manage_ui (cyclomatic 48) Server/src/services/tools/manage_ui.py:54 — manage_ui.manage_ui has cyclomatic complexity 48 (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 · ManageScene.HandleCommand (cyclomatic 47) · ×1
  • ManageScene.HandleCommand (cyclomatic 47) MCPForUnity/Editor/Tools/ManageScene.cs:165 — ManageScene.HandleCommand has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent 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 · UnityConnection.send_command (cyclomatic 46) · ×1
  • UnityConnection.send_command (cyclomatic 46) Server/src/transport/legacy/unity_connection.py:276 — UnityConnection.send_command 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 · PhysicsValidationOps.ValidateGameObject (cyclomatic 45) · ×1
  • PhysicsValidationOps.ValidateGameObject (cyclomatic 45) MCPForUnity/Editor/Tools/Physics/PhysicsValidationOps.cs:102 — PhysicsValidationOps.ValidateGameObject has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · local_harness.main (cyclomatic 45) · ×1
  • local_harness.main (cyclomatic 45) tools/local_harness.py:1436 — local_harness.main has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageScene.CaptureScreenshot (cyclomatic 44) · ×1
  • ManageScene.CaptureScreenshot (cyclomatic 44) MCPForUnity/Editor/Tools/ManageScene.cs:516 — ManageScene.CaptureScreenshot has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stress_mcp.reload_churn_task (cyclomatic 42) · ×1
  • stress_mcp.reload_churn_task (cyclomatic 42) tools/stress_mcp.py:138 — stress_mcp.reload_churn_task 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 · SpriteControllerBuilder.BuildController (cyclomatic 41) · ×1
  • SpriteControllerBuilder.BuildController (cyclomatic 41) MCPForUnity/Editor/Tools/Sprite2D/SpriteControllerBuilder.cs:64 — SpriteControllerBuilder.BuildController has cyclomatic complexity 41 (threshold 15). Of this number, 36 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utils.normalize_color (cyclomatic 41) · ×1
  • utils.normalize_color (cyclomatic 41) Server/src/services/tools/utils.py:269 — utils.normalize_color has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent 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 · manage_prefabs.manage_prefabs (cyclomatic 40) · ×1
  • manage_prefabs.manage_prefabs (cyclomatic 40) Server/src/services/tools/manage_prefabs.py:48 — manage_prefabs.manage_prefabs has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · local_harness._outcome_from_terminal (cyclomatic 40) · ×1
  • local_harness._outcome_from_terminal (cyclomatic 40) tools/local_harness.py:1248 — local_harness._outcome_from_terminal has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageTexture.ConfigureTextureImporter (cyclomatic 39) · ×1
  • ManageTexture.ConfigureTextureImporter (cyclomatic 39) MCPForUnity/Editor/Tools/ManageTexture.cs:844 — ManageTexture.ConfigureTextureImporter has cyclomatic complexity 39 (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 · ManageProBuilder.SelectFaces (cyclomatic 39) · ×1
  • ManageProBuilder.SelectFaces (cyclomatic 39) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1934 — ManageProBuilder.SelectFaces has cyclomatic complexity 39 (threshold 15). Of this number, 36 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ManageProBuilder.HandleCommand (cyclomatic 40) 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 · ManageScript.HandleCommand (cyclomatic 38) · ×1
  • ManageScript.HandleCommand (cyclomatic 38) MCPForUnity/Editor/Tools/ManageScript.cs:123 — ManageScript.HandleCommand has cyclomatic complexity 38 (threshold 15). Of this number, 34 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 · CSharpLexer.SkipInterpolatedStringBody (cyclomatic 38) · ×1
  • CSharpLexer.SkipInterpolatedStringBody (cyclomatic 38) MCPForUnity/Editor/Tools/ManageScript.cs:1018 — CSharpLexer.SkipInterpolatedStringBody 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 · ManageUI.ApplyInlineStyles (cyclomatic 38) · ×1
  • ManageUI.ApplyInlineStyles (cyclomatic 38) MCPForUnity/Editor/Tools/ManageUI.cs:1593 — ManageUI.ApplyInlineStyles has cyclomatic complexity 38 (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 · TOMLParser.Parse (cyclomatic 37) · ×1
  • TOMLParser.Parse (cyclomatic 37) MCPForUnity/Editor/External/Tommy.cs:648 — TOMLParser.Parse has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MaterialOps.TrySetShaderProperty (cyclomatic 37) · ×1
  • MaterialOps.TrySetShaderProperty (cyclomatic 37) MCPForUnity/Editor/Helpers/MaterialOps.cs:207 — MaterialOps.TrySetShaderProperty has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CSharpLexer.SkipInterpolatedRawStringBody (cyclomatic 37) · ×1
  • CSharpLexer.SkipInterpolatedRawStringBody (cyclomatic 37) MCPForUnity/Editor/Tools/ManageScript.cs:1082 — CSharpLexer.SkipInterpolatedRawStringBody has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageGameObjectCommon.FindObjectsInternal (cyclomatic 36) · ×1
  • ManageGameObjectCommon.FindObjectsInternal (cyclomatic 36) MCPForUnity/Editor/Tools/GameObjects/ManageGameObjectCommon.cs:33 — ManageGameObjectCommon.FindObjectsInternal has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageScript.CheckDuplicateMethodSignatures (cyclomatic 36) · ×1
  • ManageScript.CheckDuplicateMethodSignatures (cyclomatic 36) MCPForUnity/Editor/Tools/ManageScript.cs:2645 — ManageScript.CheckDuplicateMethodSignatures has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JointOps.ConfigureJoint (cyclomatic 36) · ×1
  • JointOps.ConfigureJoint (cyclomatic 36) MCPForUnity/Editor/Tools/Physics/JointOps.cs:150 — JointOps.ConfigureJoint has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utils.build_screenshot_params (cyclomatic 36) · ×1
  • utils.build_screenshot_params (cyclomatic 36) Server/src/services/tools/utils.py:459 — utils.build_screenshot_params has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LightBakingOps.TrySetLightingSetting (cyclomatic 35) · ×1
  • LightBakingOps.TrySetLightingSetting (cyclomatic 35) MCPForUnity/Editor/Tools/Graphics/LightBakingOps.cs:478 — LightBakingOps.TrySetLightingSetting has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ComponentOps.SetObjectReference (cyclomatic 34) · ×1
  • ComponentOps.SetObjectReference (cyclomatic 34) MCPForUnity/Editor/Helpers/ComponentOps.cs:594 — ComponentOps.SetObjectReference has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AssetGenJobManager.Advance (cyclomatic 34) · ×1
  • AssetGenJobManager.Advance (cyclomatic 34) MCPForUnity/Editor/Services/AssetGen/AssetGenJobManager.cs:349 — AssetGenJobManager.Advance has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProcessDetector.LooksLikeMcpServerProcess (cyclomatic 34) · ×1
  • ProcessDetector.LooksLikeMcpServerProcess (cyclomatic 34) REDACTED:174 — ProcessDetector.LooksLikeMcpServerProcess has cyclomatic complexity 34 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GameObjectComponentHelpers.SetNestedProperty (cyclomatic 34) · ×1
  • GameObjectComponentHelpers.SetNestedProperty (cyclomatic 34) MCPForUnity/Editor/Tools/GameObjects/GameObjectComponentHelpers.cs:293 — GameObjectComponentHelpers.SetNestedProperty has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageTexture.CreateTexture (cyclomatic 33) · ×1
  • ManageTexture.CreateTexture (cyclomatic 33) MCPForUnity/Editor/Tools/ManageTexture.cs:97 — ManageTexture.CreateTexture has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · manage_texture.manage_texture (cyclomatic 33) · ×1
  • manage_texture.manage_texture (cyclomatic 33) Server/src/services/tools/manage_texture.py:389 — manage_texture.manage_texture has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _UnityDocParser.handle_endtag (cyclomatic 33) · ×1
  • _UnityDocParser.handle_endtag (cyclomatic 33) Server/src/services/tools/unity_docs.py:184 — _UnityDocParser.handle_endtag has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsonFileMcpConfigurator.CheckStatus (cyclomatic 32) · ×1
  • JsonFileMcpConfigurator.CheckStatus (cyclomatic 32) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:160 — JsonFileMcpConfigurator.CheckStatus 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 · ClaudeCliMcpConfigurator.CheckStatusWithProjectDir (cyclomatic 32) · ×1
  • ClaudeCliMcpConfigurator.CheckStatusWithProjectDir (cyclomatic 32) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:683 — ClaudeCliMcpConfigurator.CheckStatusWithProjectDir 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 · MaterialOps.ApplyProperties (cyclomatic 32) · ×1
  • MaterialOps.ApplyProperties (cyclomatic 32) MCPForUnity/Editor/Helpers/MaterialOps.cs:17 — MaterialOps.ApplyProperties 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 · AssetGenToolHelpers.ListModels (cyclomatic 32) · ×1
  • AssetGenToolHelpers.ListModels (cyclomatic 32) MCPForUnity/Editor/Tools/AssetGen/AssetGenToolHelpers.cs:68 — AssetGenToolHelpers.ListModels has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageEditor.HandleCommand (cyclomatic 32) · ×1
  • ManageEditor.HandleCommand (cyclomatic 32) MCPForUnity/Editor/Tools/ManageEditor.cs:27 — ManageEditor.HandleCommand 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 · ComponentOps.SetSerializedPropertyRecursive (cyclomatic 31) · ×1
  • ComponentOps.SetSerializedPropertyRecursive (cyclomatic 31) MCPForUnity/Editor/Helpers/ComponentOps.cs:490 — ComponentOps.SetSerializedPropertyRecursive has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · McpAdvancedSection.InitializeUI (cyclomatic 31) · ×1
  • McpAdvancedSection.InitializeUI (cyclomatic 31) MCPForUnity/Editor/Windows/Components/Advanced/McpAdvancedSection.cs:95 — McpAdvancedSection.InitializeUI 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 · MCPForUnityEditorWindow.CreateGUI (cyclomatic 31) · ×1
  • MCPForUnityEditorWindow.CreateGUI (cyclomatic 31) MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs:147 — MCPForUnityEditorWindow.CreateGUI has cyclomatic complexity 31 (threshold 15). Of this number, 30 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 · main.main (cyclomatic 31) · ×1
  • main.main (cyclomatic 31) Server/src/main.py:656 — main.main 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 · StdioBridgeHost.HandleClientAsync (cyclomatic 29) · ×1
  • StdioBridgeHost.HandleClientAsync (cyclomatic 29) MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:563 — StdioBridgeHost.HandleClientAsync 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 · ClipPresets.CreatePreset (cyclomatic 29) · ×1
  • ClipPresets.CreatePreset (cyclomatic 29) MCPForUnity/Editor/Tools/Animation/ClipPresets.cs:14 — ClipPresets.CreatePreset has cyclomatic complexity 29 (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 · ControllerCreate.AddTransition (cyclomatic 29) · ×1
  • ControllerCreate.AddTransition (cyclomatic 29) MCPForUnity/Editor/Tools/Animation/ControllerCreate.cs:116 — ControllerCreate.AddTransition 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 · ManageCamera.HandleCommand (cyclomatic 29) · ×1
  • ManageCamera.HandleCommand (cyclomatic 29) MCPForUnity/Editor/Tools/Cameras/ManageCamera.cs:10 — ManageCamera.HandleCommand has cyclomatic complexity 29 (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 · GraphicsHelpers.SetSerializedValue (cyclomatic 29) · ×1
  • GraphicsHelpers.SetSerializedValue (cyclomatic 29) MCPForUnity/Editor/Tools/Graphics/GraphicsHelpers.cs:167 — GraphicsHelpers.SetSerializedValue 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 · ReadConsole.GetConsoleEntries (cyclomatic 29) · ×1
  • ReadConsole.GetConsoleEntries (cyclomatic 29) MCPForUnity/Editor/Tools/ReadConsole.cs:345 — ReadConsole.GetConsoleEntries 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 · McpConnectionSection.UpdateConnectionStatus (cyclomatic 29) · ×1
  • McpConnectionSection.UpdateConnectionStatus (cyclomatic 29) MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:356 — McpConnectionSection.UpdateConnectionStatus 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 · ManagePrefabs.CreateSingleChildInPrefab (cyclomatic 28) · ×1
  • ManagePrefabs.CreateSingleChildInPrefab (cyclomatic 28) MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:991 — ManagePrefabs.CreateSingleChildInPrefab 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 · SpriteImportSetup.SliceSheet (cyclomatic 28) · ×1
  • SpriteImportSetup.SliceSheet (cyclomatic 28) MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs:206 — SpriteImportSetup.SliceSheet has cyclomatic complexity 28 (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 · read_console.read_console (cyclomatic 28) · ×1
  • read_console.read_console (cyclomatic 28) Server/src/services/tools/read_console.py:35 — read_console.read_console 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 · set_active_instance.set_active_instance (cyclomatic 28) · ×1
  • set_active_instance.set_active_instance (cyclomatic 28) Server/src/services/tools/set_active_instance.py:27 — set_active_instance.set_active_instance 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 · VolumeOps.ConvertToParameterType (cyclomatic 27) · ×1
  • VolumeOps.ConvertToParameterType (cyclomatic 27) MCPForUnity/Editor/Tools/Graphics/VolumeOps.cs:583 — VolumeOps.ConvertToParameterType 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 · ManageUI.ApplyPanelSettingsProperties (cyclomatic 27) · ×1
  • ManageUI.ApplyPanelSettingsProperties (cyclomatic 27) MCPForUnity/Editor/Tools/ManageUI.cs:522 — ManageUI.ApplyPanelSettingsProperties 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 · ManageUI.ModifyVisualElement (cyclomatic 27) · ×1
  • ManageUI.ModifyVisualElement (cyclomatic 27) MCPForUnity/Editor/Tools/ManageUI.cs:1436 — ManageUI.ModifyVisualElement has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · preflight.preflight (cyclomatic 26) · ×1
  • preflight.preflight (cyclomatic 26) Server/src/services/tools/preflight.py:27 — preflight.preflight 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 · CodexMcpConfigurator.CheckStatus (cyclomatic 25) · ×1
  • CodexMcpConfigurator.CheckStatus (cyclomatic 25) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:443 — CodexMcpConfigurator.CheckStatus 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 · FalAdapter.SubmitAsync (cyclomatic 25) · ×1
  • FalAdapter.SubmitAsync (cyclomatic 25) MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:27 — FalAdapter.SubmitAsync has cyclomatic complexity 25 (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 · OpenRouterAdapter.SubmitAsync (cyclomatic 25) · ×1
  • OpenRouterAdapter.SubmitAsync (cyclomatic 25) MCPForUnity/Editor/Services/AssetGen/Providers/OpenRouterAdapter.cs:32 — OpenRouterAdapter.SubmitAsync 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 · ServerManagementService.StartLocalHttpServer (cyclomatic 25) · ×1
  • ServerManagementService.StartLocalHttpServer (cyclomatic 25) REDACTED:239 — ServerManagementService.StartLocalHttpServer 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 · TransportCommandDispatcher.ProcessCommand (cyclomatic 25) · ×1
  • TransportCommandDispatcher.ProcessCommand (cyclomatic 25) MCPForUnity/Editor/Services/Transport/TransportCommandDispatcher.cs:271 — TransportCommandDispatcher.ProcessCommand has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AnimatorControl.SetParameter (cyclomatic 25) · ×1
  • AnimatorControl.SetParameter (cyclomatic 25) MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:57 — AnimatorControl.SetParameter 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 · BlenderBridgeTool.CheckUpdatesBlocking (cyclomatic 25) · ×1
  • BlenderBridgeTool.CheckUpdatesBlocking (cyclomatic 25) MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:689 — BlenderBridgeTool.CheckUpdatesBlocking has cyclomatic complexity 25 (threshold 15). Of this number, 23 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 · texture._normalize_import_settings (cyclomatic 25) · ×1
  • texture._normalize_import_settings (cyclomatic 25) Server/src/cli/commands/texture.py:245 — texture._normalize_import_settings has cyclomatic complexity 25 (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 · tools.sync_tool_visibility_from_unity (cyclomatic 25) · ×1
  • tools.sync_tool_visibility_from_unity (cyclomatic 25) Server/src/services/tools/__init__.py:97 — tools.sync_tool_visibility_from_unity 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 · utils.normalize_vector3 (cyclomatic 25) · ×1
  • utils.normalize_vector3 (cyclomatic 25) Server/src/services/tools/utils.py:135 — utils.normalize_vector3 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 · PluginHub._resolve_session_id (cyclomatic 25) · ×1
  • PluginHub._resolve_session_id (cyclomatic 25) Server/src/transport/plugin_hub.py:857 — PluginHub._resolve_session_id has cyclomatic complexity 25 (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 · TOMLParser.ReadQuotedValueMultiLine (cyclomatic 24) · ×1
  • TOMLParser.ReadQuotedValueMultiLine (cyclomatic 24) MCPForUnity/Editor/External/Tommy.cs:1520 — TOMLParser.ReadQuotedValueMultiLine 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 · ConfigJsonBuilder.PopulateUnityNode (cyclomatic 24) · ×1
  • ConfigJsonBuilder.PopulateUnityNode (cyclomatic 24) MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs:51 — ConfigJsonBuilder.PopulateUnityNode 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 · TextureOps.ApplyPixelDataToRegion (cyclomatic 24) · ×1
  • TextureOps.ApplyPixelDataToRegion (cyclomatic 24) MCPForUnity/Editor/Helpers/TextureOps.cs:83 — TextureOps.ApplyPixelDataToRegion 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 · BlenderBridgeTool.ImportModelAsync (cyclomatic 24) · ×1
  • BlenderBridgeTool.ImportModelAsync (cyclomatic 24) MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:188 — BlenderBridgeTool.ImportModelAsync has cyclomatic complexity 24 (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 · ManageScriptableObject.ValidatePatches (cyclomatic 24) · ×1
  • ManageScriptableObject.ValidatePatches (cyclomatic 24) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:270 — ManageScriptableObject.ValidatePatches 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 · JointOps.AddJoint (cyclomatic 24) · ×1
  • JointOps.AddJoint (cyclomatic 24) MCPForUnity/Editor/Tools/Physics/JointOps.cs:36 — JointOps.AddJoint 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 · SpriteClipBuilder.CreateClips (cyclomatic 24) · ×1
  • SpriteClipBuilder.CreateClips (cyclomatic 24) MCPForUnity/Editor/Tools/Sprite2D/SpriteClipBuilder.cs:57 — SpriteClipBuilder.CreateClips 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 · ScriptParser.ScanForTypes (cyclomatic 24) · ×1
  • ScriptParser.ScanForTypes (cyclomatic 24) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:477 — ScriptParser.ScanForTypes 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 · manage_scene.manage_scene (cyclomatic 24) · ×1
  • manage_scene.manage_scene (cyclomatic 24) Server/src/services/tools/manage_scene.py:28 — manage_scene.manage_scene has cyclomatic complexity 24 (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 · _UnityDocParser.handle_starttag (cyclomatic 24) · ×1
  • _UnityDocParser.handle_starttag (cyclomatic 24) Server/src/services/tools/unity_docs.py:137 — _UnityDocParser.handle_starttag has cyclomatic complexity 24 (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 · UnityConnectionPool._resolve_instance_id (cyclomatic 24) · ×1
  • UnityConnectionPool._resolve_instance_id (cyclomatic 24) Server/src/transport/legacy/unity_connection.py:559 — UnityConnectionPool._resolve_instance_id has cyclomatic complexity 24 (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 · unity_connection.send_command_with_retry (cyclomatic 24) · ×1
  • unity_connection.send_command_with_retry (cyclomatic 24) Server/src/transport/legacy/unity_connection.py:814 — unity_connection.send_command_with_retry 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 · generate_docs_reference._render_type (cyclomatic 24) · ×1
  • generate_docs_reference._render_type (cyclomatic 24) tools/generate_docs_reference.py:120 — generate_docs_reference._render_type 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 · VectorParsing.ValidateQuaternionFormat (cyclomatic 23) · ×1
  • VectorParsing.ValidateQuaternionFormat (cyclomatic 23) MCPForUnity/Editor/Helpers/VectorParsing.cs:571 — VectorParsing.ValidateQuaternionFormat has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VolumeOps.CreateVolume (cyclomatic 23) · ×1
  • VolumeOps.CreateVolume (cyclomatic 23) MCPForUnity/Editor/Tools/Graphics/VolumeOps.cs:19 — VolumeOps.CreateVolume has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageMaterial.SetRendererColor (cyclomatic 23) · ×1
  • ManageMaterial.SetRendererColor (cyclomatic 23) MCPForUnity/Editor/Tools/ManageMaterial.cs:246 — ManageMaterial.SetRendererColor has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageScript.ExtractParamTypes (cyclomatic 23) · ×1
  • ManageScript.ExtractParamTypes (cyclomatic 23) MCPForUnity/Editor/Tools/ManageScript.cs:2540 — ManageScript.ExtractParamTypes has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageScript.ValidateScriptSyntaxUnity (cyclomatic 23) · ×1
  • ManageScript.ValidateScriptSyntaxUnity (cyclomatic 23) MCPForUnity/Editor/Tools/ManageScript.cs:2578 — ManageScript.ValidateScriptSyntaxUnity has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ManageScriptableObject.HandleCreate (cyclomatic 23) · ×1
  • ManageScriptableObject.HandleCreate (cyclomatic 23) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:78 — ManageScriptableObject.HandleCreate has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PhysicsForceOps.ApplyNormalForce (cyclomatic 23) · ×1
  • PhysicsForceOps.ApplyNormalForce (cyclomatic 23) MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:69 — PhysicsForceOps.ApplyNormalForce has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MemorySnapshotOps.TakeSnapshotAsync (cyclomatic 23) · ×1
  • MemorySnapshotOps.TakeSnapshotAsync (cyclomatic 23) MCPForUnity/Editor/Tools/Profiler/Operations/MemorySnapshotOps.cs:20 — MemorySnapshotOps.TakeSnapshotAsync has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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 · ParticleWrite.SetRenderer (cyclomatic 23) · ×1
  • ParticleWrite.SetRenderer (cyclomatic 23) MCPForUnity/Editor/Tools/Vfx/ParticleWrite.cs:212 — ParticleWrite.SetRenderer has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · output.format_as_text (cyclomatic 23) · ×1
  • output.format_as_text (cyclomatic 23) Server/src/cli/utils/output.py:35 — output.format_as_text has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnityInstanceMiddleware._maybe_autoselect_instance (cyclomatic 23) · ×1
  • UnityInstanceMiddleware._maybe_autoselect_instance (cyclomatic 23) Server/src/transport/unity_instance_middleware.py:215 — UnityInstanceMiddleware._maybe_autoselect_instance has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ComponentOps.TrySetViaReflection (cyclomatic 22) · ×1
  • ComponentOps.TrySetViaReflection (cyclomatic 22) MCPForUnity/Editor/Helpers/ComponentOps.cs:197 — ComponentOps.TrySetViaReflection 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 · ComponentOps.AssignObjectReference (cyclomatic 22) · ×1
  • ComponentOps.AssignObjectReference (cyclomatic 22) MCPForUnity/Editor/Helpers/ComponentOps.cs:776 — ComponentOps.AssignObjectReference 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 · ManageMaterial.CreateMaterial (cyclomatic 22) · ×1
  • ManageMaterial.CreateMaterial (cyclomatic 22) MCPForUnity/Editor/Tools/ManageMaterial.cs:586 — ManageMaterial.CreateMaterial has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ManageScene.ResolveGameObject (cyclomatic 22) · ×1
  • ManageScene.ResolveGameObject (cyclomatic 22) MCPForUnity/Editor/Tools/ManageScene.cs:2080 — ManageScene.ResolveGameObject 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 · PhysicsMaterialOps.Assign (cyclomatic 22) · ×1
  • PhysicsMaterialOps.Assign (cyclomatic 22) MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:64 — PhysicsMaterialOps.Assign 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 · PhysicsSettingsOps.SetSettings3D (cyclomatic 22) · ×1
  • PhysicsSettingsOps.SetSettings3D (cyclomatic 22) MCPForUnity/Editor/Tools/Physics/PhysicsSettingsOps.cs:118 — PhysicsSettingsOps.SetSettings3D 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 · SpriteImportSetup.GetInfo (cyclomatic 22) · ×1
  • SpriteImportSetup.GetInfo (cyclomatic 22) MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs:18 — SpriteImportSetup.GetInfo 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 · ParticleWrite.SetMain (cyclomatic 22) · ×1
  • ParticleWrite.SetMain (cyclomatic 22) MCPForUnity/Editor/Tools/Vfx/ParticleWrite.cs:18 — ParticleWrite.SetMain has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · McpConnectionSection.RegisterCallbacks (cyclomatic 22) · ×1
  • McpConnectionSection.RegisterCallbacks (cyclomatic 22) MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:184 — McpConnectionSection.RegisterCallbacks has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 186, 223, 246, …). 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 · GameObjectComponentHelpers.AddComponentInternal (cyclomatic 21) · ×1
  • GameObjectComponentHelpers.AddComponentInternal (cyclomatic 21) MCPForUnity/Editor/Tools/GameObjects/GameObjectComponentHelpers.cs:18 — GameObjectComponentHelpers.AddComponentInternal has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ManageAsset.ModifyAsset (cyclomatic 21) · ×1
  • ManageAsset.ModifyAsset (cyclomatic 21) MCPForUnity/Editor/Tools/ManageAsset.cs:335 — ManageAsset.ModifyAsset 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 · ManageScene.GetSceneHierarchyPaged (cyclomatic 21) · ×1
  • ManageScene.GetSceneHierarchyPaged (cyclomatic 21) MCPForUnity/Editor/Tools/ManageScene.cs:1978 — ManageScene.GetSceneHierarchyPaged has cyclomatic complexity 21 (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 · ManageTexture.ModifyTexture (cyclomatic 21) · ×1
  • ManageTexture.ModifyTexture (cyclomatic 21) MCPForUnity/Editor/Tools/ManageTexture.cs:248 — ManageTexture.ModifyTexture 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 · McpClientConfigSection.ApplyStatusToUi (cyclomatic 21) · ×1
  • McpClientConfigSection.ApplyStatusToUi (cyclomatic 21) MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs:713 — McpClientConfigSection.ApplyStatusToUi has cyclomatic complexity 21 (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 · CheckFileMenuNames.Run (cyclomatic 21) · ×1
  • CheckFileMenuNames.Run (cyclomatic 21) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckFileMenuNames.cs:25 — CheckFileMenuNames.Run 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 · editor_state.get_editor_state (cyclomatic 21) · ×1
  • editor_state.get_editor_state (cyclomatic 21) Server/src/services/resources/editor_state.py:224 — editor_state.get_editor_state 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 · manage_gameobject.manage_gameobject (cyclomatic 21) · ×1
  • manage_gameobject.manage_gameobject (cyclomatic 21) Server/src/services/tools/manage_gameobject.py:136 — manage_gameobject.manage_gameobject has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · script_apply_edits._apply_edits_locally (cyclomatic 21) · ×1
  • script_apply_edits._apply_edits_locally (cyclomatic 21) Server/src/services/tools/script_apply_edits.py:378 — script_apply_edits._apply_edits_locally 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 · focus_nudge._find_unity_pid_by_project_path_windows (cyclomatic 21) · ×1
  • focus_nudge._find_unity_pid_by_project_path_windows (cyclomatic 21) Server/src/utils/focus_nudge.py:411 — focus_nudge._find_unity_pid_by_project_path_windows 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 · GameObjectSerializer.IsUnsafeType (cyclomatic 20) · ×1
  • GameObjectSerializer.IsUnsafeType (cyclomatic 20) MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:156 — GameObjectSerializer.IsUnsafeType 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 · ToolParams.CoerceStringArray (cyclomatic 20) · ×1
  • ToolParams.CoerceStringArray (cyclomatic 20) MCPForUnity/Editor/Helpers/ToolParams.cs:114 — ToolParams.CoerceStringArray 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 · BatchExecute.HandleCommand (cyclomatic 20) · ×1
  • BatchExecute.HandleCommand (cyclomatic 20) MCPForUnity/Editor/Tools/BatchExecute.cs:34 — BatchExecute.HandleCommand 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 · RoslynCompiler.Initialize (cyclomatic 20) · ×1
  • RoslynCompiler.Initialize (cyclomatic 20) MCPForUnity/Editor/Tools/ExecuteCode.cs:666 — RoslynCompiler.Initialize 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 · ManageGameObject.HandleCommand (cyclomatic 20) · ×1
  • ManageGameObject.HandleCommand (cyclomatic 20) MCPForUnity/Editor/Tools/GameObjects/ManageGameObject.cs:21 — ManageGameObject.HandleCommand has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ManageComponents.SetProperty (cyclomatic 20) · ×1
  • ManageComponents.SetProperty (cyclomatic 20) MCPForUnity/Editor/Tools/ManageComponents.cs:190 — ManageComponents.SetProperty 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 · PhysicsRigidbodyOps.ConfigureRigidbody3D (cyclomatic 20) · ×1
  • PhysicsRigidbodyOps.ConfigureRigidbody3D (cyclomatic 20) MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:189 — PhysicsRigidbodyOps.ConfigureRigidbody3D 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 · PhysicsRigidbodyOps.ConfigureRigidbody2D (cyclomatic 20) · ×1
  • PhysicsRigidbodyOps.ConfigureRigidbody2D (cyclomatic 20) MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:313 — PhysicsRigidbodyOps.ConfigureRigidbody2D 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 · SpriteNamingDetector.Words (cyclomatic 20) · ×1
  • SpriteNamingDetector.Words (cyclomatic 20) MCPForUnity/Editor/Tools/Sprite2D/SpriteNamingDetector.cs:77 — SpriteNamingDetector.Words has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · prefab.modify (cyclomatic 20) · ×1
  • prefab.modify (cyclomatic 20) Server/src/cli/commands/prefab.py:305 — prefab.modify 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 · manage_components.manage_components (cyclomatic 20) · ×1
  • manage_components.manage_components (cyclomatic 20) Server/src/services/tools/manage_components.py:31 — manage_components.manage_components 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 · UnityConnection.receive_full_response (cyclomatic 20) · ×1
  • UnityConnection.receive_full_response (cyclomatic 20) Server/src/transport/legacy/unity_connection.py:173 — UnityConnection.receive_full_response 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 · focus_nudge.nudge_unity_focus (cyclomatic 20) · ×1
  • focus_nudge.nudge_unity_focus (cyclomatic 20) Server/src/utils/focus_nudge.py:633 — focus_nudge.nudge_unity_focus 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 · GameObjectSerializer.ConvertJTokenToPlainObject (cyclomatic 19) · ×1
  • GameObjectSerializer.ConvertJTokenToPlainObject (cyclomatic 19) MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:649 — GameObjectSerializer.ConvertJTokenToPlainObject has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FalModelCatalog.Details (cyclomatic 19) · ×1
  • FalModelCatalog.Details (cyclomatic 19) MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs:207 — FalModelCatalog.Details has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SkyboxOps.SetMaterialProperty (cyclomatic 19) · ×1
  • SkyboxOps.SetMaterialProperty (cyclomatic 19) MCPForUnity/Editor/Tools/Graphics/SkyboxOps.cs:433 — SkyboxOps.SetMaterialProperty has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageBuild.HandleBatch (cyclomatic 19) · ×1
  • ManageBuild.HandleBatch (cyclomatic 19) MCPForUnity/Editor/Tools/ManageBuild.cs:422 — ManageBuild.HandleBatch 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 cases: extract each independent 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 · ManageScene.CaptureOrbitBatch (cyclomatic 19) · ×1
  • ManageScene.CaptureOrbitBatch (cyclomatic 19) MCPForUnity/Editor/Tools/ManageScene.cs:1026 — ManageScene.CaptureOrbitBatch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageScene.CapturePositionedScreenshot (cyclomatic 19) · ×1
  • ManageScene.CapturePositionedScreenshot (cyclomatic 19) MCPForUnity/Editor/Tools/ManageScene.cs:1176 — ManageScene.CapturePositionedScreenshot 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 · ManageScript.FindBestAnchorMatch (cyclomatic 19) · ×1
  • ManageScript.FindBestAnchorMatch (cyclomatic 19) MCPForUnity/Editor/Tools/ManageScript.cs:2076 — ManageScript.FindBestAnchorMatch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageScript.ValidateSemanticRules (cyclomatic 19) · ×1
  • ManageScript.ValidateSemanticRules (cyclomatic 19) MCPForUnity/Editor/Tools/ManageScript.cs:2790 — ManageScript.ValidateSemanticRules has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManageShader.HandleCommand (cyclomatic 19) · ×1
  • ManageShader.HandleCommand (cyclomatic 19) MCPForUnity/Editor/Tools/ManageShader.cs:21 — ManageShader.HandleCommand 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 · SpriteFullSetup.Run (cyclomatic 19) · ×1
  • SpriteFullSetup.Run (cyclomatic 19) MCPForUnity/Editor/Tools/Sprite2D/SpriteFullSetup.cs:26 — SpriteFullSetup.Run has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SpriteImportSetup.SliceConverted (cyclomatic 19) · ×1
  • SpriteImportSetup.SliceConverted (cyclomatic 19) MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs:292 — SpriteImportSetup.SliceConverted 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 · UnityReflect.FindExtensionMethods (cyclomatic 19) · ×1
  • UnityReflect.FindExtensionMethods (cyclomatic 19) MCPForUnity/Editor/Tools/UnityReflect.cs:689 — UnityReflect.FindExtensionMethods has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · McpAssetGenSection.PopulateModelDropdown (cyclomatic 19) · ×1
  • McpAssetGenSection.PopulateModelDropdown (cyclomatic 19) MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs:465 — McpAssetGenSection.PopulateModelDropdown has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MCPForUnityEditorWindow.SwitchPanel (cyclomatic 19) · ×1
  • MCPForUnityEditorWindow.SwitchPanel (cyclomatic 19) MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs:714 — MCPForUnityEditorWindow.SwitchPanel has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExternalChangesScanner._resolve_manifest_extra_roots (cyclomatic 19) · ×1
  • ExternalChangesScanner._resolve_manifest_extra_roots (cyclomatic 19) Server/src/services/state/external_changes_scanner.py:106 — ExternalChangesScanner._resolve_manifest_extra_roots has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnityInstanceMiddleware._resolve_enabled_tool_names_for_context (cyclomatic 19) · ×1
  • UnityInstanceMiddleware._resolve_enabled_tool_names_for_context (cyclomatic 19) Server/src/transport/unity_instance_middleware.py:458 — UnityInstanceMiddleware._resolve_enabled_tool_names_for_context has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · local_harness.discover_editor (cyclomatic 19) · ×1
  • local_harness.discover_editor (cyclomatic 19) tools/local_harness.py:357 — local_harness.discover_editor has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StringUtils.Unescape (cyclomatic 18) · ×1
  • StringUtils.Unescape (cyclomatic 18) MCPForUnity/Editor/External/Tommy.cs:2096 — StringUtils.Unescape has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FalModelCatalog.Get (cyclomatic 18) · ×1
  • FalModelCatalog.Get (cyclomatic 18) MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs:253 — FalModelCatalog.Get 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 · FalModelCatalog.Load (cyclomatic 18) · ×1
  • FalModelCatalog.Load (cyclomatic 18) MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs:333 — FalModelCatalog.Load has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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 · EditorStateCache.OnUpdate (cyclomatic 18) · ×1
  • EditorStateCache.OnUpdate (cyclomatic 18) MCPForUnity/Editor/Services/EditorStateCache.cs:320 — EditorStateCache.OnUpdate has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · StdioBridgeHost.ProcessCommands (cyclomatic 18) · ×1
  • StdioBridgeHost.ProcessCommands (cyclomatic 18) MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:890 — StdioBridgeHost.ProcessCommands 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 · ControllerBlendTrees.AddBlendTreeChild (cyclomatic 18) · ×1
  • ControllerBlendTrees.AddBlendTreeChild (cyclomatic 18) MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:145 — ControllerBlendTrees.AddBlendTreeChild has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PhysicsQueryOps.Shapecast3D (cyclomatic 18) · ×1
  • PhysicsQueryOps.Shapecast3D (cyclomatic 18) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:354 — PhysicsQueryOps.Shapecast3D has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ManagePrefabs.PersistRuntimeMaterials (cyclomatic 18) · ×1
  • ManagePrefabs.PersistRuntimeMaterials (cyclomatic 18) MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:292 — ManagePrefabs.PersistRuntimeMaterials 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 · ManageProBuilder.GetMeshInfo (cyclomatic 18) · ×1
  • ManageProBuilder.GetMeshInfo (cyclomatic 18) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:2276 — ManageProBuilder.GetMeshInfo has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: ManageProBuilder.HandleCommand (cyclomatic 40) 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 · FrameDebuggerOps.GetEvents (cyclomatic 18) · ×1
  • FrameDebuggerOps.GetEvents (cyclomatic 18) MCPForUnity/Editor/Tools/Profiler/Operations/FrameDebuggerOps.cs:112 — FrameDebuggerOps.GetEvents 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 · UnityReflect.GetMemberInfo (cyclomatic 18) · ×1
  • UnityReflect.GetMemberInfo (cyclomatic 18) MCPForUnity/Editor/Tools/UnityReflect.cs:254 — UnityReflect.GetMemberInfo has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnityReflect.SearchTypes (cyclomatic 18) · ×1
  • UnityReflect.SearchTypes (cyclomatic 18) MCPForUnity/Editor/Tools/UnityReflect.cs:410 — UnityReflect.SearchTypes has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnityReflect.FindExtensionMethodInfos (cyclomatic 18) · ×1
  • UnityReflect.FindExtensionMethodInfos (cyclomatic 18) MCPForUnity/Editor/Tools/UnityReflect.cs:735 — UnityReflect.FindExtensionMethodInfos 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 · McpConnectionSection.UpdateStartHttpButtonState (cyclomatic 18) · ×1
  • McpConnectionSection.UpdateStartHttpButtonState (cyclomatic 18) MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:611 — McpConnectionSection.UpdateStartHttpButtonState 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 · gameobject.create (cyclomatic 18) · ×1
  • gameobject.create (cyclomatic 18) Server/src/cli/commands/gameobject.py:129 — gameobject.create has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · texture._normalize_set_pixels (cyclomatic 18) · ×1
  • texture._normalize_set_pixels (cyclomatic 18) Server/src/cli/commands/texture.py:176 — texture._normalize_set_pixels has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · unity_response.normalize_unity_response (cyclomatic 18) · ×1
  • unity_response.normalize_unity_response (cyclomatic 18) Server/src/models/unity_response.py:9 — unity_response.normalize_unity_response has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · refresh_unity.refresh_unity (cyclomatic 18) · ×1
  • refresh_unity.refresh_unity (cyclomatic 18) Server/src/services/tools/refresh_unity.py:175 — refresh_unity.refresh_unity 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 · mark_skipped.main (cyclomatic 18) · ×1
  • mark_skipped.main (cyclomatic 18) .github/scripts/mark_skipped.py:59 — mark_skipped.main 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 · TOMLParser.CreateTable (cyclomatic 17) · ×1
  • TOMLParser.CreateTable (cyclomatic 17) MCPForUnity/Editor/External/Tommy.cs:1668 — TOMLParser.CreateTable 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 · RendererHelpers.ApplyLineTrailProperties (cyclomatic 17) · ×1
  • RendererHelpers.ApplyLineTrailProperties (cyclomatic 17) MCPForUnity/Editor/Helpers/RendererHelpers.cs:280 — RendererHelpers.ApplyLineTrailProperties has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · VectorParsing.ParseQuaternion (cyclomatic 17) · ×1
  • VectorParsing.ParseQuaternion (cyclomatic 17) MCPForUnity/Editor/Helpers/VectorParsing.cs:152 — VectorParsing.ParseQuaternion 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 · StdIoVersionMigration.RunMigrationIfNeeded (cyclomatic 17) · ×1
  • StdIoVersionMigration.RunMigrationIfNeeded (cyclomatic 17) MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs:31 — StdIoVersionMigration.RunMigrationIfNeeded 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 · FalModelCatalog.RefreshCore (cyclomatic 17) · ×1
  • FalModelCatalog.RefreshCore (cyclomatic 17) MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs:107 — FalModelCatalog.RefreshCore has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StdioBridgeHost.Stop (cyclomatic 17) · ×1
  • StdioBridgeHost.Stop (cyclomatic 17) MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:448 — StdioBridgeHost.Stop has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · BuildSettingsHelper.WriteProperty (cyclomatic 17) · ×1
  • BuildSettingsHelper.WriteProperty (cyclomatic 17) MCPForUnity/Editor/Tools/Build/BuildSettingsHelper.cs:36 — BuildSettingsHelper.WriteProperty has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ManageAsset.CreateAsset (cyclomatic 17) · ×1
  • ManageAsset.CreateAsset (cyclomatic 17) MCPForUnity/Editor/Tools/ManageAsset.cs:164 — ManageAsset.CreateAsset 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. This is NOT this file's highest cyclomatic complexity: ManageAsset.HandleCommand (cyclomatic 18) 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 · ManageScript.UpdateScript (cyclomatic 17) · ×1
  • ManageScript.UpdateScript (cyclomatic 17) MCPForUnity/Editor/Tools/ManageScript.cs:437 — ManageScript.UpdateScript has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ManageScriptableObject.ApplyArrayResize (cyclomatic 17) · ×1
  • ManageScriptableObject.ApplyArrayResize (cyclomatic 17) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:603 — ManageScriptableObject.ApplyArrayResize 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 · ManageUI.ListUIAssets (cyclomatic 17) · ×1
  • ManageUI.ListUIAssets (cyclomatic 17) MCPForUnity/Editor/Tools/ManageUI.cs:1297 — ManageUI.ListUIAssets 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 · RefreshUnity.HandleCommand (cyclomatic 17) · ×1
  • RefreshUnity.HandleCommand (cyclomatic 17) MCPForUnity/Editor/Tools/RefreshUnity.cs:33 — RefreshUnity.HandleCommand 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 · RoslynRuntimeCompiler.CompileAndExecute (cyclomatic 17) · ×1
  • RoslynRuntimeCompiler.CompileAndExecute (cyclomatic 17) CustomTools/RoslynRuntimeCompilation/RoslynRuntimeCompiler.cs:394 — RoslynRuntimeCompiler.CompileAndExecute 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 · texture.create (cyclomatic 17) · ×1
  • texture.create (cyclomatic 17) Server/src/cli/commands/texture.py:344 — texture.create 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 · manage_sprite.manage_sprite (cyclomatic 17) · ×1
  • manage_sprite.manage_sprite (cyclomatic 17) Server/src/services/tools/manage_sprite.py:56 — manage_sprite.manage_sprite 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 · unity_docs._lookup_single (cyclomatic 17) · ×1
  • unity_docs._lookup_single (cyclomatic 17) Server/src/services/tools/unity_docs.py:579 — unity_docs._lookup_single 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 · PluginHub._handle_register (cyclomatic 17) · ×1
  • PluginHub._handle_register (cyclomatic 17) Server/src/transport/plugin_hub.py:435 — PluginHub._handle_register 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 · UnityInstanceMiddleware._resolve_instance_value (cyclomatic 17) · ×1
  • UnityInstanceMiddleware._resolve_instance_value (cyclomatic 17) Server/src/transport/unity_instance_middleware.py:141 — UnityInstanceMiddleware._resolve_instance_value 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 · UnityInstanceMiddleware._inject_unity_instance (cyclomatic 17) · ×1
  • UnityInstanceMiddleware._inject_unity_instance (cyclomatic 17) Server/src/transport/unity_instance_middleware.py:324 — UnityInstanceMiddleware._inject_unity_instance 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 · McpConfigurationHelper.WriteAtomicFile (cyclomatic 16) · ×1
  • McpConfigurationHelper.WriteAtomicFile (cyclomatic 16) MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs:234 — McpConfigurationHelper.WriteAtomicFile has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · RenderPipelineUtility.GetOrCreateDefaultVFXMaterial (cyclomatic 16) · ×1
  • RenderPipelineUtility.GetOrCreateDefaultVFXMaterial (cyclomatic 16) MCPForUnity/Editor/Helpers/RenderPipelineUtility.cs:284 — RenderPipelineUtility.GetOrCreateDefaultVFXMaterial 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 · FalModelCatalog.VerifyForGeneration (cyclomatic 16) · ×1
  • FalModelCatalog.VerifyForGeneration (cyclomatic 16) MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs:297 — FalModelCatalog.VerifyForGeneration 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 · MeshyAdapter.PollAsync (cyclomatic 16) · ×1
  • MeshyAdapter.PollAsync (cyclomatic 16) MCPForUnity/Editor/Services/AssetGen/Providers/MeshyAdapter.cs:78 — MeshyAdapter.PollAsync 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 · ServerManagementService.IsLocalHttpServerRunning (cyclomatic 16) · ×1
  • ServerManagementService.IsLocalHttpServerRunning (cyclomatic 16) REDACTED:418 — ServerManagementService.IsLocalHttpServerRunning 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 · StdioBridgeHost.Start (cyclomatic 16) · ×1
  • StdioBridgeHost.Start (cyclomatic 16) MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:313 — StdioBridgeHost.Start has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
D1 · Cyclomatic Complexity · ClipCreate.SetVectorCurve (cyclomatic 16) · ×1
  • ClipCreate.SetVectorCurve (cyclomatic 16) MCPForUnity/Editor/Tools/Animation/ClipCreate.cs:227 — ClipCreate.SetVectorCurve 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 · BlenderBridgeTool.SetupBloomAsync (cyclomatic 16) · ×1
  • BlenderBridgeTool.SetupBloomAsync (cyclomatic 16) MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:484 — BlenderBridgeTool.SetupBloomAsync has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CameraControl.ListCameras (cyclomatic 16) · ×1
  • CameraControl.ListCameras (cyclomatic 16) MCPForUnity/Editor/Tools/Cameras/CameraControl.cs:15 — CameraControl.ListCameras 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 · ManageAsset.ApplyPhysicsMaterialProperties (cyclomatic 16) · ×1
  • ManageAsset.ApplyPhysicsMaterialProperties (cyclomatic 16) MCPForUnity/Editor/Tools/ManageAsset.cs:882 — ManageAsset.ApplyPhysicsMaterialProperties has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: ManageAsset.HandleCommand (cyclomatic 18) 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 · ManagePackages.GetStatus (cyclomatic 16) · ×1
  • ManagePackages.GetStatus (cyclomatic 16) MCPForUnity/Editor/Tools/ManagePackages.cs:165 — ManagePackages.GetStatus 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 · ManageScript.TryComputeClassSpanBalanced (cyclomatic 16) · ×1
  • ManageScript.TryComputeClassSpanBalanced (cyclomatic 16) MCPForUnity/Editor/Tools/ManageScript.cs:1792 — ManageScript.TryComputeClassSpanBalanced 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 · ManageProBuilder.SetFaceUVs (cyclomatic 16) · ×1
  • ManageProBuilder.SetFaceUVs (cyclomatic 16) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:2201 — ManageProBuilder.SetFaceUVs 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. This is NOT this file's highest cyclomatic complexity: ManageProBuilder.HandleCommand (cyclomatic 40) 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 · McpConnectionSection.UpdateHttpServerCommandDisplay (cyclomatic 16) · ×1
  • McpConnectionSection.UpdateHttpServerCommandDisplay (cyclomatic 16) MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:492 — McpConnectionSection.UpdateHttpServerCommandDisplay 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 · McpConnectionSection.OnConnectionToggleClicked (cyclomatic 16) · ×1
  • McpConnectionSection.OnConnectionToggleClicked (cyclomatic 16) MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:837 — McpConnectionSection.OnConnectionToggleClicked 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 · CheckPathLengths.Run (cyclomatic 16) · ×1
  • CheckPathLengths.Run (cyclomatic 16) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckPathLengths.cs:23 — CheckPathLengths.Run 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 · texture._normalize_color (cyclomatic 16) · ×1
  • texture._normalize_color (cyclomatic 16) Server/src/cli/commands/texture.py:104 — texture._normalize_color 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 · custom_tool_service.resolve_project_id_for_unity_instance (cyclomatic 16) · ×1
  • custom_tool_service.resolve_project_id_for_unity_instance (cyclomatic 16) Server/src/services/custom_tool_service.py:497 — custom_tool_service.resolve_project_id_for_unity_instance 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 · find_in_file.find_in_file (cyclomatic 16) · ×1
  • find_in_file.find_in_file (cyclomatic 16) Server/src/services/tools/find_in_file.py:79 — find_in_file.find_in_file 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 · PluginHub.send_command_for_instance (cyclomatic 16) · ×1
  • PluginHub.send_command_for_instance (cyclomatic 16) Server/src/transport/plugin_hub.py:997 — PluginHub.send_command_for_instance 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.
D12 · Dependency Hygiene · UPM dependency `com.unity.ide.windsurf` is a git source with no revision · ×1
  • UPM dependency `com.unity.ide.windsurf` is a git source with no revision — `com.unity.ide.windsurf` is declared in `TestProjects/UnityMCPTests/Packages/manifest.json` as the git source `https://github.com/Asuta/com.unity.ide.windsurf.git`, which names no revision. UPM resolves such a dependency to whatever the default branch points at when the editor next restores packages, so two checkouts of this commit can resolve different code and the committed packages-lock.json does not bind it. Append an immutable revision — `#<tag>` or `#<commit-sha>` — to the URL.
D2 · Cognitive Complexity · script_apply_edits._iter_csharp_tokens (cognitive 396) · ×1
  • script_apply_edits._iter_csharp_tokens (cognitive 396) Server/src/services/tools/script_apply_edits.py:17 — script_apply_edits._iter_csharp_tokens has cognitive complexity 396 (threshold 15). Drivers by points: if/else 51 (221 pts), loops 29 (136 pts), boolean chains 34, ternaries 2 (5 pts) (nesting depth added 280). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · script_apply_edits.script_apply_edits (cognitive 264) · ×1
  • script_apply_edits.script_apply_edits (cognitive 264) Server/src/services/tools/script_apply_edits.py:727 — script_apply_edits.script_apply_edits has cognitive complexity 264 (threshold 15). Drivers by points: if/else 53 (125 pts), boolean chains 60, ternaries 15 (48 pts), error handling 9 (25 pts), loops 4 (6 pts) (nesting depth added 123). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ManageScript.EditScript (cognitive 221) · ×1
  • ManageScript.EditScript (cognitive 221) MCPForUnity/Editor/Tools/ManageScript.cs:1239 — ManageScript.EditScript has cognitive complexity 221 (threshold 15). Of this number, 219 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManageScript.TryComputeMethodSpan (cognitive 175) · ×1
  • ManageScript.TryComputeMethodSpan (cognitive 175) MCPForUnity/Editor/Tools/ManageScript.cs:1826 — ManageScript.TryComputeMethodSpan has cognitive complexity 175 (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 · ServerManagementService.StopLocalHttpServerInternal (cognitive 169) · ×1
  • ServerManagementService.StopLocalHttpServerInternal (cognitive 169) REDACTED:596 — ServerManagementService.StopLocalHttpServerInternal has cognitive complexity 169 (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 · ScriptParser.RemoveStringsAndComments (cognitive 167) · ×1
  • ScriptParser.RemoveStringsAndComments (cognitive 167) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:285 — ScriptParser.RemoveStringsAndComments has cognitive complexity 167 (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 · manage_script.apply_text_edits (cognitive 163) · ×1
  • manage_script.apply_text_edits (cognitive 163) Server/src/services/tools/manage_script.py:92 — manage_script.apply_text_edits has cognitive complexity 163 (threshold 15). Drivers by points: if/else 28 (84 pts), error handling 10 (37 pts), loops 8 (25 pts), boolean chains 14, ternaries 1 (3 pts) (nesting depth added 102). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · stress_mcp.reload_churn_task (cognitive 140) · ×1
  • stress_mcp.reload_churn_task (cognitive 140) tools/stress_mcp.py:138 — stress_mcp.reload_churn_task has cognitive complexity 140 (threshold 15). Drivers by points: if/else 15 (57 pts), error handling 8 (40 pts), ternaries 5 (19 pts), loops 5 (16 pts), boolean chains 8 (nesting depth added 99). To reduce it, split the body into named stages: move each independent 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 · ManageProBuilder.CreateShapeViaGenerator (cognitive 131) · ×1
  • ManageProBuilder.CreateShapeViaGenerator (cognitive 131) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:606 — ManageProBuilder.CreateShapeViaGenerator has cognitive complexity 131 (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 · GameObjectSerializer.GetComponentData (cognitive 111) · ×1
  • GameObjectSerializer.GetComponentData (cognitive 111) MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:232 — GameObjectSerializer.GetComponentData has cognitive complexity 111 (threshold 15). To reduce it, split the body into named stages: move each independent 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 · FalModelSchema.Parse (cognitive 111) · ×1
  • FalModelSchema.Parse (cognitive 111) MCPForUnity/Editor/Services/AssetGen/FalModelSchema.cs:55 — FalModelSchema.Parse has cognitive complexity 111 (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 · CSharpLexer.SkipInterpolatedRawStringBody (cognitive 111) · ×1
  • CSharpLexer.SkipInterpolatedRawStringBody (cognitive 111) MCPForUnity/Editor/Tools/ManageScript.cs:1082 — CSharpLexer.SkipInterpolatedRawStringBody has cognitive complexity 111 (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 · ManagePrefabs.ApplyModificationsToPrefabObject (cognitive 109) · ×1
  • ManagePrefabs.ApplyModificationsToPrefabObject (cognitive 109) MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:744 — ManagePrefabs.ApplyModificationsToPrefabObject has cognitive complexity 109 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · manage_texture._normalize_import_settings (cognitive 109) · ×1
  • manage_texture._normalize_import_settings (cognitive 109) Server/src/services/tools/manage_texture.py:218 — manage_texture._normalize_import_settings has cognitive complexity 109 (threshold 15). Drivers by points: if/else 48 (85 pts), ternaries 9 (19 pts), error handling 1 (2 pts), loops 2, boolean chains 1 (nesting depth added 48). To reduce it, split the body into named stages: move each independent 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 · GameObjectCreate.Handle (cognitive 108) · ×1
  • GameObjectCreate.Handle (cognitive 108) MCPForUnity/Editor/Tools/GameObjects/GameObjectCreate.cs:15 — GameObjectCreate.Handle has cognitive complexity 108 (threshold 15). Of this number, 107 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 · CSharpLexer.SkipInterpolatedStringBody (cognitive 107) · ×1
  • CSharpLexer.SkipInterpolatedStringBody (cognitive 107) MCPForUnity/Editor/Tools/ManageScript.cs:1018 — CSharpLexer.SkipInterpolatedStringBody has cognitive complexity 107 (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 · TOMLParser.Parse (cognitive 103) · ×1
  • TOMLParser.Parse (cognitive 103) MCPForUnity/Editor/External/Tommy.cs:648 — TOMLParser.Parse has cognitive complexity 103 (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 · ManageUI.RenderUI (cognitive 101) · ×1
  • ManageUI.RenderUI (cognitive 101) MCPForUnity/Editor/Tools/ManageUI.cs:820 — ManageUI.RenderUI has cognitive complexity 101 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ComponentOps.SetObjectReference (cognitive 97) · ×1
  • ComponentOps.SetObjectReference (cognitive 97) MCPForUnity/Editor/Helpers/ComponentOps.cs:594 — ComponentOps.SetObjectReference has cognitive complexity 97 (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 · utils.normalize_color (cognitive 93) · ×1
  • utils.normalize_color (cognitive 93) Server/src/services/tools/utils.py:269 — utils.normalize_color has cognitive complexity 93 (threshold 15). Drivers by points: if/else 24 (51 pts), ternaries 4 (19 pts), error handling 5 (15 pts), boolean chains 8 (nesting depth added 52). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GameObjectModify.Handle (cognitive 90) · ×1
  • GameObjectModify.Handle (cognitive 90) MCPForUnity/Editor/Tools/GameObjects/GameObjectModify.cs:15 — GameObjectModify.Handle has cognitive complexity 90 (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 · CSharpLexer.Advance (cognitive 88) · ×1
  • CSharpLexer.Advance (cognitive 88) MCPForUnity/Editor/Tools/ManageScript.cs:893 — CSharpLexer.Advance has cognitive complexity 88 (threshold 15). To reduce it, split the body into named stages: move each independent 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 · UnityConnection.send_command (cognitive 88) · ×1
  • UnityConnection.send_command (cognitive 88) Server/src/transport/legacy/unity_connection.py:276 — UnityConnection.send_command has cognitive complexity 88 (threshold 15). Drivers by points: if/else 28 (59 pts), boolean chains 12, error handling 4 (11 pts), ternaries 3 (5 pts), loops 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManageScript.ApplyTextEdits (cognitive 86) · ×1
  • ManageScript.ApplyTextEdits (cognitive 86) MCPForUnity/Editor/Tools/ManageScript.cs:517 — ManageScript.ApplyTextEdits has cognitive complexity 86 (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 · JointOps.ConfigureJoint (cognitive 81) · ×1
  • JointOps.ConfigureJoint (cognitive 81) MCPForUnity/Editor/Tools/Physics/JointOps.cs:150 — JointOps.ConfigureJoint has cognitive complexity 81 (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 · PhysicsValidationOps.ValidateGameObject (cognitive 74) · ×1
  • PhysicsValidationOps.ValidateGameObject (cognitive 74) MCPForUnity/Editor/Tools/Physics/PhysicsValidationOps.cs:102 — PhysicsValidationOps.ValidateGameObject has cognitive complexity 74 (threshold 15). To reduce it, split the body into named stages: move each independent 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 · local_harness.main (cognitive 72) · ×1
  • local_harness.main (cognitive 72) tools/local_harness.py:1436 — local_harness.main has cognitive complexity 72 (threshold 15). Drivers by points: if/else 29 (45 pts), ternaries 5 (11 pts), boolean chains 7, error handling 3 (5 pts), loops 2 (4 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManageScriptableObject.TrySetValueRecursive (cognitive 69) · ×1
  • ManageScriptableObject.TrySetValueRecursive (cognitive 69) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:788 — ManageScriptableObject.TrySetValueRecursive has cognitive complexity 69 (threshold 15). To reduce it, split the body into named stages: move each independent 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 · MaterialOps.TrySetShaderProperty (cognitive 68) · ×1
  • MaterialOps.TrySetShaderProperty (cognitive 68) MCPForUnity/Editor/Helpers/MaterialOps.cs:207 — MaterialOps.TrySetShaderProperty has cognitive complexity 68 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManageGameObjectCommon.FindObjectsInternal (cognitive 68) · ×1
  • ManageGameObjectCommon.FindObjectsInternal (cognitive 68) MCPForUnity/Editor/Tools/GameObjects/ManageGameObjectCommon.cs:33 — ManageGameObjectCommon.FindObjectsInternal has cognitive complexity 68 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VolumeOps.CreateVolume (cognitive 68) · ×1
  • VolumeOps.CreateVolume (cognitive 68) MCPForUnity/Editor/Tools/Graphics/VolumeOps.cs:19 — VolumeOps.CreateVolume has cognitive complexity 68 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ManageScript.CheckDuplicateMethodSignatures (cognitive 68) · ×1
  • ManageScript.CheckDuplicateMethodSignatures (cognitive 68) MCPForUnity/Editor/Tools/ManageScript.cs:2645 — ManageScript.CheckDuplicateMethodSignatures has cognitive complexity 68 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManageProBuilder.SelectFaces (cognitive 66) · ×1
  • ManageProBuilder.SelectFaces (cognitive 66) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1934 — ManageProBuilder.SelectFaces has cognitive complexity 66 (threshold 15). Of this number, 63 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · GameObjectComponentHelpers.SetNestedProperty (cognitive 64) · ×1
  • GameObjectComponentHelpers.SetNestedProperty (cognitive 64) MCPForUnity/Editor/Tools/GameObjects/GameObjectComponentHelpers.cs:293 — GameObjectComponentHelpers.SetNestedProperty has cognitive complexity 64 (threshold 15). To reduce it, split the body into named stages: move each independent 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 · ManageScene.CaptureScreenshot (cognitive 63) · ×1
  • ManageScene.CaptureScreenshot (cognitive 63) MCPForUnity/Editor/Tools/ManageScene.cs:516 — ManageScene.CaptureScreenshot 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 · ClaudeCliMcpConfigurator.CheckStatusWithProjectDir (cognitive 61) · ×1
  • ClaudeCliMcpConfigurator.CheckStatusWithProjectDir (cognitive 61) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:683 — ClaudeCliMcpConfigurator.CheckStatusWithProjectDir has cognitive complexity 61 (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 · SpriteControllerBuilder.BuildController (cognitive 58) · ×1
  • SpriteControllerBuilder.BuildController (cognitive 58) MCPForUnity/Editor/Tools/Sprite2D/SpriteControllerBuilder.cs:64 — SpriteControllerBuilder.BuildController has cognitive complexity 58 (threshold 15). Of this number, 55 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 · MaterialOps.ApplyProperties (cognitive 57) · ×1
  • MaterialOps.ApplyProperties (cognitive 57) MCPForUnity/Editor/Helpers/MaterialOps.cs:17 — MaterialOps.ApplyProperties has cognitive complexity 57 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ManageScriptableObject.ValidatePatches (cognitive 56) · ×1
  • ManageScriptableObject.ValidatePatches (cognitive 56) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:270 — ManageScriptableObject.ValidatePatches has cognitive complexity 56 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · manage_ui.manage_ui (cognitive 56) · ×1
  • manage_ui.manage_ui (cognitive 56) Server/src/services/tools/manage_ui.py:54 — manage_ui.manage_ui has cognitive complexity 56 (threshold 15). Drivers by points: if/else 38 (44 pts), boolean chains 8, error handling 1 (4 pts) (nesting depth added 9). 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 · local_harness._outcome_from_terminal (cognitive 55) · ×1
  • local_harness._outcome_from_terminal (cognitive 55) tools/local_harness.py:1248 — local_harness._outcome_from_terminal has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 20, loops 2 (4 pts), ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonFileMcpConfigurator.CheckStatus (cognitive 54) · ×1
  • JsonFileMcpConfigurator.CheckStatus (cognitive 54) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:160 — JsonFileMcpConfigurator.CheckStatus 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 · manage_prefabs.manage_prefabs (cognitive 54) · ×1
  • manage_prefabs.manage_prefabs (cognitive 54) Server/src/services/tools/manage_prefabs.py:48 — manage_prefabs.manage_prefabs has cognitive complexity 54 (threshold 15). Drivers by points: if/else 31 (42 pts), loops 2 (4 pts), boolean chains 3, error handling 3, ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StdioBridgeHost.HandleClientAsync (cognitive 53) · ×1
  • StdioBridgeHost.HandleClientAsync (cognitive 53) MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:563 — StdioBridgeHost.HandleClientAsync has cognitive complexity 53 (threshold 15). To reduce it, split the body into named stages: move each independent 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 · PhysicsForceOps.ApplyNormalForce (cognitive 53) · ×1
  • PhysicsForceOps.ApplyNormalForce (cognitive 53) MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:69 — PhysicsForceOps.ApplyNormalForce has cognitive complexity 53 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · CheckFileMenuNames.Run (cognitive 53) · ×1
  • CheckFileMenuNames.Run (cognitive 53) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckFileMenuNames.cs:25 — CheckFileMenuNames.Run has cognitive complexity 53 (threshold 15). To reduce it, split the body into named stages: move each independent 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 · CodexMcpConfigurator.CheckStatus (cognitive 52) · ×1
  • CodexMcpConfigurator.CheckStatus (cognitive 52) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:443 — CodexMcpConfigurator.CheckStatus has cognitive complexity 52 (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 · AssetGenToolHelpers.ListModels (cognitive 52) · ×1
  • AssetGenToolHelpers.ListModels (cognitive 52) MCPForUnity/Editor/Tools/AssetGen/AssetGenToolHelpers.cs:68 — AssetGenToolHelpers.ListModels has cognitive complexity 52 (threshold 15). Of this number, 48 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TOMLParser.ReadQuotedValueMultiLine (cognitive 51) · ×1
  • TOMLParser.ReadQuotedValueMultiLine (cognitive 51) MCPForUnity/Editor/External/Tommy.cs:1520 — TOMLParser.ReadQuotedValueMultiLine has cognitive complexity 51 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManageScene.HandleCommand (cognitive 51) · ×1
  • ManageScene.HandleCommand (cognitive 51) MCPForUnity/Editor/Tools/ManageScene.cs:165 — ManageScene.HandleCommand has cognitive complexity 51 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConfigJsonBuilder.PopulateUnityNode (cognitive 50) · ×1
  • ConfigJsonBuilder.PopulateUnityNode (cognitive 50) MCPForUnity/Editor/Helpers/ConfigJsonBuilder.cs:51 — ConfigJsonBuilder.PopulateUnityNode has cognitive complexity 50 (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 · output.format_as_text (cognitive 50) · ×1
  • output.format_as_text (cognitive 50) Server/src/cli/utils/output.py:35 — output.format_as_text has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 5 (19 pts), boolean chains 5 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · manage_texture.manage_texture (cognitive 50) · ×1
  • manage_texture.manage_texture (cognitive 50) Server/src/services/tools/manage_texture.py:389 — manage_texture.manage_texture has cognitive complexity 50 (threshold 15). Drivers by points: if/else 27 (44 pts), boolean chains 5, ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManageTexture.ConfigureTextureImporter (cognitive 49) · ×1
  • ManageTexture.ConfigureTextureImporter (cognitive 49) MCPForUnity/Editor/Tools/ManageTexture.cs:844 — ManageTexture.ConfigureTextureImporter has cognitive complexity 49 (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 · utils.build_screenshot_params (cognitive 48) · ×1
  • utils.build_screenshot_params (cognitive 48) Server/src/services/tools/utils.py:459 — utils.build_screenshot_params has cognitive complexity 48 (threshold 15). Drivers by points: if/else 29 (40 pts), boolean chains 5, error handling 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · set_active_instance.set_active_instance (cognitive 46) · ×1
  • set_active_instance.set_active_instance (cognitive 46) Server/src/services/tools/set_active_instance.py:27 — set_active_instance.set_active_instance has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 7, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AssetGenJobManager.Advance (cognitive 45) · ×1
  • AssetGenJobManager.Advance (cognitive 45) MCPForUnity/Editor/Services/AssetGen/AssetGenJobManager.cs:349 — AssetGenJobManager.Advance has cognitive complexity 45 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.normalize_vector3 (cognitive 45) · ×1
  • utils.normalize_vector3 (cognitive 45) Server/src/services/tools/utils.py:135 — utils.normalize_vector3 has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (27 pts), error handling 4 (11 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComponentOps.AssignObjectReference (cognitive 44) · ×1
  • ComponentOps.AssignObjectReference (cognitive 44) MCPForUnity/Editor/Helpers/ComponentOps.cs:776 — ComponentOps.AssignObjectReference 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 · ManagePrefabs.CreateSingleChildInPrefab (cognitive 44) · ×1
  • ManagePrefabs.CreateSingleChildInPrefab (cognitive 44) MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:991 — ManagePrefabs.CreateSingleChildInPrefab 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 · preflight.preflight (cognitive 44) · ×1
  • preflight.preflight (cognitive 44) Server/src/services/tools/preflight.py:27 — preflight.preflight has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 4 (10 pts), error handling 3 (7 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TOMLParser.CreateTable (cognitive 43) · ×1
  • TOMLParser.CreateTable (cognitive 43) MCPForUnity/Editor/External/Tommy.cs:1668 — TOMLParser.CreateTable 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 · TextureOps.ApplyPixelDataToRegion (cognitive 43) · ×1
  • TextureOps.ApplyPixelDataToRegion (cognitive 43) MCPForUnity/Editor/Helpers/TextureOps.cs:83 — TextureOps.ApplyPixelDataToRegion 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 · ManageScene.CaptureOrbitBatch (cognitive 43) · ×1
  • ManageScene.CaptureOrbitBatch (cognitive 43) MCPForUnity/Editor/Tools/ManageScene.cs:1026 — ManageScene.CaptureOrbitBatch 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 · VectorParsing.ValidateQuaternionFormat (cognitive 42) · ×1
  • VectorParsing.ValidateQuaternionFormat (cognitive 42) MCPForUnity/Editor/Helpers/VectorParsing.cs:571 — VectorParsing.ValidateQuaternionFormat 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 · McpConnectionSection.UpdateConnectionStatus (cognitive 42) · ×1
  • McpConnectionSection.UpdateConnectionStatus (cognitive 42) MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:356 — McpConnectionSection.UpdateConnectionStatus 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 · FalModelCatalog.Details (cognitive 40) · ×1
  • FalModelCatalog.Details (cognitive 40) MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs:207 — FalModelCatalog.Details 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 · GraphicsHelpers.SetSerializedValue (cognitive 40) · ×1
  • GraphicsHelpers.SetSerializedValue (cognitive 40) MCPForUnity/Editor/Tools/Graphics/GraphicsHelpers.cs:167 — GraphicsHelpers.SetSerializedValue 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 · ManageAsset.ModifyAsset (cognitive 40) · ×1
  • ManageAsset.ModifyAsset (cognitive 40) MCPForUnity/Editor/Tools/ManageAsset.cs:335 — ManageAsset.ModifyAsset 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 · ManageUI.ApplyPanelSettingsProperties (cognitive 40) · ×1
  • ManageUI.ApplyPanelSettingsProperties (cognitive 40) MCPForUnity/Editor/Tools/ManageUI.cs:522 — ManageUI.ApplyPanelSettingsProperties 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 · ReadConsole.GetConsoleEntries (cognitive 40) · ×1
  • ReadConsole.GetConsoleEntries (cognitive 40) MCPForUnity/Editor/Tools/ReadConsole.cs:345 — ReadConsole.GetConsoleEntries 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 · read_console.read_console (cognitive 40) · ×1
  • read_console.read_console (cognitive 40) Server/src/services/tools/read_console.py:35 — read_console.read_console has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 6, loops 2 (5 pts), ternaries 4, error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManageScript.HandleCommand (cognitive 39) · ×1
  • ManageScript.HandleCommand (cognitive 39) MCPForUnity/Editor/Tools/ManageScript.cs:123 — ManageScript.HandleCommand has cognitive complexity 39 (threshold 15). Of this number, 32 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _UnityDocParser.handle_endtag (cognitive 39) · ×1
  • _UnityDocParser.handle_endtag (cognitive 39) Server/src/services/tools/unity_docs.py:184 — _UnityDocParser.handle_endtag has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 13 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnityConnection.receive_full_response (cognitive 39) · ×1
  • UnityConnection.receive_full_response (cognitive 39) Server/src/transport/legacy/unity_connection.py:173 — UnityConnection.receive_full_response has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (23 pts), error handling 7 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnityInstanceMiddleware._maybe_autoselect_instance (cognitive 39) · ×1
  • UnityInstanceMiddleware._maybe_autoselect_instance (cognitive 39) Server/src/transport/unity_instance_middleware.py:215 — UnityInstanceMiddleware._maybe_autoselect_instance has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (24 pts), error handling 5 (9 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManageEditor.HandleCommand (cognitive 38) · ×1
  • ManageEditor.HandleCommand (cognitive 38) MCPForUnity/Editor/Tools/ManageEditor.cs:27 — ManageEditor.HandleCommand has cognitive complexity 38 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManageTexture.CreateTexture (cognitive 38) · ×1
  • ManageTexture.CreateTexture (cognitive 38) MCPForUnity/Editor/Tools/ManageTexture.cs:97 — ManageTexture.CreateTexture has cognitive complexity 38 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SpriteClipBuilder.CreateClips (cognitive 38) · ×1
  • SpriteClipBuilder.CreateClips (cognitive 38) MCPForUnity/Editor/Tools/Sprite2D/SpriteClipBuilder.cs:57 — SpriteClipBuilder.CreateClips has cognitive complexity 38 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SpriteImportSetup.GetInfo (cognitive 38) · ×1
  • SpriteImportSetup.GetInfo (cognitive 38) MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs:18 — SpriteImportSetup.GetInfo has cognitive complexity 38 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · script_apply_edits._apply_edits_locally (cognitive 38) · ×1
  • script_apply_edits._apply_edits_locally (cognitive 38) Server/src/services/tools/script_apply_edits.py:378 — script_apply_edits._apply_edits_locally has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (24 pts), ternaries 3 (9 pts), boolean chains 4, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProcessDetector.GetListeningProcessIdsForPort (cognitive 37) · ×1
  • ProcessDetector.GetListeningProcessIdsForPort (cognitive 37) REDACTED:103 — ProcessDetector.GetListeningProcessIdsForPort has cognitive complexity 37 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · BlenderBridgeTool.CheckUpdatesBlocking (cognitive 37) · ×1
  • BlenderBridgeTool.CheckUpdatesBlocking (cognitive 37) MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:689 — BlenderBridgeTool.CheckUpdatesBlocking has cognitive complexity 37 (threshold 15). Of this number, 32 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 · VolumeOps.ConvertToParameterType (cognitive 37) · ×1
  • VolumeOps.ConvertToParameterType (cognitive 37) MCPForUnity/Editor/Tools/Graphics/VolumeOps.cs:583 — VolumeOps.ConvertToParameterType 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 · ManageMaterial.SetRendererColor (cognitive 37) · ×1
  • ManageMaterial.SetRendererColor (cognitive 37) MCPForUnity/Editor/Tools/ManageMaterial.cs:246 — ManageMaterial.SetRendererColor 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 · main.main (cognitive 37) · ×1
  • main.main (cognitive 37) Server/src/main.py:656 — main.main has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 12, error handling 4 (6 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ExternalChangesScanner._scan_paths_max_mtime_ns (cognitive 37) · ×1
  • ExternalChangesScanner._scan_paths_max_mtime_ns (cognitive 37) Server/src/services/state/external_changes_scanner.py:64 — ExternalChangesScanner._scan_paths_max_mtime_ns has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 3 (6 pts), error handling 1 (4 pts), ternaries 1 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tools.sync_tool_visibility_from_unity (cognitive 37) · ×1
  • tools.sync_tool_visibility_from_unity (cognitive 37) Server/src/services/tools/__init__.py:97 — tools.sync_tool_visibility_from_unity has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (21 pts), error handling 3 (7 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComponentOps.SetSerializedPropertyRecursive (cognitive 36) · ×1
  • ComponentOps.SetSerializedPropertyRecursive (cognitive 36) MCPForUnity/Editor/Helpers/ComponentOps.cs:490 — ComponentOps.SetSerializedPropertyRecursive 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 · RenderPipelineUtility.GetOrCreateDefaultVFXMaterial (cognitive 36) · ×1
  • RenderPipelineUtility.GetOrCreateDefaultVFXMaterial (cognitive 36) MCPForUnity/Editor/Helpers/RenderPipelineUtility.cs:284 — RenderPipelineUtility.GetOrCreateDefaultVFXMaterial 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 · OpenRouterAdapter.SubmitAsync (cognitive 36) · ×1
  • OpenRouterAdapter.SubmitAsync (cognitive 36) MCPForUnity/Editor/Services/AssetGen/Providers/OpenRouterAdapter.cs:32 — OpenRouterAdapter.SubmitAsync 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 · JointOps.AddJoint (cognitive 36) · ×1
  • JointOps.AddJoint (cognitive 36) MCPForUnity/Editor/Tools/Physics/JointOps.cs:36 — JointOps.AddJoint 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 · McpAdvancedSection.InitializeUI (cognitive 36) · ×1
  • McpAdvancedSection.InitializeUI (cognitive 36) MCPForUnity/Editor/Windows/Components/Advanced/McpAdvancedSection.cs:95 — McpAdvancedSection.InitializeUI has cognitive complexity 36 (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 · CameraControl.ListCameras (cognitive 35) · ×1
  • CameraControl.ListCameras (cognitive 35) MCPForUnity/Editor/Tools/Cameras/CameraControl.cs:15 — CameraControl.ListCameras has cognitive complexity 35 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ManageScript.FindBestAnchorMatch (cognitive 35) · ×1
  • ManageScript.FindBestAnchorMatch (cognitive 35) MCPForUnity/Editor/Tools/ManageScript.cs:2076 — ManageScript.FindBestAnchorMatch 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 · ManageUI.ModifyVisualElement (cognitive 35) · ×1
  • ManageUI.ModifyVisualElement (cognitive 35) MCPForUnity/Editor/Tools/ManageUI.cs:1436 — ManageUI.ModifyVisualElement has cognitive complexity 35 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · texture._normalize_color (cognitive 35) · ×1
  • texture._normalize_color (cognitive 35) Server/src/cli/commands/texture.py:104 — texture._normalize_color has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 2 (7 pts), error handling 2 (6 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PluginHub.send_command_for_instance (cognitive 35) · ×1
  • PluginHub.send_command_for_instance (cognitive 35) Server/src/transport/plugin_hub.py:997 — PluginHub.send_command_for_instance has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (17 pts), error handling 3 (7 pts), ternaries 1 (5 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BatchExecute.HandleCommand (cognitive 34) · ×1
  • BatchExecute.HandleCommand (cognitive 34) MCPForUnity/Editor/Tools/BatchExecute.cs:34 — BatchExecute.HandleCommand 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 · ManageScene.ResolveGameObject (cognitive 34) · ×1
  • ManageScene.ResolveGameObject (cognitive 34) MCPForUnity/Editor/Tools/ManageScene.cs:2080 — ManageScene.ResolveGameObject 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 · ManagePrefabs.PersistRuntimeMaterials (cognitive 34) · ×1
  • ManagePrefabs.PersistRuntimeMaterials (cognitive 34) MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:292 — ManagePrefabs.PersistRuntimeMaterials 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 · FrameDebuggerOps.GetEvents (cognitive 34) · ×1
  • FrameDebuggerOps.GetEvents (cognitive 34) MCPForUnity/Editor/Tools/Profiler/Operations/FrameDebuggerOps.cs:112 — FrameDebuggerOps.GetEvents 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 · UnityReflect.FindExtensionMethodInfos (cognitive 34) · ×1
  • UnityReflect.FindExtensionMethodInfos (cognitive 34) MCPForUnity/Editor/Tools/UnityReflect.cs:735 — UnityReflect.FindExtensionMethodInfos 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 · ToolParams.CoerceStringArray (cognitive 33) · ×1
  • ToolParams.CoerceStringArray (cognitive 33) MCPForUnity/Editor/Helpers/ToolParams.cs:114 — ToolParams.CoerceStringArray 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 · ServerManagementService.StartLocalHttpServer (cognitive 33) · ×1
  • ServerManagementService.StartLocalHttpServer (cognitive 33) REDACTED:239 — ServerManagementService.StartLocalHttpServer 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 · VolumeOps.BuildVolumeInfo (cognitive 33) · ×1
  • VolumeOps.BuildVolumeInfo (cognitive 33) MCPForUnity/Editor/Tools/Graphics/VolumeOps.cs:475 — VolumeOps.BuildVolumeInfo 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 · ManageTexture.ModifyTexture (cognitive 33) · ×1
  • ManageTexture.ModifyTexture (cognitive 33) MCPForUnity/Editor/Tools/ManageTexture.cs:248 — ManageTexture.ModifyTexture 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 · PhysicsMaterialOps.Assign (cognitive 33) · ×1
  • PhysicsMaterialOps.Assign (cognitive 33) MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:64 — PhysicsMaterialOps.Assign 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 · ScriptParser.ScanForTypes (cognitive 33) · ×1
  • ScriptParser.ScanForTypes (cognitive 33) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:477 — ScriptParser.ScanForTypes 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 · mark_skipped.main (cognitive 33) · ×1
  • mark_skipped.main (cognitive 33) .github/scripts/mark_skipped.py:59 — mark_skipped.main has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (10 pts), boolean chains 5, error handling 1, ternaries 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProcessDetector.LooksLikeMcpServerProcess (cognitive 32) · ×1
  • ProcessDetector.LooksLikeMcpServerProcess (cognitive 32) REDACTED:174 — ProcessDetector.LooksLikeMcpServerProcess 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 · ManageMaterial.CreateMaterial (cognitive 32) · ×1
  • ManageMaterial.CreateMaterial (cognitive 32) MCPForUnity/Editor/Tools/ManageMaterial.cs:586 — ManageMaterial.CreateMaterial has cognitive complexity 32 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ManageScene.GetSceneHierarchyPaged (cognitive 32) · ×1
  • ManageScene.GetSceneHierarchyPaged (cognitive 32) MCPForUnity/Editor/Tools/ManageScene.cs:1978 — ManageScene.GetSceneHierarchyPaged 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 · UnityReflect.FindExtensionMethods (cognitive 32) · ×1
  • UnityReflect.FindExtensionMethods (cognitive 32) MCPForUnity/Editor/Tools/UnityReflect.cs:689 — UnityReflect.FindExtensionMethods 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 · MCPForUnityEditorWindow.CreateGUI (cognitive 32) · ×1
  • MCPForUnityEditorWindow.CreateGUI (cognitive 32) MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs:147 — MCPForUnityEditorWindow.CreateGUI has cognitive complexity 32 (threshold 15). Of this number, 30 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, 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 · unity_connection.send_command_with_retry (cognitive 32) · ×1
  • unity_connection.send_command_with_retry (cognitive 32) Server/src/transport/legacy/unity_connection.py:814 — unity_connection.send_command_with_retry has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 9, ternaries 2, error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnityInstanceMiddleware._resolve_enabled_tool_names_for_context (cognitive 32) · ×1
  • UnityInstanceMiddleware._resolve_enabled_tool_names_for_context (cognitive 32) Server/src/transport/unity_instance_middleware.py:458 — UnityInstanceMiddleware._resolve_enabled_tool_names_for_context has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (23 pts), error handling 2 (3 pts), loops 2 (3 pts), ternaries 2, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransportCommandDispatcher.ProcessCommand (cognitive 31) · ×1
  • TransportCommandDispatcher.ProcessCommand (cognitive 31) MCPForUnity/Editor/Services/Transport/TransportCommandDispatcher.cs:271 — TransportCommandDispatcher.ProcessCommand 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: 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 · ControllerCreate.AddTransition (cognitive 31) · ×1
  • ControllerCreate.AddTransition (cognitive 31) MCPForUnity/Editor/Tools/Animation/ControllerCreate.cs:116 — ControllerCreate.AddTransition 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 · ManageScene.CaptureSurroundBatch (cognitive 31) · ×1
  • ManageScene.CaptureSurroundBatch (cognitive 31) MCPForUnity/Editor/Tools/ManageScene.cs:887 — ManageScene.CaptureSurroundBatch 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 · main.server_lifespan (cognitive 31) · ×1
  • main.server_lifespan (cognitive 31) Server/src/main.py:150 — main.server_lifespan has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 4 (9 pts), ternaries 1 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComponentOps.TrySetViaReflection (cognitive 30) · ×1
  • ComponentOps.TrySetViaReflection (cognitive 30) MCPForUnity/Editor/Helpers/ComponentOps.cs:197 — ComponentOps.TrySetViaReflection 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 · ManageProBuilder.GetMeshInfo (cognitive 30) · ×1
  • ManageProBuilder.GetMeshInfo (cognitive 30) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:2276 — ManageProBuilder.GetMeshInfo 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 · SpriteFullSetup.Run (cognitive 30) · ×1
  • SpriteFullSetup.Run (cognitive 30) MCPForUnity/Editor/Tools/Sprite2D/SpriteFullSetup.cs:26 — SpriteFullSetup.Run has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · McpConnectionSection.OnConnectionToggleClicked (cognitive 30) · ×1
  • McpConnectionSection.OnConnectionToggleClicked (cognitive 30) MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:837 — McpConnectionSection.OnConnectionToggleClicked 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 · ScreenshotUtility.DrawText (cognitive 30) · ×1
  • ScreenshotUtility.DrawText (cognitive 30) MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:540 — ScreenshotUtility.DrawText has cognitive complexity 30 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · CheckNormalMapTextures.Run (cognitive 30) · ×1
  • CheckNormalMapTextures.Run (cognitive 30) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckNormalMapTextures.cs:23 — CheckNormalMapTextures.Run 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 · editor_state.get_editor_state (cognitive 30) · ×1
  • editor_state.get_editor_state (cognitive 30) Server/src/services/resources/editor_state.py:224 — editor_state.get_editor_state has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 5 (8 pts), boolean chains 4, error handling 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generate_docs_reference._render_type (cognitive 30) · ×1
  • generate_docs_reference._render_type (cognitive 30) tools/generate_docs_reference.py:120 — generate_docs_reference._render_type has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 5 (10 pts), boolean chains 7 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CameraCreate.EnsureBrain (cognitive 29) · ×1
  • CameraCreate.EnsureBrain (cognitive 29) MCPForUnity/Editor/Tools/Cameras/CameraCreate.cs:163 — CameraCreate.EnsureBrain has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ManageScript.ExtractParamTypes (cognitive 29) · ×1
  • ManageScript.ExtractParamTypes (cognitive 29) MCPForUnity/Editor/Tools/ManageScript.cs:2540 — ManageScript.ExtractParamTypes 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 · PortDiscovery.discover_all_unity_instances (cognitive 29) · ×1
  • PortDiscovery.discover_all_unity_instances (cognitive 29) Server/src/transport/legacy/port_discovery.py:226 — PortDiscovery.discover_all_unity_instances has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 2 (5 pts), ternaries 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginHub._resolve_session_id (cognitive 29) · ×1
  • PluginHub._resolve_session_id (cognitive 29) Server/src/transport/plugin_hub.py:857 — PluginHub._resolve_session_id has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 11, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · focus_nudge._find_unity_pid_by_project_path_windows (cognitive 29) · ×1
  • focus_nudge._find_unity_pid_by_project_path_windows (cognitive 29) Server/src/utils/focus_nudge.py:411 — focus_nudge._find_unity_pid_by_project_path_windows has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, ternaries 2 (5 pts), loops 2 (3 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FalModelCatalog.ListMetadata (cognitive 28) · ×1
  • FalModelCatalog.ListMetadata (cognitive 28) MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs:178 — FalModelCatalog.ListMetadata 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 · McpConnectionSection.RegisterCallbacks (cognitive 28) · ×1
  • McpConnectionSection.RegisterCallbacks (cognitive 28) MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:184 — McpConnectionSection.RegisterCallbacks has cognitive complexity 28 (threshold 15). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 186, 223, 246, …). 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 · texture._normalize_import_settings (cognitive 28) · ×1
  • texture._normalize_import_settings (cognitive 28) Server/src/cli/commands/texture.py:245 — texture._normalize_import_settings has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21 (25 pts), loops 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · UnityInstanceMiddleware._inject_unity_instance (cognitive 28) · ×1
  • UnityInstanceMiddleware._inject_unity_instance (cognitive 28) Server/src/transport/unity_instance_middleware.py:324 — UnityInstanceMiddleware._inject_unity_instance has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), error handling 2 (6 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stress_editor_state.stress_loop (cognitive 28) · ×1
  • stress_editor_state.stress_loop (cognitive 28) tools/stress_editor_state.py:88 — stress_editor_state.stress_loop has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 5 (12 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TOMLParser.ReadKeyName (cognitive 27) · ×1
  • TOMLParser.ReadKeyName (cognitive 27) MCPForUnity/Editor/External/Tommy.cs:1018 — TOMLParser.ReadKeyName 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 · StdioBridgeHost.ProcessCommands (cognitive 27) · ×1
  • StdioBridgeHost.ProcessCommands (cognitive 27) MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:890 — StdioBridgeHost.ProcessCommands 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 · McpConnectionSection.UpdateStartHttpButtonState (cognitive 27) · ×1
  • McpConnectionSection.UpdateStartHttpButtonState (cognitive 27) MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:611 — McpConnectionSection.UpdateStartHttpButtonState has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ApiKeyService.validate (cognitive 27) · ×1
  • ApiKeyService.validate (cognitive 27) REDACTED:85 — ApiKeyService.validate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · local_harness.discover_editor (cognitive 27) · ×1
  • local_harness.discover_editor (cognitive 27) tools/local_harness.py:357 — local_harness.discover_editor has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 7, loops 3 (4 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlenderDetection.CandidatePaths (cognitive 26) · ×1
  • BlenderDetection.CandidatePaths (cognitive 26) MCPForUnity/Editor/Helpers/BlenderDetection.cs:78 — BlenderDetection.CandidatePaths 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 · StdioBridgeReloadHandler.ResumeStdioWithRetriesAsync (cognitive 26) · ×1
  • StdioBridgeReloadHandler.ResumeStdioWithRetriesAsync (cognitive 26) MCPForUnity/Editor/Services/StdioBridgeReloadHandler.cs:133 — StdioBridgeReloadHandler.ResumeStdioWithRetriesAsync has cognitive complexity 26 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · AnimatorControl.SetParameter (cognitive 26) · ×1
  • AnimatorControl.SetParameter (cognitive 26) MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:57 — AnimatorControl.SetParameter 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 · BlenderBridgeTool.ImportModelAsync (cognitive 26) · ×1
  • BlenderBridgeTool.ImportModelAsync (cognitive 26) MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:188 — BlenderBridgeTool.ImportModelAsync has cognitive complexity 26 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · GameObjectComponentHelpers.ApplyComponentProperties (cognitive 26) · ×1
  • GameObjectComponentHelpers.ApplyComponentProperties (cognitive 26) MCPForUnity/Editor/Tools/GameObjects/GameObjectComponentHelpers.cs:154 — GameObjectComponentHelpers.ApplyComponentProperties 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 · ManageBuild.HandleBatch (cognitive 26) · ×1
  • ManageBuild.HandleBatch (cognitive 26) MCPForUnity/Editor/Tools/ManageBuild.cs:422 — ManageBuild.HandleBatch has cognitive complexity 26 (threshold 15). Of this number, 24 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 · ManageScene.ValidateScene (cognitive 26) · ×1
  • ManageScene.ValidateScene (cognitive 26) MCPForUnity/Editor/Tools/ManageScene.cs:1840 — ManageScene.ValidateScene 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 · ProBuilderMeshUtils.ValidateMesh (cognitive 26) · ×1
  • ProBuilderMeshUtils.ValidateMesh (cognitive 26) MCPForUnity/Editor/Tools/ProBuilder/ProBuilderMeshUtils.cs:98 — ProBuilderMeshUtils.ValidateMesh 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 · MemorySnapshotOps.TakeSnapshotAsync (cognitive 26) · ×1
  • MemorySnapshotOps.TakeSnapshotAsync (cognitive 26) MCPForUnity/Editor/Tools/Profiler/Operations/MemorySnapshotOps.cs:20 — MemorySnapshotOps.TakeSnapshotAsync has cognitive complexity 26 (threshold 15). Of this number, 20 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, 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 · editor.custom_tool (cognitive 26) · ×1
  • editor.custom_tool (cognitive 26) Server/src/cli/commands/editor.py:489 — editor.custom_tool has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (7 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PluginHub._handle_register (cognitive 26) · ×1
  • PluginHub._handle_register (cognitive 26) Server/src/transport/plugin_hub.py:435 — PluginHub._handle_register has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StdioBridgeHost.Start (cognitive 25) · ×1
  • StdioBridgeHost.Start (cognitive 25) MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:313 — StdioBridgeHost.Start 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 · ClipCreate.ParseKeyframes (cognitive 25) · ×1
  • ClipCreate.ParseKeyframes (cognitive 25) MCPForUnity/Editor/Tools/Animation/ClipCreate.cs:434 — ClipCreate.ParseKeyframes 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 · ManageComponents.SetProperty (cognitive 25) · ×1
  • ManageComponents.SetProperty (cognitive 25) MCPForUnity/Editor/Tools/ManageComponents.cs:190 — ManageComponents.SetProperty has cognitive complexity 25 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ManageScene.CapturePositionedScreenshot (cognitive 25) · ×1
  • ManageScene.CapturePositionedScreenshot (cognitive 25) MCPForUnity/Editor/Tools/ManageScene.cs:1176 — ManageScene.CapturePositionedScreenshot has cognitive complexity 25 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ManageScript.ValidateSemanticRules (cognitive 25) · ×1
  • ManageScript.ValidateSemanticRules (cognitive 25) MCPForUnity/Editor/Tools/ManageScript.cs:2790 — ManageScript.ValidateSemanticRules 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 · PhysicsRigidbodyOps.ConfigureRigidbody3D (cognitive 25) · ×1
  • PhysicsRigidbodyOps.ConfigureRigidbody3D (cognitive 25) MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:189 — PhysicsRigidbodyOps.ConfigureRigidbody3D 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 · PhysicsRigidbodyOps.ConfigureRigidbody2D (cognitive 25) · ×1
  • PhysicsRigidbodyOps.ConfigureRigidbody2D (cognitive 25) MCPForUnity/Editor/Tools/Physics/PhysicsRigidbodyOps.cs:313 — PhysicsRigidbodyOps.ConfigureRigidbody2D 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 · ParticleWrite.SetRenderer (cognitive 25) · ×1
  • ParticleWrite.SetRenderer (cognitive 25) MCPForUnity/Editor/Tools/Vfx/ParticleWrite.cs:212 — ParticleWrite.SetRenderer has cognitive complexity 25 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ExternalChangesScanner._resolve_manifest_extra_roots (cognitive 25) · ×1
  • ExternalChangesScanner._resolve_manifest_extra_roots (cognitive 25) Server/src/services/state/external_changes_scanner.py:106 — ExternalChangesScanner._resolve_manifest_extra_roots has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 3 (4 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnityConnectionPool._resolve_instance_id (cognitive 25) · ×1
  • UnityConnectionPool._resolve_instance_id (cognitive 25) Server/src/transport/legacy/unity_connection.py:559 — UnityConnectionPool._resolve_instance_id has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · focus_nudge._find_unity_pid_by_project_path (cognitive 25) · ×1
  • focus_nudge._find_unity_pid_by_project_path (cognitive 25) Server/src/utils/focus_nudge.py:187 — focus_nudge._find_unity_pid_by_project_path has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 3 (7 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TOMLParser.ReadArray (cognitive 24) · ×1
  • TOMLParser.ReadArray (cognitive 24) MCPForUnity/Editor/External/Tommy.cs:1215 — TOMLParser.ReadArray 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 · ExecPath.ResolveClaudeFromNvm (cognitive 24) · ×1
  • ExecPath.ResolveClaudeFromNvm (cognitive 24) REDACTED:101 — ExecPath.ResolveClaudeFromNvm has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · McpConfigurationHelper.WriteAtomicFile (cognitive 24) · ×1
  • McpConfigurationHelper.WriteAtomicFile (cognitive 24) MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs:234 — McpConfigurationHelper.WriteAtomicFile has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · StdIoVersionMigration.RunMigrationIfNeeded (cognitive 24) · ×1
  • StdIoVersionMigration.RunMigrationIfNeeded (cognitive 24) MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs:31 — StdIoVersionMigration.RunMigrationIfNeeded 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 · FalModelCatalog.RefreshCore (cognitive 24) · ×1
  • FalModelCatalog.RefreshCore (cognitive 24) MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs:107 — FalModelCatalog.RefreshCore has cognitive complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FalAdapter.SubmitAsync (cognitive 24) · ×1
  • FalAdapter.SubmitAsync (cognitive 24) MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:27 — FalAdapter.SubmitAsync has cognitive complexity 24 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GameObjectComponentHelpers.AddComponentInternal (cognitive 24) · ×1
  • GameObjectComponentHelpers.AddComponentInternal (cognitive 24) MCPForUnity/Editor/Tools/GameObjects/GameObjectComponentHelpers.cs:18 — GameObjectComponentHelpers.AddComponentInternal has cognitive complexity 24 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SkyboxOps.SetMaterialProperty (cognitive 24) · ×1
  • SkyboxOps.SetMaterialProperty (cognitive 24) MCPForUnity/Editor/Tools/Graphics/SkyboxOps.cs:433 — SkyboxOps.SetMaterialProperty 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 · ManageAsset.CreateAsset (cognitive 24) · ×1
  • ManageAsset.CreateAsset (cognitive 24) MCPForUnity/Editor/Tools/ManageAsset.cs:164 — ManageAsset.CreateAsset 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 · ManageScriptableObject.ApplySet (cognitive 24) · ×1
  • ManageScriptableObject.ApplySet (cognitive 24) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:697 — ManageScriptableObject.ApplySet has cognitive complexity 24 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · JointOps.RemoveJoint (cognitive 24) · ×1
  • JointOps.RemoveJoint (cognitive 24) MCPForUnity/Editor/Tools/Physics/JointOps.cs:321 — JointOps.RemoveJoint 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 · PhysicsSimulationOps.CollectActiveRigidbodies (cognitive 24) · ×1
  • PhysicsSimulationOps.CollectActiveRigidbodies (cognitive 24) MCPForUnity/Editor/Tools/Physics/PhysicsSimulationOps.cs:124 — PhysicsSimulationOps.CollectActiveRigidbodies 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 · ManageProBuilder.CollectUniqueEdges (cognitive 24) · ×1
  • ManageProBuilder.CollectUniqueEdges (cognitive 24) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:438 — ManageProBuilder.CollectUniqueEdges 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 · ManageProBuilder.SetFaceUVs (cognitive 24) · ×1
  • ManageProBuilder.SetFaceUVs (cognitive 24) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:2201 — ManageProBuilder.SetFaceUVs 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 · SpriteImportSetup.SliceSheet (cognitive 24) · ×1
  • SpriteImportSetup.SliceSheet (cognitive 24) MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs:206 — SpriteImportSetup.SliceSheet has cognitive complexity 24 (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 · McpAdvancedSection.UpdatePathOverrides (cognitive 24) · ×1
  • McpAdvancedSection.UpdatePathOverrides (cognitive 24) MCPForUnity/Editor/Windows/Components/Advanced/McpAdvancedSection.cs:328 — McpAdvancedSection.UpdatePathOverrides has cognitive complexity 24 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CheckPathLengths.Run (cognitive 24) · ×1
  • CheckPathLengths.Run (cognitive 24) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckPathLengths.cs:23 — CheckPathLengths.Run has cognitive complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prefab.modify (cognitive 24) · ×1
  • prefab.modify (cognitive 24) Server/src/cli/commands/prefab.py:305 — prefab.modify has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (20 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · unity_instances.unity_instances (cognitive 24) · ×1
  • unity_instances.unity_instances (cognitive 24) Server/src/services/resources/unity_instances.py:18 — unity_instances.unity_instances has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnityInstanceMiddleware._discover_instances (cognitive 24) · ×1
  • UnityInstanceMiddleware._discover_instances (cognitive 24) Server/src/transport/unity_instance_middleware.py:97 — UnityInstanceMiddleware._discover_instances has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FalModelCatalog.Get (cognitive 23) · ×1
  • FalModelCatalog.Get (cognitive 23) MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs:253 — FalModelCatalog.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 · GameObjectComponentHelpers.SetComponentPropertiesInternal (cognitive 23) · ×1
  • GameObjectComponentHelpers.SetComponentPropertiesInternal (cognitive 23) MCPForUnity/Editor/Tools/GameObjects/GameObjectComponentHelpers.cs:219 — GameObjectComponentHelpers.SetComponentPropertiesInternal 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 · ManageScript.TryFindClassInsertionPoint (cognitive 23) · ×1
  • ManageScript.TryFindClassInsertionPoint (cognitive 23) MCPForUnity/Editor/Tools/ManageScript.cs:2035 — ManageScript.TryFindClassInsertionPoint 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 · ManageScriptableObject.HandleCreate (cognitive 23) · ×1
  • ManageScriptableObject.HandleCreate (cognitive 23) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:78 — ManageScriptableObject.HandleCreate has cognitive complexity 23 (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 · ManageScriptableObject.ApplyArrayResize (cognitive 23) · ×1
  • ManageScriptableObject.ApplyArrayResize (cognitive 23) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:603 — ManageScriptableObject.ApplyArrayResize 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 · ManageUI.ListUIAssets (cognitive 23) · ×1
  • ManageUI.ListUIAssets (cognitive 23) MCPForUnity/Editor/Tools/ManageUI.cs:1297 — ManageUI.ListUIAssets 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 · ManageProBuilder.SetFaceMaterial (cognitive 23) · ×1
  • ManageProBuilder.SetFaceMaterial (cognitive 23) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:2080 — ManageProBuilder.SetFaceMaterial 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 · ProBuilderMeshUtils.RepairMesh (cognitive 23) · ×1
  • ProBuilderMeshUtils.RepairMesh (cognitive 23) MCPForUnity/Editor/Tools/ProBuilder/ProBuilderMeshUtils.cs:216 — ProBuilderMeshUtils.RepairMesh has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · UnityReflect.SearchTypes (cognitive 23) · ×1
  • UnityReflect.SearchTypes (cognitive 23) MCPForUnity/Editor/Tools/UnityReflect.cs:410 — UnityReflect.SearchTypes has cognitive complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · McpConnectionSection.UpdateHttpServerCommandDisplay (cognitive 23) · ×1
  • McpConnectionSection.UpdateHttpServerCommandDisplay (cognitive 23) MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:492 — McpConnectionSection.UpdateHttpServerCommandDisplay 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 · EditorPrefsWindow.CreateEditorPrefItem (cognitive 23) · ×1
  • EditorPrefsWindow.CreateEditorPrefItem (cognitive 23) MCPForUnity/Editor/Windows/EditorPrefs/EditorPrefsWindow.cs:245 — EditorPrefsWindow.CreateEditorPrefItem 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 · ApiKeyService._validate_external (cognitive 23) · ×1
  • ApiKeyService._validate_external (cognitive 23) REDACTED:146 — ApiKeyService._validate_external has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · manage_scene.manage_scene (cognitive 23) · ×1
  • manage_scene.manage_scene (cognitive 23) Server/src/services/tools/manage_scene.py:28 — manage_scene.manage_scene has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, boolean chains 1, error handling 1, ternaries 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PluginHub.send_command (cognitive 23) · ×1
  • PluginHub.send_command (cognitive 23) Server/src/transport/plugin_hub.py:287 — PluginHub.send_command has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 5 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TOMLParser.ReadQuotedValueSingleLine (cognitive 22) · ×1
  • TOMLParser.ReadQuotedValueSingleLine (cognitive 22) MCPForUnity/Editor/External/Tommy.cs:1462 — TOMLParser.ReadQuotedValueSingleLine has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · ManagePackages.GetStatus (cognitive 22) · ×1
  • ManagePackages.GetStatus (cognitive 22) MCPForUnity/Editor/Tools/ManagePackages.cs:165 — ManagePackages.GetStatus has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManageScript.UpdateScript (cognitive 22) · ×1
  • ManageScript.UpdateScript (cognitive 22) MCPForUnity/Editor/Tools/ManageScript.cs:437 — ManageScript.UpdateScript has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · UnityReflect.GetMemberInfo (cognitive 22) · ×1
  • UnityReflect.GetMemberInfo (cognitive 22) MCPForUnity/Editor/Tools/UnityReflect.cs:254 — UnityReflect.GetMemberInfo has cognitive complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent 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 · McpToolsSection.OnManageSceneMultiviewClicked (cognitive 22) · ×1
  • McpToolsSection.OnManageSceneMultiviewClicked (cognitive 22) MCPForUnity/Editor/Windows/Components/Tools/McpToolsSection.cs:731 — McpToolsSection.OnManageSceneMultiviewClicked has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CheckDemoScenes.CheckForDemoScenesInUpmSamples (cognitive 22) · ×1
  • CheckDemoScenes.CheckForDemoScenesInUpmSamples (cognitive 22) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/UnityPackage/CheckDemoScenes.cs:128 — CheckDemoScenes.CheckForDemoScenesInUpmSamples has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · texture.create (cognitive 22) · ×1
  • texture.create (cognitive 22) Server/src/cli/commands/texture.py:344 — texture.create has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (10 pts), error handling 4 (8 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). 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 · custom_tool_service.resolve_project_id_for_unity_instance (cognitive 22) · ×1
  • custom_tool_service.resolve_project_id_for_unity_instance (cognitive 22) Server/src/services/custom_tool_service.py:497 — custom_tool_service.resolve_project_id_for_unity_instance has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 3 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · manage_gameobject.manage_gameobject (cognitive 22) · ×1
  • manage_gameobject.manage_gameobject (cognitive 22) Server/src/services/tools/manage_gameobject.py:136 — manage_gameobject.manage_gameobject has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 3, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _UnityDocParser.handle_starttag (cognitive 22) · ×1
  • _UnityDocParser.handle_starttag (cognitive 22) Server/src/services/tools/unity_docs.py:137 — _UnityDocParser.handle_starttag has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 10 (11 pts) (nesting depth added 1). 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.
D2 · Cognitive Complexity · unity_docs._lookup_single (cognitive 22) · ×1
  • unity_docs._lookup_single (cognitive 22) Server/src/services/tools/unity_docs.py:579 — unity_docs._lookup_single has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · unity_transport.send_with_unity_instance (cognitive 22) · ×1
  • unity_transport.send_with_unity_instance (cognitive 22) Server/src/transport/unity_transport.py:42 — unity_transport.send_with_unity_instance has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · focus_nudge.nudge_unity_focus (cognitive 22) · ×1
  • focus_nudge.nudge_unity_focus (cognitive 22) Server/src/utils/focus_nudge.py:633 — focus_nudge.nudge_unity_focus has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · TOMLParser.ReadValue (cognitive 21) · ×1
  • TOMLParser.ReadValue (cognitive 21) MCPForUnity/Editor/External/Tommy.cs:939 — TOMLParser.ReadValue 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 · ObjectResolver.Resolve (cognitive 21) · ×1
  • ObjectResolver.Resolve (cognitive 21) MCPForUnity/Editor/Helpers/ObjectResolver.cs:32 — ObjectResolver.Resolve 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 · HttpAutoStartHandler.WaitForServerAndConnectAsync (cognitive 21) · ×1
  • HttpAutoStartHandler.WaitForServerAndConnectAsync (cognitive 21) MCPForUnity/Editor/Services/HttpAutoStartHandler.cs:287 — HttpAutoStartHandler.WaitForServerAndConnectAsync 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 · PathResolverService.TryValidateUvxExecutable (cognitive 21) · ×1
  • PathResolverService.TryValidateUvxExecutable (cognitive 21) MCPForUnity/Editor/Services/PathResolverService.cs:180 — PathResolverService.TryValidateUvxExecutable 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 · ControllerLayers.RemoveLayer (cognitive 21) · ×1
  • ControllerLayers.RemoveLayer (cognitive 21) MCPForUnity/Editor/Tools/Animation/ControllerLayers.cs:64 — ControllerLayers.RemoveLayer 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 · CameraHelpers.ResolveGameObjectRef (cognitive 21) · ×1
  • CameraHelpers.ResolveGameObjectRef (cognitive 21) MCPForUnity/Editor/Tools/Cameras/CameraHelpers.cs:98 — CameraHelpers.ResolveGameObjectRef 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 · RoslynCompiler.Compile (cognitive 21) · ×1
  • RoslynCompiler.Compile (cognitive 21) MCPForUnity/Editor/Tools/ExecuteCode.cs:755 — RoslynCompiler.Compile 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 · PhysicsSettingsOps.SetSettings3D (cognitive 21) · ×1
  • PhysicsSettingsOps.SetSettings3D (cognitive 21) MCPForUnity/Editor/Tools/Physics/PhysicsSettingsOps.cs:118 — PhysicsSettingsOps.SetSettings3D 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 · RefreshUnity.HandleCommand (cognitive 21) · ×1
  • RefreshUnity.HandleCommand (cognitive 21) MCPForUnity/Editor/Tools/RefreshUnity.cs:33 — RefreshUnity.HandleCommand has cognitive complexity 21 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ParticleWrite.SetMain (cognitive 21) · ×1
  • ParticleWrite.SetMain (cognitive 21) MCPForUnity/Editor/Tools/Vfx/ParticleWrite.cs:18 — ParticleWrite.SetMain has cognitive complexity 21 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · McpAssetGenSection.PopulateModelDropdown (cognitive 21) · ×1
  • McpAssetGenSection.PopulateModelDropdown (cognitive 21) MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs:465 — McpAssetGenSection.PopulateModelDropdown has cognitive complexity 21 (threshold 15). Of this number, 17 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, 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 · ValidatorCategory.EvaluateByFilter (cognitive 21) · ×1
  • ValidatorCategory.EvaluateByFilter (cognitive 21) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Categories/ValidatorCategory.cs:15 — ValidatorCategory.EvaluateByFilter 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 · RoslynRuntimeCompiler.CompileAndRunOnSelf (cognitive 21) · ×1
  • RoslynRuntimeCompiler.CompileAndRunOnSelf (cognitive 21) CustomTools/RoslynRuntimeCompilation/RoslynRuntimeCompiler.cs:515 — RoslynRuntimeCompiler.CompileAndRunOnSelf 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 · gameobject.create (cognitive 21) · ×1
  • gameobject.create (cognitive 21) Server/src/cli/commands/gameobject.py:129 — gameobject.create has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · manage_components.manage_components (cognitive 21) · ×1
  • manage_components.manage_components (cognitive 21) Server/src/services/tools/manage_components.py:31 — manage_components.manage_components has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · refresh_unity.wait_for_editor_ready (cognitive 21) · ×1
  • refresh_unity.wait_for_editor_ready (cognitive 21) Server/src/services/tools/refresh_unity.py:34 — refresh_unity.wait_for_editor_ready has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (6 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · refresh_unity.refresh_unity (cognitive 21) · ×1
  • refresh_unity.refresh_unity (cognitive 21) Server/src/services/tools/refresh_unity.py:175 — refresh_unity.refresh_unity has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · unity_connection._extract_response_reason (cognitive 21) · ×1
  • unity_connection._extract_response_reason (cognitive 21) Server/src/transport/legacy/unity_connection.py:772 — unity_connection._extract_response_reason has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginHub.on_disconnect (cognitive 21) · ×1
  • PluginHub.on_disconnect (cognitive 21) Server/src/transport/plugin_hub.py:244 — PluginHub.on_disconnect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnityInstanceMiddleware._resolve_instance_value (cognitive 21) · ×1
  • UnityInstanceMiddleware._resolve_instance_value (cognitive 21) Server/src/transport/unity_instance_middleware.py:141 — UnityInstanceMiddleware._resolve_instance_value has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TOMLParser.ReadInlineTable (cognitive 20) · ×1
  • TOMLParser.ReadInlineTable (cognitive 20) MCPForUnity/Editor/External/Tommy.cs:1293 — TOMLParser.ReadInlineTable 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 · VectorParsing.ParseGradient (cognitive 20) · ×1
  • VectorParsing.ParseGradient (cognitive 20) MCPForUnity/Editor/Helpers/VectorParsing.cs:299 — VectorParsing.ParseGradient 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 · HttpBridgeReloadHandler.ResumeHttpWithRetriesAsync (cognitive 20) · ×1
  • HttpBridgeReloadHandler.ResumeHttpWithRetriesAsync (cognitive 20) MCPForUnity/Editor/Services/HttpBridgeReloadHandler.cs:146 — HttpBridgeReloadHandler.ResumeHttpWithRetriesAsync 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 · StdioBridgeHost.Stop (cognitive 20) · ×1
  • StdioBridgeHost.Stop (cognitive 20) MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:448 — StdioBridgeHost.Stop has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · StdioBridgeHost.ListenerLoopAsync (cognitive 20) · ×1
  • StdioBridgeHost.ListenerLoopAsync (cognitive 20) MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:523 — StdioBridgeHost.ListenerLoopAsync 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 · RoslynInstaller.Install (cognitive 20) · ×1
  • RoslynInstaller.Install (cognitive 20) MCPForUnity/Editor/Setup/RoslynInstaller.cs:59 — RoslynInstaller.Install 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 · SkillSyncService.FetchRemoteSnapshot (cognitive 20) · ×1
  • SkillSyncService.FetchRemoteSnapshot (cognitive 20) MCPForUnity/Editor/Setup/SkillSyncService.cs:177 — SkillSyncService.FetchRemoteSnapshot 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 · ControllerBlendTrees.AddBlendTreeChild (cognitive 20) · ×1
  • ControllerBlendTrees.AddBlendTreeChild (cognitive 20) MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:145 — ControllerBlendTrees.AddBlendTreeChild has cognitive complexity 20 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BlenderBridgeTool.SetupBloomAsync (cognitive 20) · ×1
  • BlenderBridgeTool.SetupBloomAsync (cognitive 20) MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs:484 — BlenderBridgeTool.SetupBloomAsync 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, split the body into named stages: move each independent 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 · RenderPipelineOps.SetSettings (cognitive 20) · ×1
  • RenderPipelineOps.SetSettings (cognitive 20) MCPForUnity/Editor/Tools/Graphics/RenderPipelineOps.cs:177 — RenderPipelineOps.SetSettings 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 · ManageAsset.GetAssetData (cognitive 20) · ×1
  • ManageAsset.GetAssetData (cognitive 20) MCPForUnity/Editor/Tools/ManageAsset.cs:1034 — ManageAsset.GetAssetData 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 · ManageScript.TryComputeClassSpanBalanced (cognitive 20) · ×1
  • ManageScript.TryComputeClassSpanBalanced (cognitive 20) MCPForUnity/Editor/Tools/ManageScript.cs:1792 — ManageScript.TryComputeClassSpanBalanced 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 · ManageScript.ValidateScriptSyntaxUnity (cognitive 20) · ×1
  • ManageScript.ValidateScriptSyntaxUnity (cognitive 20) MCPForUnity/Editor/Tools/ManageScript.cs:2578 — ManageScript.ValidateScriptSyntaxUnity has cognitive complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ManageShader.HandleCommand (cognitive 20) · ×1
  • ManageShader.HandleCommand (cognitive 20) MCPForUnity/Editor/Tools/ManageShader.cs:21 — ManageShader.HandleCommand has cognitive complexity 20 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ManagePrefabs.FindSceneObjectByName (cognitive 20) · ×1
  • ManagePrefabs.FindSceneObjectByName (cognitive 20) MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:459 — ManagePrefabs.FindSceneObjectByName 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 · MCPForUnityEditorWindow.SetupTabs (cognitive 20) · ×1
  • MCPForUnityEditorWindow.SetupTabs (cognitive 20) MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs:639 — MCPForUnityEditorWindow.SetupTabs has cognitive complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 657, 665, 673, …). 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 · prefab.hierarchy (cognitive 20) · ×1
  • prefab.hierarchy (cognitive 20) Server/src/cli/commands/prefab.py:146 — prefab.hierarchy has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · editor_state.infer_single_instance_id (cognitive 20) · ×1
  • editor_state.infer_single_instance_id (cognitive 20) Server/src/services/resources/editor_state.py:135 — editor_state.infer_single_instance_id has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (6 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · script_apply_edits._normalize_script_locator (cognitive 20) · ×1
  • script_apply_edits._normalize_script_locator (cognitive 20) Server/src/services/tools/script_apply_edits.py:585 — script_apply_edits._normalize_script_locator has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (7 pts), ternaries 3 (7 pts), boolean chains 5, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginHub._evict_connection (cognitive 20) · ×1
  • PluginHub._evict_connection (cognitive 20) Server/src/transport/plugin_hub.py:768 — PluginHub._evict_connection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (4 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · focus_nudge._focus_app_macos (cognitive 20) · ×1
  • focus_nudge._focus_app_macos (cognitive 20) Server/src/utils/focus_nudge.py:253 — focus_nudge._focus_app_macos has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 1 (3 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync_release_notes.main (cognitive 20) · ×1
  • sync_release_notes.main (cognitive 20) tools/sync_release_notes.py:290 — sync_release_notes.main has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 4, boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClaudeCliMcpConfigurator.RemoveLegacyUserConfigEntries (cognitive 19) · ×1
  • ClaudeCliMcpConfigurator.RemoveLegacyUserConfigEntries (cognitive 19) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:1147 — ClaudeCliMcpConfigurator.RemoveLegacyUserConfigEntries 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 · GameObjectSerializer.IsUnsafeType (cognitive 19) · ×1
  • GameObjectSerializer.IsUnsafeType (cognitive 19) MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:156 — GameObjectSerializer.IsUnsafeType 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.
D2 · Cognitive Complexity · TestJobManager.TryRestoreFromSessionState (cognitive 19) · ×1
  • TestJobManager.TryRestoreFromSessionState (cognitive 19) MCPForUnity/Editor/Services/TestJobManager.cs:200 — TestJobManager.TryRestoreFromSessionState 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 · WebSocketTransportClient.StopConnectionLoopsAsync (cognitive 19) · ×1
  • WebSocketTransportClient.StopConnectionLoopsAsync (cognitive 19) MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs:328 — WebSocketTransportClient.StopConnectionLoopsAsync 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.
D2 · Cognitive Complexity · ManageScene.FrameSceneView (cognitive 19) · ×1
  • ManageScene.FrameSceneView (cognitive 19) MCPForUnity/Editor/Tools/ManageScene.cs:1370 — ManageScene.FrameSceneView 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 · ManageScript.IndexOfClassToken (cognitive 19) · ×1
  • ManageScript.IndexOfClassToken (cognitive 19) MCPForUnity/Editor/Tools/ManageScript.cs:2132 — ManageScript.IndexOfClassToken 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 · ManageUI.AttachUIDocument (cognitive 19) · ×1
  • ManageUI.AttachUIDocument (cognitive 19) MCPForUnity/Editor/Tools/ManageUI.cs:300 — ManageUI.AttachUIDocument 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 · PhysicsQueryOps.Shapecast3D (cognitive 19) · ×1
  • PhysicsQueryOps.Shapecast3D (cognitive 19) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:354 — PhysicsQueryOps.Shapecast3D 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 · MCPForUnityEditorWindow.SwitchPanel (cognitive 19) · ×1
  • MCPForUnityEditorWindow.SwitchPanel (cognitive 19) MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs:714 — MCPForUnityEditorWindow.SwitchPanel 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 · FileUtility.IsMissingMetaFiles (cognitive 19) · ×1
  • FileUtility.IsMissingMetaFiles (cognitive 19) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Utility/FileUtility.cs:104 — FileUtility.IsMissingMetaFiles 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 · CheckCompressedFiles.Run (cognitive 19) · ×1
  • CheckCompressedFiles.Run (cognitive 19) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckCompressedFiles.cs:32 — CheckCompressedFiles.Run 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 · texture._normalize_set_pixels (cognitive 19) · ×1
  • texture._normalize_set_pixels (cognitive 19) Server/src/cli/commands/texture.py:176 — texture._normalize_set_pixels has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · unity_response.normalize_unity_response (cognitive 19) · ×1
  • unity_response.normalize_unity_response (cognitive 19) Server/src/models/unity_response.py:9 — unity_response.normalize_unity_response has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · find_in_file.find_in_file (cognitive 19) · ×1
  • find_in_file.find_in_file (cognitive 19) Server/src/services/tools/find_in_file.py:79 — find_in_file.find_in_file has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, error handling 2 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · unity_docs._search_assets (cognitive 19) · ×1
  • unity_docs._search_assets (cognitive 19) Server/src/services/tools/unity_docs.py:517 — unity_docs._search_assets has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 3 (4 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · local_harness.wait_for_ready (cognitive 19) · ×1
  • local_harness.wait_for_ready (cognitive 19) tools/local_harness.py:1002 — local_harness.wait_for_ready has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClaudeCliMcpConfigurator.Register (cognitive 18) · ×1
  • ClaudeCliMcpConfigurator.Register (cognitive 18) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:947 — ClaudeCliMcpConfigurator.Register 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 · ExecPath.ResolveClaude (cognitive 18) · ×1
  • ExecPath.ResolveClaude (cognitive 18) REDACTED:17 — ExecPath.ResolveClaude 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 · SafeZipExtractor.ExtractTo (cognitive 18) · ×1
  • SafeZipExtractor.ExtractTo (cognitive 18) MCPForUnity/Editor/Services/AssetGen/Import/SafeZipExtractor.cs:21 — SafeZipExtractor.ExtractTo 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 · MeshyAdapter.PollAsync (cognitive 18) · ×1
  • MeshyAdapter.PollAsync (cognitive 18) MCPForUnity/Editor/Services/AssetGen/Providers/MeshyAdapter.cs:78 — MeshyAdapter.PollAsync 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.
D2 · Cognitive Complexity · ServerManagementService.IsLocalHttpServerRunning (cognitive 18) · ×1
  • ServerManagementService.IsLocalHttpServerRunning (cognitive 18) REDACTED:418 — ServerManagementService.IsLocalHttpServerRunning 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 · ManageCamera.HandleCommand (cognitive 18) · ×1
  • ManageCamera.HandleCommand (cognitive 18) MCPForUnity/Editor/Tools/Cameras/ManageCamera.cs:10 — ManageCamera.HandleCommand 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 · ExecuteCode.CompileAndExecute (cognitive 18) · ×1
  • ExecuteCode.CompileAndExecute (cognitive 18) MCPForUnity/Editor/Tools/ExecuteCode.cs:202 — ExecuteCode.CompileAndExecute 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 · RoslynCompiler.Initialize (cognitive 18) · ×1
  • RoslynCompiler.Initialize (cognitive 18) MCPForUnity/Editor/Tools/ExecuteCode.cs:666 — RoslynCompiler.Initialize 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 · ManageAsset.SearchAssets (cognitive 18) · ×1
  • ManageAsset.SearchAssets (cognitive 18) MCPForUnity/Editor/Tools/ManageAsset.cs:628 — ManageAsset.SearchAssets 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 · PhysicsForceOps.ApplyForce (cognitive 18) · ×1
  • PhysicsForceOps.ApplyForce (cognitive 18) MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:11 — PhysicsForceOps.ApplyForce 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 · McpConnectionSection.InitializeUI (cognitive 18) · ×1
  • McpConnectionSection.InitializeUI (cognitive 18) MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.cs:119 — McpConnectionSection.InitializeUI 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 · RoslynRuntimeCompiler.InvokeEntry (cognitive 18) · ×1
  • RoslynRuntimeCompiler.InvokeEntry (cognitive 18) CustomTools/RoslynRuntimeCompilation/RoslynRuntimeCompiler.cs:204 — RoslynRuntimeCompiler.InvokeEntry 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 · texture.sprite (cognitive 18) · ×1
  • texture.sprite (cognitive 18) Server/src/cli/commands/texture.py:425 — texture.sprite has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · output._build_table (cognitive 18) · ×1
  • output._build_table (cognitive 18) Server/src/cli/utils/output.py:130 — output._build_table has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · batch_execute.batch_execute (cognitive 18) · ×1
  • batch_execute.batch_execute (cognitive 18) Server/src/services/tools/batch_execute.py:77 — batch_execute.batch_execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · unity_docs.unity_docs (cognitive 18) · ×1
  • unity_docs.unity_docs (cognitive 18) Server/src/services/tools/unity_docs.py:722 — unity_docs.unity_docs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.normalize_string_list (cognitive 18) · ×1
  • utils.normalize_string_list (cognitive 18) Server/src/services/tools/utils.py:215 — utils.normalize_string_list has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnityConnection.connect (cognitive 18) · ×1
  • UnityConnection.connect (cognitive 18) Server/src/transport/legacy/unity_connection.py:53 — UnityConnection.connect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · local_harness.instance_id_from_status (cognitive 18) · ×1
  • local_harness.instance_id_from_status (cognitive 18) tools/local_harness.py:443 — local_harness.instance_id_from_status has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClaudeCliMcpConfigurator.FindUnityServerFromWalk (cognitive 17) · ×1
  • ClaudeCliMcpConfigurator.FindUnityServerFromWalk (cognitive 17) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:1426 — ClaudeCliMcpConfigurator.FindUnityServerFromWalk 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 · PlatformDetectorBase.TryValidateUvWithPath (cognitive 17) · ×1
  • PlatformDetectorBase.TryValidateUvWithPath (cognitive 17) MCPForUnity/Editor/Dependencies/PlatformDetectors/PlatformDetectorBase.cs:149 — PlatformDetectorBase.TryValidateUvWithPath 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 · ExecPath.TryRun (cognitive 17) · ×1
  • ExecPath.TryRun (cognitive 17) REDACTED:190 — ExecPath.TryRun has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VectorParsing.ValidateAnimationCurveFormat (cognitive 17) · ×1
  • VectorParsing.ValidateAnimationCurveFormat (cognitive 17) MCPForUnity/Editor/Helpers/VectorParsing.cs:490 — VectorParsing.ValidateAnimationCurveFormat 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 · TestRunnerService.CollectFromNode (cognitive 17) · ×1
  • TestRunnerService.CollectFromNode (cognitive 17) MCPForUnity/Editor/Services/TestRunnerService.cs:611 — TestRunnerService.CollectFromNode 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 · ControllerLayers.SetLayerWeight (cognitive 17) · ×1
  • ControllerLayers.SetLayerWeight (cognitive 17) MCPForUnity/Editor/Tools/Animation/ControllerLayers.cs:133 — ControllerLayers.SetLayerWeight 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 · CameraCreate.CreateCinemachineCamera (cognitive 17) · ×1
  • CameraCreate.CreateCinemachineCamera (cognitive 17) MCPForUnity/Editor/Tools/Cameras/CameraCreate.cs:73 — CameraCreate.CreateCinemachineCamera 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 · RendererFeatureOps.ReorderFeatures (cognitive 17) · ×1
  • RendererFeatureOps.ReorderFeatures (cognitive 17) MCPForUnity/Editor/Tools/Graphics/RendererFeatureOps.cs:330 — RendererFeatureOps.ReorderFeatures has cognitive complexity 17 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VolumeOps.SetEffect (cognitive 17) · ×1
  • VolumeOps.SetEffect (cognitive 17) MCPForUnity/Editor/Tools/Graphics/VolumeOps.cs:199 — VolumeOps.SetEffect 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 · ManageAsset.ApplyPhysicsMaterialProperties (cognitive 17) · ×1
  • ManageAsset.ApplyPhysicsMaterialProperties (cognitive 17) MCPForUnity/Editor/Tools/ManageAsset.cs:882 — ManageAsset.ApplyPhysicsMaterialProperties 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.
D2 · Cognitive Complexity · ManageScene.ResolveCamera (cognitive 17) · ×1
  • ManageScene.ResolveCamera (cognitive 17) MCPForUnity/Editor/Tools/ManageScene.cs:1333 — ManageScene.ResolveCamera 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 · ManageScene.EnsureGameView (cognitive 17) · ×1
  • ManageScene.EnsureGameView (cognitive 17) MCPForUnity/Editor/Tools/ManageScene.cs:1533 — ManageScene.EnsureGameView 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 · ManageScript.CheckBalancedDelimiters (cognitive 17) · ×1
  • ManageScript.CheckBalancedDelimiters (cognitive 17) MCPForUnity/Editor/Tools/ManageScript.cs:1162 — ManageScript.CheckBalancedDelimiters 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 · ManageScriptableObject.TrySetAnimationCurve (cognitive 17) · ×1
  • ManageScriptableObject.TrySetAnimationCurve (cognitive 17) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:1100 — ManageScriptableObject.TrySetAnimationCurve 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 · ManagePrefabs.CreatePrefabFromGameObject (cognitive 17) · ×1
  • ManagePrefabs.CreatePrefabFromGameObject (cognitive 17) MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:85 — ManagePrefabs.CreatePrefabFromGameObject 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.
D2 · Cognitive Complexity · ManageProBuilder.MoveVertices (cognitive 17) · ×1
  • ManageProBuilder.MoveVertices (cognitive 17) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1729 — ManageProBuilder.MoveVertices 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 · TrailWrite.SetProperties (cognitive 17) · ×1
  • TrailWrite.SetProperties (cognitive 17) MCPForUnity/Editor/Tools/Vfx/TrailWrite.cs:72 — TrailWrite.SetProperties 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 · McpClientConfigSection.ConfigureClaudeCliAsync (cognitive 17) · ×1
  • McpClientConfigSection.ConfigureClaudeCliAsync (cognitive 17) MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs:375 — McpClientConfigSection.ConfigureClaudeCliAsync has cognitive complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 439, 427, 408). 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 · ScriptParser.FindNextTypeBlock (cognitive 17) · ×1
  • ScriptParser.FindNextTypeBlock (cognitive 17) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/ScriptUtilityService.cs:576 — ScriptParser.FindNextTypeBlock 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 · CheckTypeNamespaces.Run (cognitive 17) · ×1
  • CheckTypeNamespaces.Run (cognitive 17) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckTypeNamespaces.cs:43 — CheckTypeNamespaces.Run 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 · RoslynRuntimeCompiler.CompileAndExecute (cognitive 17) · ×1
  • RoslynRuntimeCompiler.CompileAndExecute (cognitive 17) CustomTools/RoslynRuntimeCompilation/RoslynRuntimeCompiler.cs:394 — RoslynRuntimeCompiler.CompileAndExecute 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.
D2 · Cognitive Complexity · manage_sprite.manage_sprite (cognitive 17) · ×1
  • manage_sprite.manage_sprite (cognitive 17) Server/src/services/tools/manage_sprite.py:56 — manage_sprite.manage_sprite has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · manage_tools.manage_tools (cognitive 17) · ×1
  • manage_tools.manage_tools (cognitive 17) Server/src/services/tools/manage_tools.py:44 — manage_tools.manage_tools has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.extract_screenshot_images (cognitive 17) · ×1
  • utils.extract_screenshot_images (cognitive 17) Server/src/services/tools/utils.py:405 — utils.extract_screenshot_images has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PluginHub._sync_server_tool_visibility (cognitive 17) · ×1
  • PluginHub._sync_server_tool_visibility (cognitive 17) Server/src/transport/plugin_hub.py:565 — PluginHub._sync_server_tool_visibility has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 3, loops 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent 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 · PluginHub._ping_loop (cognitive 17) · ×1
  • PluginHub._ping_loop (cognitive 17) Server/src/transport/plugin_hub.py:696 — PluginHub._ping_loop has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnityInstanceMiddleware._refresh_tool_visibility_metadata_from_registry (cognitive 17) · ×1
  • UnityInstanceMiddleware._refresh_tool_visibility_metadata_from_registry (cognitive 17) Server/src/transport/unity_instance_middleware.py:535 — UnityInstanceMiddleware._refresh_tool_visibility_metadata_from_registry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · module_discovery.discover_modules (cognitive 17) · ×1
  • module_discovery.discover_modules (cognitive 17) Server/src/utils/module_discovery.py:13 — module_discovery.discover_modules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 2 (5 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComponentOps.GetAccessibleMembers (cognitive 16) · ×1
  • ComponentOps.GetAccessibleMembers (cognitive 16) MCPForUnity/Editor/Helpers/ComponentOps.cs:299 — ComponentOps.GetAccessibleMembers 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 · McpConfigurationHelper.WriteMcpConfiguration (cognitive 16) · ×1
  • McpConfigurationHelper.WriteMcpConfiguration (cognitive 16) MCPForUnity/Editor/Helpers/McpConfigurationHelper.cs:30 — McpConfigurationHelper.WriteMcpConfiguration 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 · VectorParsing.ParseQuaternion (cognitive 16) · ×1
  • VectorParsing.ParseQuaternion (cognitive 16) MCPForUnity/Editor/Helpers/VectorParsing.cs:152 — VectorParsing.ParseQuaternion 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 · PathResolverService.EnumerateCommandCandidates (cognitive 16) · ×1
  • PathResolverService.EnumerateCommandCandidates (cognitive 16) MCPForUnity/Editor/Services/PathResolverService.cs:261 — PathResolverService.EnumerateCommandCandidates 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 · ClipCreate.Assign (cognitive 16) · ×1
  • ClipCreate.Assign (cognitive 16) MCPForUnity/Editor/Tools/Animation/ClipCreate.cs:328 — ClipCreate.Assign 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 · GameObjectDuplicate.Handle (cognitive 16) · ×1
  • GameObjectDuplicate.Handle (cognitive 16) MCPForUnity/Editor/Tools/GameObjects/GameObjectDuplicate.cs:13 — GameObjectDuplicate.Handle 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 · ManagePackages.RemoveRegistry (cognitive 16) · ×1
  • ManagePackages.RemoveRegistry (cognitive 16) MCPForUnity/Editor/Tools/ManagePackages.cs:493 — ManagePackages.RemoveRegistry 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.
D2 · Cognitive Complexity · ManageScriptableObject.TrySetQuaternion (cognitive 16) · ×1
  • ManageScriptableObject.TrySetQuaternion (cognitive 16) MCPForUnity/Editor/Tools/ManageScriptableObject.cs:1206 — ManageScriptableObject.TrySetQuaternion 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 · ManageUI.FindUxmlBodyStart (cognitive 16) · ×1
  • ManageUI.FindUxmlBodyStart (cognitive 16) MCPForUnity/Editor/Tools/ManageUI.cs:1747 — ManageUI.FindUxmlBodyStart 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 · JointOps.ResolveJoint (cognitive 16) · ×1
  • JointOps.ResolveJoint (cognitive 16) MCPForUnity/Editor/Tools/Physics/JointOps.cs:429 — JointOps.ResolveJoint has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
D2 · Cognitive Complexity · PhysicsMaterialOps.FindCollider3D (cognitive 16) · ×1
  • PhysicsMaterialOps.FindCollider3D (cognitive 16) MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:428 — PhysicsMaterialOps.FindCollider3D has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: one other method here (PhysicsMaterialOps.FindCollider2D) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · PhysicsMaterialOps.FindCollider2D (cognitive 16) · ×1
  • PhysicsMaterialOps.FindCollider2D (cognitive 16) MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs:458 — PhysicsMaterialOps.FindCollider2D has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: one other method here (PhysicsMaterialOps.FindCollider3D) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · PhysicsQueryOps.Shapecast2D (cognitive 16) · ×1
  • PhysicsQueryOps.Shapecast2D (cognitive 16) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:474 — PhysicsQueryOps.Shapecast2D 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 · PhysicsValidationOps.CheckCollisionMatrix (cognitive 16) · ×1
  • PhysicsValidationOps.CheckCollisionMatrix (cognitive 16) MCPForUnity/Editor/Tools/Physics/PhysicsValidationOps.cs:264 — PhysicsValidationOps.CheckCollisionMatrix 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 · ManageProBuilder.MergeObjects (cognitive 16) · ×1
  • ManageProBuilder.MergeObjects (cognitive 16) MCPForUnity/Editor/Tools/ProBuilder/ManageProBuilder.cs:1464 — ManageProBuilder.MergeObjects 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 · SpriteImportSetup.SliceConverted (cognitive 16) · ×1
  • SpriteImportSetup.SliceConverted (cognitive 16) MCPForUnity/Editor/Tools/Sprite2D/SpriteImportSetup.cs:292 — SpriteImportSetup.SliceConverted 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 · McpBlenderBridgePanel.UpdateAddonStatus (cognitive 16) · ×1
  • McpBlenderBridgePanel.UpdateAddonStatus (cognitive 16) MCPForUnity/Editor/Windows/Components/AssetGen/McpBlenderBridgePanel.cs:206 — McpBlenderBridgePanel.UpdateAddonStatus 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 · McpClientConfigSection.RefreshClaudeCliStatus (cognitive 16) · ×1
  • McpClientConfigSection.RefreshClaudeCliStatus (cognitive 16) MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs:636 — McpClientConfigSection.RefreshClaudeCliStatus has cognitive complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 686, 674, 665). 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 · ScreenshotUtility.ComposeContactSheet (cognitive 16) · ×1
  • ScreenshotUtility.ComposeContactSheet (cognitive 16) MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:449 — ScreenshotUtility.ComposeContactSheet has cognitive complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · AssetUtilityService.GetPrecompiledAssemblies (cognitive 16) · ×1
  • AssetUtilityService.GetPrecompiledAssemblies (cognitive 16) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Services/Validation/AssetUtilityService.cs:125 — AssetUtilityService.GetPrecompiledAssemblies 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 · CheckPrefabTransforms.Run (cognitive 16) · ×1
  • CheckPrefabTransforms.Run (cognitive 16) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckPrefabTransforms.cs:23 — CheckPrefabTransforms.Run 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 · TelemetryConfig.__init__ (cognitive 16) · ×1
  • TelemetryConfig.__init__ (cognitive 16) REDACTED:124 — TelemetryConfig.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (5 pts), boolean chains 4, if/else 3 (4 pts), ternaries 2, loops 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomToolService._normalize_response (cognitive 16) · ×1
  • CustomToolService._normalize_response (cognitive 16) Server/src/services/custom_tool_service.py:274 — CustomToolService._normalize_response has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · manage_gameobject._normalize_components_to_add (cognitive 16) · ×1
  • manage_gameobject._normalize_components_to_add (cognitive 16) Server/src/services/tools/manage_gameobject.py:14 — manage_gameobject._normalize_components_to_add has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · script_apply_edits._find_best_closing_brace_match (cognitive 16) · ×1
  • script_apply_edits._find_best_closing_brace_match (cognitive 16) Server/src/services/tools/script_apply_edits.py:524 — script_apply_edits._find_best_closing_brace_match has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · unity_reflect.unity_reflect (cognitive 16) · ×1
  • unity_reflect.unity_reflect (cognitive 16) Server/src/services/tools/unity_reflect.py:44 — unity_reflect.unity_reflect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PortDiscovery.discover_unity_port (cognitive 16) · ×1
  • PortDiscovery.discover_unity_port (cognitive 16) Server/src/transport/legacy/port_discovery.py:134 — PortDiscovery.discover_unity_port has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generate_docs_reference.generate (cognitive 16) · ×1
  • generate_docs_reference.generate (cognitive 16) tools/generate_docs_reference.py:475 — generate_docs_reference.generate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync_release_notes.render_releases_md (cognitive 16) · ×1
  • sync_release_notes.render_releases_md (cognitive 16) tools/sync_release_notes.py:203 — sync_release_notes.render_releases_md has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (6 pts), boolean chains 4, loops 3 (4 pts), if/else 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D22 · Internal API Consistency · Duplicate intent with ambiguous naming. Both methods appear to query the same Unity physics setting (Auto Sync Transforms), but one is explicitly 2D and the other is generic. In Unity, 'Auto Sync Transforms' is a global setting affecting both 2D and 3D physics, making the 2D-specific name potentially misleading or redundant. · ×1
  • Duplicate intent with ambiguous naming. Both methods appear to query the same Unity physics setting (Auto Sync Transforms), but one is explicitly 2D and the other is generic. In Unity, 'Auto Sync Transforms' is a global setting affecting both 2D and 3D physics, making the 2D-specific name potentially misleading or redundant. — Unify to a single method named `GetPhysicsAutoSyncTransforms()` (or `GetAutoSyncTransforms()`) that returns the global setting. Remove the `GetPhysics2DAutoSyncTransforms` overload unless there is a specific, documented reason to distinguish it (which is rare in Unity's API). (signatures: bool? UnityPhysicsCompat.GetPhysics2DAutoSyncTransforms() | bool? UnityPhysicsCompat.GetPhysicsAutoSyncTransforms())
D22 · Internal API Consistency · Duplicate intent with ambiguous naming. Same issue as the getters; two setters for what is likely the same underlying Unity property. · ×1
  • Duplicate intent with ambiguous naming. Same issue as the getters; two setters for what is likely the same underlying Unity property. — Unify to a single method named `TrySetPhysicsAutoSyncTransforms(bool value)`. (signatures: bool UnityPhysicsCompat.TrySetPhysics2DAutoSyncTransforms(bool value) | bool UnityPhysicsCompat.TrySetPhysicsAutoSyncTransforms(bool value))
D22 · Internal API Consistency · Inconsistent method naming and parameter structure. `CaptureToProjectFolder` implies capturing the screen (default behavior) but requires a `folderOverride` parameter. `CaptureFromCameraToProjectFolder` explicitly specifies the source (Camera) but has a different parameter list (e.g., `include...` suggests additional options not present in the first method). This forces users to remember two different signatures for similar 'save screenshot' operations. · ×1
  • Inconsistent method naming and parameter structure. `CaptureToProjectFolder` implies capturing the screen (default behavior) but requires a `folderOverride` parameter. `CaptureFromCameraToProjectFolder` explicitly specifies the source (Camera) but has a different parameter list (e.g., `include...` suggests additional options not present in the first method). This forces users to remember two different signatures for similar 'save screenshot' operations. — Standardize on a single `Capture` method that accepts an optional source (Screen vs Camera) or use a builder pattern. If keeping separate methods, ensure parameter lists are consistent (e.g., both accept `folderOverride` and `includeImage` flags) or clearly distinguish them by domain (e.g., `CaptureScreen` vs `CaptureCamera`). (signatures: ScreenshotCaptureResult ScreenshotUtility.CaptureToProjectFolder(string fileName, int superSize, bool ensureUniqueFileName, string folderOverride) | ScreenshotCaptureResult ScreenshotUtility.CaptureFromCameraToProjectFolder(Camera camera, string fileName, int superSize, bool ensureUniqueFileName, bool include...))
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (35 shared lines) · ×1
  • Near-duplicate member pair (35 shared lines) MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:51 — MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:51-100 | MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:103-155 — These two members are variants of one another: 35 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:116 — MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:116-170 | MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs:88-144 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) MCPForUnity/Editor/Tools/ManageScript.cs:443 — MCPForUnity/Editor/Tools/ManageScript.cs:443-510 | MCPForUnity/Editor/Tools/ManageScript.cs:525-808 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) Server/src/cli/commands/probuilder.py:160 — Server/src/cli/commands/probuilder.py:160-183 | Server/src/cli/commands/probuilder.py:196-223 | Server/src/cli/commands/probuilder.py:234-256 | Server/src/cli/commands/probuilder.py:265-285 | Server/src/cli/commands/probuilder.py:366-387 | Server/src/cli/commands/probuilder.py:398-419 | Server/src/cli/commands/probuilder.py:430-451 | Server/src/cli/commands/probuilder.py:495-514 | Server/src/cli/commands/probuilder.py:524-546 | Server/src/cli/commands/probuilder.py:581-600 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) Server/src/services/tools/blender_bridge.py:89 — Server/src/services/tools/blender_bridge.py:89-123 | Server/src/services/tools/generate_audio.py:60-87 | Server/src/services/tools/generate_image.py:65-96 | Server/src/services/tools/generate_model.py:64-96 | Server/src/services/tools/import_model.py:58-84 | Server/src/services/tools/import_model_file.py:54-72 | Server/src/services/tools/manage_material.py:65-111 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) Server/src/cli/commands/vfx.py:58 — Server/src/cli/commands/vfx.py:58-75 | Server/src/cli/commands/vfx.py:138-148 | Server/src/cli/commands/vfx.py:211-227 | Server/src/cli/commands/vfx.py:333-343 | Server/src/cli/commands/vfx.py:362-372 | Server/src/cli/commands/vfx.py:410-420 — 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 · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) Server/src/cli/commands/build.py:28 — Server/src/cli/commands/build.py:28-64 | Server/src/cli/commands/build.py:190-213 | Server/src/cli/commands/packages.py:21-37 | Server/src/cli/commands/packages.py:45-63 | Server/src/cli/commands/packages.py:134-148 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (56–57 lines × 2) · ×1
  • Duplicated block (56–57 lines × 2) Server/src/services/tools/script_apply_edits.py:86 — Server/src/services/tools/script_apply_edits.py:86-142 | Server/src/services/tools/script_apply_edits.py:211-266 — both copies are in the same file, so extract the 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.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) Server/src/services/tools/find_in_file.py:17 — Server/src/services/tools/find_in_file.py:17-65 | Server/src/services/tools/manage_script.py:20-68 — 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.
D4 · Code Duplication · Duplicated block (43–44 lines × 2) · ×1
  • Duplicated block (43–44 lines × 2) MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:116 — MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:116-159 | MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs:88-130 — before extracting anything, compare `MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs` and `MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 76 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 `MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:116` 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 (42–44 lines × 2) · ×1
  • Duplicated block (42–44 lines × 2) Server/src/services/tools/manage_animation.py:63 — Server/src/services/tools/manage_animation.py:63-104 | Server/src/services/tools/manage_vfx.py:75-118 — before extracting anything, compare `Server/src/services/tools/manage_animation.py` and `Server/src/services/tools/manage_vfx.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs:97 — MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs:97-136 | MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs:95-134 — before extracting anything, compare `MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs` and `MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 74 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 (28–38 lines × 2) · ×1
  • Duplicated block (28–38 lines × 2) Server/src/services/tools/manage_graphics.py:129 — Server/src/services/tools/manage_graphics.py:129-166 | Server/src/services/tools/manage_profiler.py:79-106 — 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.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs:73 — MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs:73-108 | MCPForUnity/Editor/Tools/Vfx/ManageVFX.cs:162-197 — before extracting anything, compare `MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs` and `MCPForUnity/Editor/Tools/Vfx/ManageVFX.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:248 — MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:248-281 | MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:492-525 — both copies are in the same file, so extract the 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 (32–35 lines × 2) · ×1
  • Duplicated block (32–35 lines × 2) Server/src/services/tools/manage_camera.py:130 — Server/src/services/tools/manage_camera.py:130-161 | Server/src/services/tools/manage_probuilder.py:126-160 — 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.
D4 · Code Duplication · Duplicated block (31–34 lines × 2) · ×1
  • Duplicated block (31–34 lines × 2) Server/src/cli/commands/gameobject.py:142 — Server/src/cli/commands/gameobject.py:142-172 | Server/src/cli/commands/gameobject.py:286-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–31 lines × 7) · ×1
  • Duplicated block (11–31 lines × 7) Server/src/services/tools/blender_bridge.py:113 — Server/src/services/tools/blender_bridge.py:113-123 | Server/src/services/tools/generate_audio.py:62-87 | Server/src/services/tools/generate_image.py:67-96 | Server/src/services/tools/generate_model.py:66-96 | Server/src/services/tools/import_model.py:60-84 | Server/src/services/tools/import_model_file.py:56-72 | Server/src/services/tools/manage_material.py:86-111 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 7 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Server/src/services/tools/blender_bridge.py:113` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (26–29 lines × 2) · ×1
  • Duplicated block (26–29 lines × 2) Server/src/cli/commands/scene.py:174 — Server/src/cli/commands/scene.py:174-202 | Server/src/cli/commands/script.py:56-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `Optional[str]` in one and `str` 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 (22–28 lines × 3) · ×1
  • Duplicated block (22–28 lines × 3) Server/src/cli/commands/asset_gen.py:85 — Server/src/cli/commands/asset_gen.py:85-112 | Server/src/cli/commands/asset_gen.py:200-226 | Server/src/cli/commands/asset_gen.py:245-266 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Server/src/cli/commands/asset_gen.py:117` calls `option` and `Server/src/cli/commands/asset_gen.py:231` 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 (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs:133 — MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs:133-159 | MCPForUnity/Editor/Tools/Vfx/ManageVFX.cs:222-248 — before extracting anything, compare `MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs` and `MCPForUnity/Editor/Tools/Vfx/ManageVFX.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 103 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `MCPForUnity/Editor/Tools/Vfx/ManageVFX.cs:250` calls `ToCamelCase` and `MCPForUnity/Editor/Tools/Animation/ManageAnimation.cs:161` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) Server/src/transport/unity_instance_middleware.py:239 — Server/src/transport/unity_instance_middleware.py:239-266 | Server/src/transport/unity_instance_middleware.py:277-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. 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 (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) MCPForUnity/Editor/Helpers/CodexConfigHelper.cs:50 — MCPForUnity/Editor/Helpers/CodexConfigHelper.cs:50-76 | MCPForUnity/Editor/Helpers/CodexConfigHelper.cs:202-227 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Helpers/CodexConfigHelper.cs:50` 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 (22–26 lines × 2) · ×1
  • Duplicated block (22–26 lines × 2) MCPForUnity/Editor/Services/Transport/TransportCommandDispatcher.cs:479 — MCPForUnity/Editor/Services/Transport/TransportCommandDispatcher.cs:479-500 | MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:1102-1127 — 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.
D4 · Code Duplication · Duplicated block (24–25 lines × 4) · ×1
  • Duplicated block (24–25 lines × 4) MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:23 — MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:23-47 | MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:76-99 | MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:131-154 | MCPForUnity/Editor/Tools/Vfx/LineCreate.cs:194-217 — 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 `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. 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 (21–24 lines × 3) · ×1
  • Duplicated block (21–24 lines × 3) MCPForUnity/Editor/Tools/ManageComponents.cs:359 — MCPForUnity/Editor/Tools/ManageComponents.cs:359-382 | MCPForUnity/Editor/Tools/Physics/JointOps.cs:407-427 | MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:256-276 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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 (20–23 lines × 6) · ×1
  • Duplicated block (20–23 lines × 6) Server/src/cli/commands/probuilder.py:160 — Server/src/cli/commands/probuilder.py:160-182 | Server/src/cli/commands/probuilder.py:265-284 | Server/src/cli/commands/probuilder.py:366-386 | Server/src/cli/commands/probuilder.py:398-418 | Server/src/cli/commands/probuilder.py:430-450 | Server/src/cli/commands/probuilder.py:524-545 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (20–23 lines × 3) · ×1
  • Duplicated block (20–23 lines × 3) Server/src/cli/commands/vfx.py:270 — Server/src/cli/commands/vfx.py:270-290 | Server/src/cli/commands/vfx.py:302-324 | Server/src/cli/commands/vfx.py:382-401 — 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.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:354 — MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:354-376 | MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:403-424 — both copies are in the same file, so extract the 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 `MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs:354` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `camera` to `int height) RenderCameraToBase64(Camera` in one and `Camera` 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 (19–22 lines × 3) · ×1
  • Duplicated block (19–22 lines × 3) Server/src/cli/commands/animation.py:718 — Server/src/cli/commands/animation.py:718-737 | Server/src/cli/commands/animation.py:807-825 | Server/src/cli/commands/animation.py:837-858 — 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.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×1
  • Duplicated block (21–22 lines × 2) Server/src/cli/commands/camera.py:269 — Server/src/cli/commands/camera.py:269-290 | Server/src/cli/commands/camera.py:300-320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15–21 lines × 3) · ×1
  • Duplicated block (15–21 lines × 3) Server/src/services/tools/script_apply_edits.py:968 — Server/src/services/tools/script_apply_edits.py:968-983 | Server/src/services/tools/script_apply_edits.py:1131-1145 | Server/src/services/tools/script_apply_edits.py:1256-1276 — 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 `Server/src/services/tools/script_apply_edits.py:1256` 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 (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:71 — MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:71-91 | MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs:36-54 — before extracting anything, compare `MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs` and `MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 76 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 `MCPForUnity/Editor/Services/AssetGen/Providers/FalAdapter.cs:71` 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) Server/src/cli/commands/animation.py:746 — Server/src/cli/commands/animation.py:746-765 | Server/src/cli/commands/animation.py:776-796 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×1
  • Duplicated block (20 lines × 3) Server/src/cli/commands/animation.py:79 — Server/src/cli/commands/animation.py:79-98 | Server/src/cli/commands/animation.py:266-286 | Server/src/cli/commands/animation.py:688-707 — 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.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×1
  • Duplicated block (19 lines × 4) Server/src/cli/commands/probuilder.py:196 — Server/src/cli/commands/probuilder.py:196-222 | Server/src/cli/commands/probuilder.py:234-255 | Server/src/cli/commands/probuilder.py:495-513 | Server/src/cli/commands/probuilder.py:581-599 — 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.
D4 · Code Duplication · Duplicated block (13–19 lines × 4) · ×1
  • Duplicated block (13–19 lines × 4) Server/src/cli/commands/vfx.py:85 — Server/src/cli/commands/vfx.py:85-103 | Server/src/cli/commands/vfx.py:115-127 | Server/src/cli/commands/vfx.py:158-170 | Server/src/cli/commands/vfx.py:180-192 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Server/src/cli/commands/vfx.py:104` calls `get`, `print_success` and `Server/src/cli/commands/vfx.py:173` 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 (11–18 lines × 6) · ×1
  • Duplicated block (11–18 lines × 6) Server/src/cli/commands/vfx.py:58 — Server/src/cli/commands/vfx.py:58-75 | Server/src/cli/commands/vfx.py:138-148 | Server/src/cli/commands/vfx.py:211-227 | Server/src/cli/commands/vfx.py:333-343 | Server/src/cli/commands/vfx.py:362-372 | Server/src/cli/commands/vfx.py:410-420 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Server/src/cli/commands/vfx.py:350` calls `group`, `trail` and `Server/src/cli/commands/vfx.py:78` 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 (17–18 lines × 3) · ×1
  • Duplicated block (17–18 lines × 3) Server/src/services/tools/manage_animation.py:97 — Server/src/services/tools/manage_animation.py:97-113 | Server/src/services/tools/manage_probuilder.py:156-172 | Server/src/services/tools/manage_vfx.py:111-128 — before extracting anything, compare `Server/src/services/tools/manage_animation.py` and `Server/src/services/tools/manage_vfx.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `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.
D4 · Code Duplication · Duplicated block (14–18 lines × 2) · ×1
  • Duplicated block (14–18 lines × 2) MCPForUnity/Editor/Tools/ManageScene.cs:919 — MCPForUnity/Editor/Tools/ManageScene.cs:919-936 | MCPForUnity/Editor/Tools/ManageScene.cs:1060-1073 — both copies are in the same file, so extract the 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 `MCPForUnity/Editor/Tools/ManageScene.cs:919` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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 (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) Server/src/core/telemetry_decorator.py:21 — Server/src/core/telemetry_decorator.py:21-38 | Server/src/core/telemetry_decorator.py:65-81 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) MCPForUnity/Editor/Tools/GameObjects/GameObjectModify.cs:162 — MCPForUnity/Editor/Tools/GameObjects/GameObjectModify.cs:162-177 | MCPForUnity/Editor/Tools/Prefabs/ManagePrefabs.cs:793-809 — 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 `MCPForUnity/Editor/Tools/GameObjects/GameObjectModify.cs:162` 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 (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs:590 — MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs:590-606 | MCPForUnity/Editor/Windows/MCPForUnityEditorWindow.cs:950-964 — 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 `MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs:590` 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 (13–16 lines × 4) · ×1
  • Duplicated block (13–16 lines × 4) MCPForUnity/Editor/Tools/Cameras/CameraHelpers.cs:80 — MCPForUnity/Editor/Tools/Cameras/CameraHelpers.cs:80-92 | MCPForUnity/Editor/Tools/ManageComponents.cs:361-376 | MCPForUnity/Editor/Tools/Physics/JointOps.cs:409-422 | MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:258-271 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/Cameras/CameraHelpers.cs:80` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `MCPForUnity/Editor/Tools/Cameras/CameraHelpers.cs:79` calls `CoerceString` and `MCPForUnity/Editor/Tools/ManageComponents.cs:361` 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 (14–16 lines × 3) · ×1
  • Duplicated block (14–16 lines × 3) Server/src/cli/commands/component.py:99 — Server/src/cli/commands/component.py:99-112 | Server/src/cli/commands/component.py:149-164 | Server/src/cli/commands/component.py:202-216 — 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.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) MCPForUnity/Editor/Tools/Physics/JointOps.cs:45 — MCPForUnity/Editor/Tools/Physics/JointOps.cs:45-59 | MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:16-31 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from 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 before the matched lines, `MCPForUnity/Editor/Tools/Physics/JointOps.cs:44` calls `GetRequired`, `GetOrError` and `MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:16` 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 (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) Server/src/cli/commands/packages.py:21 — Server/src/cli/commands/packages.py:21-36 | Server/src/cli/commands/packages.py:134-147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10–15 lines × 4) · ×1
  • Duplicated block (10–15 lines × 4) Server/src/services/tools/manage_prefabs.py:158 — Server/src/services/tools/manage_prefabs.py:158-167 | Server/src/services/tools/manage_scene.py:103-117 | Server/src/services/tools/manage_ui.py:198-207 | Server/src/services/tools/manage_ui.py:232-245 — 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. 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 (9–15 lines × 2) · ×1
  • Duplicated block (9–15 lines × 2) MCPForUnity/Editor/Helpers/ComponentOps.cs:979 — MCPForUnity/Editor/Helpers/ComponentOps.cs:979-993 | MCPForUnity/Editor/Tools/ManageScriptableObject.cs:1048-1056 — 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 `MCPForUnity/Editor/Helpers/ComponentOps.cs:979` 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.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) Server/src/services/tools/manage_prefabs.py:131 — Server/src/services/tools/manage_prefabs.py:131-144 | Server/src/services/tools/utils.py:538-549 — 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.
D4 · Code Duplication · Duplicated block (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:76 — MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:76-87 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:119-130 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:461-472 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:550-561 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:736-747 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:779-790 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:76` 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 (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) Server/src/cli/commands/code.py:128 — Server/src/cli/commands/code.py:128-139 | Server/src/cli/commands/code.py:188-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10–13 lines × 2) · ×1
  • Duplicated block (10–13 lines × 2) Server/src/cli/commands/texture.py:357 — Server/src/cli/commands/texture.py:357-369 | Server/src/cli/commands/texture.py:437-446 — both copies are in the same file, so extract the 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 `Server/src/cli/commands/texture.py:357` 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 (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) Server/src/cli/commands/probuilder.py:170 — Server/src/cli/commands/probuilder.py:170-182 | Server/src/cli/commands/probuilder.py:209-222 | Server/src/cli/commands/probuilder.py:243-255 | Server/src/cli/commands/probuilder.py:503-513 | Server/src/cli/commands/probuilder.py:534-545 — all 5 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.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:48 — MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:48-56 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:366-374 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:599-607 | MCPForUnity/Editor/Tools/Physics/PhysicsQueryOps.cs:708-716 — 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 (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) Server/src/services/tools/script_apply_edits.py:262 — Server/src/services/tools/script_apply_edits.py:262-272 | Server/src/services/tools/script_apply_edits.py:274-283 — both copies are in the same file, so extract the 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.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×1
  • Duplicated block (10 lines × 6) Server/src/cli/commands/camera.py:214 — Server/src/cli/commands/camera.py:214-223 | Server/src/services/tools/manage_animation.py:93-102 | Server/src/services/tools/manage_prefabs.py:157-166 | Server/src/services/tools/manage_scene.py:104-117 | Server/src/services/tools/manage_ui.py:197-206 | Server/src/services/tools/manage_ui.py:231-244 — there are 6 copies across 5 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 6 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) MCPForUnity/Editor/Tools/Physics/JointOps.cs:45 — MCPForUnity/Editor/Tools/Physics/JointOps.cs:45-54 | MCPForUnity/Editor/Tools/Physics/JointOps.cs:155-164 | MCPForUnity/Editor/Tools/Physics/JointOps.cs:326-335 | MCPForUnity/Editor/Tools/Physics/PhysicsForceOps.cs:16-26 — 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `MCPForUnity/Editor/Tools/Physics/JointOps.cs:44` calls `GetRequired`, `GetOrError` and `MCPForUnity/Editor/Tools/Physics/JointOps.cs:155` 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 (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) Server/src/cli/commands/camera.py:521 — Server/src/cli/commands/camera.py:521-530 | Server/src/cli/commands/camera.py:551-558 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:14 — MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:14-20 | MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:36-42 | MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:59-65 | MCPForUnity/Editor/Tools/Animation/AnimatorRead.cs:95-101 — 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. 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 × 7) · ×1
  • Duplicated block (7 lines × 7) MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:14 — MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:14-20 | MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:36-42 | MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:59-65 | MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:190-196 | MCPForUnity/Editor/Tools/Animation/AnimatorControl.cs:208-214 | MCPForUnity/Editor/Tools/Animation/AnimatorRead.cs:13-19 | MCPForUnity/Editor/Tools/Animation/AnimatorRead.cs:95-101 — there are 7 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 7 sites; resolving a subset leaves the remainder to drift apart. 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 (6–8 lines × 4) · ×1
  • Duplicated block (6–8 lines × 4) Server/src/services/tools/script_apply_edits.py:978 — Server/src/services/tools/script_apply_edits.py:978-983 | Server/src/services/tools/script_apply_edits.py:1140-1145 | Server/src/services/tools/script_apply_edits.py:1270-1277 | Server/src/services/tools/script_apply_edits.py:1357-1364 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Server/src/services/tools/script_apply_edits.py:1270` 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 (6–8 lines × 2) · ×1
  • Duplicated block (6–8 lines × 2) Server/src/services/tools/manage_script.py:595 — Server/src/services/tools/manage_script.py:595-602 | Server/src/services/tools/manage_shader.py:60-65 — 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 `Server/src/services/tools/manage_script.py:595` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. 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 (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) Server/src/services/tools/manage_texture.py:129 — Server/src/services/tools/manage_texture.py:129-135 | Server/src/services/tools/manage_texture.py:349-356 — both copies are in the same file, so extract the 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.
D4 · Code Duplication · Duplicated block (4–6 lines × 3) · ×1
  • Duplicated block (4–6 lines × 3) MCPForUnity/Editor/Tools/ManageScript.cs:1933 — MCPForUnity/Editor/Tools/ManageScript.cs:1933-1938 | MCPForUnity/Editor/Tools/ManageScript.cs:1947-1952 | MCPForUnity/Editor/Tools/ManageScript.cs:1986-1989 — 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 `MCPForUnity/Editor/Tools/ManageScript.cs:1933` 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.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) Server/src/services/tools/utils.py:155 — Server/src/services/tools/utils.py:155-159 | Server/src/services/tools/utils.py:166-170 | Server/src/services/tools/utils.py:188-192 | Server/src/services/tools/utils.py:202-206 — 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 (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) Server/src/cli/commands/asset.py:48 — Server/src/cli/commands/asset.py:48-71 | Server/src/cli/commands/audio.py:71-91 | Server/src/cli/commands/audio.py:105-125 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Server/src/cli/commands/audio.py:96` calls `argument` and `Server/src/cli/commands/asset.py: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 (12 lines × 7) · ×1
  • Duplicated block (12 lines × 7) Server/src/cli/commands/asset.py:248 — Server/src/cli/commands/asset.py:248-260 | Server/src/cli/commands/asset.py:267-280 | Server/src/cli/commands/editor.py:122-134 | Server/src/cli/commands/editor.py:141-152 | Server/src/cli/commands/editor.py:159-170 | Server/src/cli/commands/editor.py:177-188 | Server/src/cli/commands/editor.py:195-208 — there are 7 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 7 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (6 lines × 8) · ×1
  • Duplicated block (6 lines × 8) Server/src/cli/commands/editor.py:23 — Server/src/cli/commands/editor.py:23-28 | Server/src/cli/commands/editor.py:34-39 | Server/src/cli/commands/editor.py:45-50 | Server/src/cli/commands/editor.py:214-228 | Server/src/cli/commands/editor.py:234-246 | Server/src/cli/commands/editor.py:252-262 | Server/src/cli/commands/editor.py:268-278 | Server/src/cli/commands/packages.py:154-164 — there are 8 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 8 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) Server/src/cli/commands/gameobject.py:48 — Server/src/cli/commands/gameobject.py:48-66 | Server/src/cli/commands/material.py:25-37 | Server/src/cli/commands/profiler.py:130-136 | Server/src/cli/commands/reflect.py:37-50 | Server/src/cli/commands/reflect.py:59-72 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×1
  • Duplicated block (14 lines × 4) Server/src/cli/commands/packages.py:187 — Server/src/cli/commands/packages.py:187-202 | Server/src/cli/commands/packages.py:209-222 | Server/src/cli/commands/scene.py:237-251 | Server/src/cli/commands/scene.py:283-296 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) Server/src/services/tools/manage_build.py:30 — Server/src/services/tools/manage_build.py:30-34 | Server/src/services/tools/manage_packages.py:22-26 | Server/src/services/tools/unity_reflect.py:20-24 — 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. 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.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×1
  • Duplicated block (39 lines × 2) TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Models/Category.cs:17 — TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Models/Category.cs:17-55 | TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Models/Package.cs:29-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/Models/Category.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.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: MCPForUnity.Runtime — MCPForUnity.Runtime: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
P12 · CI test-gate honesty · Coverage collected but not gated · ×1
  • Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
S1 · Cryptographic Hygiene · Password key derivation is priced too cheaply · ×1
  • Password key derivation is priced too cheaply MCPForUnity/Editor/Security/SecureKeyStore/EncryptedFileKeyStore.cs:20 — `Iterations` fixes PBKDF2-SHA-256 at 200,000 iterations. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price.
X1 · Async correctness · Sync-over-async (deadlock risk) through `Task.WaitAll` · ×1
  • Sync-over-async (deadlock risk) through `Task.WaitAll` MCPForUnity/Editor/Services/McpEditorShutdownCleanup.cs:47 — `Task.WaitAll` blocks this thread until the tasks complete — sync-over-async: it can deadlock under a synchronization context and it parks a thread for as long as the work runs. `await Task.WhenAll(…)` instead.
X1 · Async correctness · Sync-over-async (deadlock risk) through `.Wait(…)` · ×1
  • Sync-over-async (deadlock risk) through `.Wait(…)` MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:493 — `.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).
X13 · Undrained process stream · Redirected process stream is never drained (deadlock) · ×1
  • Redirected process stream is never drained (deadlock) MCPForUnity/Editor/Security/SecureKeyStore/LinuxSecretToolKeyStore.cs:91 — `RedirectStandardError` is set here, but nothing in this type ever reads `StandardError` — while `StandardOutput` is read to the end. The child blocks as soon as it fills the StandardError pipe (~4 KB, never more than 64 KB), and it can then never finish writing StandardOutput, so the read-to-end above never returns and the `WaitForExit` timeout beside it does not help: the timeout bounds the WAIT, not the read that precedes it. Drain both — read one stream on a background thread (`BeginErrorReadLine()` with an `ErrorDataReceived` handler, or a `Task` running the second `ReadToEndAsync()`) and await both before `WaitForExit()` — or stop redirecting the stream you do not consume.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×1
  • Recursive walk over a caller-supplied document has no depth cap MCPForUnity/Editor/Helpers/MaterialOps.cs:221 — `TrySetShaderProperty` is public and takes the `JToken` from its caller, and it calls itself at line 221 with a child of the node it was given — and nowhere in `TrySetShaderProperty` 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 `TrySetShaderProperty` can intervene. Thread a depth argument through `TrySetShaderProperty` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×1
  • Swallowed exception (caught, then discarded) MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:317 — `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Minor — 302 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×143
  • Orphaned file MCPForUnity/Editor/Helpers/EditorWindowScreenshotUtility.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 MCPForUnity/Editor/Helpers/MaterialOps.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/UnityPackage/CheckProjectTemplateAssets.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 MCPForUnity/Editor/Helpers/ParamCoercion.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/NativePreviewGenerator.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 REDACTED: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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckPackageNaming.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Exporter/DefaultPackageExporter.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/AssetStoreApi.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/PackageUploadElement.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 MCPForUnity/Editor/Tools/Vfx/VfxGraphWrite.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/Data/AssetsWorkflow.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 MCPForUnity/Editor/Resources/Scene/GameObjectResource.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/ExternalProjectValidator.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Utility/CacheUtil.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/Data/Abstractions/WorkflowBase.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/LoginView.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Elements/AssetsWorkflowElement.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Utility/ASToolsUpdater.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckTypeNamespaces.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Definitions/Scriptable Objects/Editor/ValidationTestScriptableObjectInspector.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 MCPForUnity/Editor/Setup/McpForUnitySkillInstaller.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 MCPForUnity/Editor/Services/Server/PidFileManager.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/UI/Elements/ValidatorTestElement.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 TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/PackageListView.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.
  • + 118 more in this group — see findings.md.
M4 · Documentation accuracy · README/code drift · ×40
  • README/code drift Server/README.md:108 — Server/README.md changes into `unity-mcp/Server`, but no such folder exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift Server/README.md:236 — Server/README.md links to `../docs/guides/REMOTE_SERVER_AUTH.md`, but `docs/guides/REMOTE_SERVER_AUTH.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift Server/README.md:236 — Server/README.md links to `../docs/reference/REMOTE_SERVER_AUTH_ARCHITECTURE.md`, but `docs/reference/REMOTE_SERVER_AUTH_ARCHITECTURE.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/development/README-DEV-zh.md:61 — docs/development/README-DEV-zh.md names `tools/list_changed`, but no file or folder `tools/list_changed` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/i18n/README-zh.md:166 — docs/i18n/README-zh.md links to `../development/README-DEV.md`, but `docs/development/README-DEV.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/i18n/README-zh.md:166 — docs/i18n/README-zh.md links to `../reference/CUSTOM_TOOLS.md`, but `docs/reference/CUSTOM_TOOLS.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift docs/i18n/README-zh.md:174 — docs/i18n/README-zh.md links to `../reference/TELEMETRY.md`, but `docs/reference/TELEMETRY.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/architecture/external-analytics.md:17 — website/docs/architecture/external-analytics.md links to `./telemetry`, but `website/docs/architecture/telemetry` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/architecture/external-analytics.md:49 — website/docs/architecture/external-analytics.md documents the environment variable `COPLAY_STATS_TOKEN`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/architecture/instance-routing.md:17 — website/docs/architecture/instance-routing.md links to `/guides/multi-instance`, but `guides/multi-instance` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/architecture/python-layers.md:45 — website/docs/architecture/python-layers.md links to `/reference/tools`, but `reference/tools` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/architecture/python-layers.md:47 — website/docs/architecture/python-layers.md links to `/guides/tool-groups`, but `guides/tool-groups` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/architecture/transports.md:80 — website/docs/architecture/transports.md links to `/guides/multi-instance`, but `guides/multi-instance` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/architecture/transports.md:98 — website/docs/architecture/transports.md links to `/migrations/v8`, but `migrations/v8` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/contributing/dev-setup.md:139 — website/docs/contributing/dev-setup.md names `tools/list_changed`, but no file or folder `tools/list_changed` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/contributing/testing.md:82 — website/docs/contributing/testing.md links to `/architecture/unity-compat`, but `architecture/unity-compat` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/getting-started/clients.md:34 — website/docs/getting-started/clients.md links to `/guides/multi-instance`, but `guides/multi-instance` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/getting-started/first-prompt.md:15 — website/docs/getting-started/first-prompt.md links to `./install`, but `website/docs/getting-started/install` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/getting-started/first-prompt.md:50 — website/docs/getting-started/first-prompt.md links to `/guides/tool-groups`, but `guides/tool-groups` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/getting-started/first-prompt.md:55 — website/docs/getting-started/first-prompt.md links to `/guides/multi-instance`, but `guides/multi-instance` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/getting-started/first-prompt.md:60 — website/docs/getting-started/first-prompt.md links to `./clients`, but `website/docs/getting-started/clients` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/getting-started/first-prompt.md:62 — website/docs/getting-started/first-prompt.md links to `/reference/tools`, but `reference/tools` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/getting-started/install.md:74 — website/docs/getting-started/install.md links to `/guides/client-configurators`, but `guides/client-configurators` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/guides/claude-code-cli.md:71 — website/docs/guides/claude-code-cli.md links to `/guides/troubleshooting#macos-claude-cli-fails-to-start-dyld-icu-library-not-loaded`, but `guides/troubleshooting` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift website/docs/guides/multi-instance.md:124 — website/docs/guides/multi-instance.md links to `/reference/tools/core/set_active_instance`, but `reference/tools/core/set_active_instance` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×36
  • Silent fallback default in catch MCPForUnity/Editor/Clients/McpClientConfiguratorBase.cs:83 — `ParentDirectoryExists` 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 MCPForUnity/Editor/Helpers/AssetPathUtility.cs:493 — `RunOfflineProbe` 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 MCPForUnity/Editor/Helpers/McpJobStateStore.cs:47 — `LoadState` swallows every exception into `return default;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch MCPForUnity/Editor/Helpers/McpLog.cs:21 — `ReadDebugPreference` 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 MCPForUnity/Editor/Helpers/PortManager.cs:23 — `IsDebugEnabled` 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 MCPForUnity/Editor/Helpers/ProjectIdentityUtility.cs:102 — `ComputeProjectHash` swallows every exception into `return "default";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch MCPForUnity/Editor/Helpers/ProjectIdentityUtility.cs:122 — `ComputeProjectName` swallows every exception into `return "Unknown";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch MCPForUnity/Editor/Helpers/TelemetryHelper.cs:220 — `IsDebugEnabled` 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 MCPForUnity/Editor/Helpers/UnityTypeResolver.cs:237 — `SafeGetTypes` swallows every exception into `return Enumerable.Empty<Type>();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs:147 — `JsonConfigUsesStdIo` 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 MCPForUnity/Editor/Resources/Project/ProjectInfo.cs:90 — `IsPackageInstalled` 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 MCPForUnity/Editor/Security/SecureKeyStore/LinuxSecretToolKeyStore.cs:27 — `IsAvailable` 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 MCPForUnity/Editor/Services/AssetGen/Import/ModelImportPipeline.cs:214 — `ComputeMaxDimension` swallows every exception into `return 0f;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch MCPForUnity/Editor/Services/AssetGen/Providers/AssetGenProviders.cs:83 — `IsConfigured` 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 MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs:163 — `ExtractExt` swallows every exception into `return "wav";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch REDACTED:1075 — `TailFile` swallows every exception into `return string.Empty;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch MCPForUnity/Editor/Services/Transport/TransportCommandDispatcher.cs:493 — `IsValidJson` 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 MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:98 — `IsDebugEnabled` 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 MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:222 — `ShouldAutoStartBridge` swallows every exception into `return true;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:1120 — `IsValidJson` 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 MCPForUnity/Editor/Services/Transport/Transports/StdioBridgeHost.cs:1200 — `ComputeProjectHash` swallows every exception into `return "default";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch MCPForUnity/Editor/Setup/McpForUnitySkillInstaller.cs:197 — `PathsEqual` 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 MCPForUnity/Editor/Setup/SkillSyncService.cs:637 — `IsCaseSensitiveFileSystem` swallows every exception into `return true;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch MCPForUnity/Editor/Tools/Cameras/CameraHelpers.cs:67 — `GetCinemachineVersion` swallows every exception into `return "unknown";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch MCPForUnity/Editor/Tools/Cameras/CameraHelpers.cs:166 — `ExtractProperties` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • + 11 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Commented-out code · ×35
  • Commented-out code MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:235 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:245 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:480 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:498 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:515 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:548 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:584 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:589 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:598 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:607 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Helpers/GameObjectSerializer.cs:700 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:150 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:151 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:155 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:241 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:242 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:249 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:250 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:251 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:268 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:323 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:471 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:509 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:555 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code MCPForUnity/Editor/Tools/ManageAsset.cs:608 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • + 10 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×12
  • Duplicated predicate Server/src/transport/plugin_registry.py:69 — `config.http_remote_hosted and not user_id` appears character-identically in 2 files — Server/src/transport/plugin_registry.py, Server/src/transport/unity_transport.py. 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 Server/src/cli/commands/code.py:150 — `isinstance(data, dict) and "contents" in data` appears character-identically in 2 files — Server/src/cli/commands/code.py, Server/src/cli/commands/script.py. 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 Server/src/services/tools/find_gameobjects.py:117 — `isinstance(response, dict) and response.get("success")` appears character-identically in 5 files — Server/src/services/tools/find_gameobjects.py, Server/src/services/tools/manage_components.py, Server/src/services/tools/manage_gameobject.py, Server/src/services/tools/manage_scene.py. 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 Server/src/cli/commands/editor.py:414 — `isinstance(result, dict) and result.get("success")` appears character-identically in 2 files — Server/src/cli/commands/editor.py, Server/src/services/tools/unity_docs.py. 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 Server/src/services/tools/manage_script.py:434 — `isinstance(verify, dict) and verify.get("success")` appears character-identically in 2 files — Server/src/services/tools/manage_script.py, Server/src/services/tools/refresh_unity.py. 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 tools/stress_editor_state.py:65 — `length <= 0 or length > (64 * 1024 * 1024)` appears character-identically in 2 files — tools/stress_editor_state.py, tools/stress_mcp.py. 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 Server/src/cli/commands/code.py:216 — `not contents and data.get("contentsEncoded") and data.get("encodedContents")` appears character-identically in 3 files — Server/src/cli/commands/code.py, Server/src/services/tools/find_in_file.py, Server/src/services/tools/manage_script.py. 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 Server/src/services/tools/find_in_file.py:107 — `not isinstance(read_resp, dict) or not read_resp.get("success")` appears character-identically in 2 files — Server/src/services/tools/find_in_file.py, Server/src/services/tools/script_apply_edits.py. 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 tools/stress_editor_state.py:79 — `not line or b"WELCOME UNITY-MCP" not in line` appears character-identically in 2 files — tools/stress_editor_state.py, tools/stress_mcp.py. 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 Server/src/services/tools/find_in_file.py:45 — `os.name == "nt" and len(raw_path) >= 3 and raw_path[0] == "/" and raw_path[2] == ":"` appears character-identically in 2 files — Server/src/services/tools/find_in_file.py, Server/src/services/tools/manage_script.py. 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 Server/src/cli/commands/code.py:148 — `result.get("success") and result.get("data")` appears character-identically in 2 files — Server/src/cli/commands/code.py, Server/src/cli/commands/script.py. 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 Server/src/cli/commands/gameobject.py:181 — `result.get("success") or result.get("data") or result.get("result")` appears character-identically in 2 files — Server/src/cli/commands/gameobject.py, Server/src/cli/commands/ui.py. 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.
X4 · Structured logging · Interpolated log message defeats structured logging · ×11
  • Interpolated log message defeats structured logging TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Api/ApiUtility.cs:48 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Exporter/DefaultPackageExporter.cs:67 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Exporter/LegacyPackageExporter.cs:72 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/Data/Abstractions/WorkflowBase.cs:222 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/Services/Api/AuthenticationService.cs:97 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/LoginView.cs:268 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/LoginView.cs:279 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/Scripts/UI/Views/PackageListView.cs:122 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Uploader/UploaderWindow.cs:226 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Utility/CacheUtil.cs:69 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
  • Interpolated log message defeats structured logging TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Utility/FileUtility.cs:148 — Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 47 significant file(s) lose their only recent owner: MCPForUnity/Editor/Windows/Components/AssetGen/McpAssetGenSection.cs, MCPForUnity/Editor/Tools/UnityReflect.cs, MCPForUnity/Editor/Services/AssetGen/AssetGenJobManager.cs, MCPForUnity/Editor/Tools/Physics/PhysicsMaterialOps.cs, MCPForUnity/Editor/Tools/Vfx/ParticleWrite.cs, MCPForUnity/Editor/Helpers/RenderPipelineUtility.cs, MCPForUnity/Editor/Helpers/RendererHelpers.cs, MCPForUnity/Editor/Services/HttpAutoStartHandler.cs (+39 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 4 significant file(s) lose their only recent owner: MCPForUnity/Editor/Tools/Blender/BlenderBridgeTool.cs, MCPForUnity/Editor/Services/Blender/BlenderSocketClient.cs, MCPForUnity/Editor/Helpers/BlenderBridgePrefs.cs, MCPForUnity/Editor/MenuItems/BlenderBridgeMenu.cs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: MCPForUnity/Editor/Tools/Sprite2D/SpriteClipBuilder.cs, MCPForUnity/Editor/Tools/Sprite2D/SpriteParams.cs, MCPForUnity/Editor/Tools/Animation/AnimatorResolver.cs. Pair on, review, or document these before any departure.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×2
  • Silent fallback default on parse failure MCPForUnity/Editor/Services/AssetGen/FalModelCatalog.cs:65 — `Source` falls back to `"bundled"` when `Snapshots.TryGetValue(kind, out var snapshot)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
  • Silent fallback default on parse failure MCPForUnity/Editor/Windows/Components/ClientConfig/McpClientConfigSection.cs:705 — `ShouldRefreshClient` returns `true` when `lastStatusChecks.TryGetValue(client, out var last)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
X7 · Silent fallback defaults · Silent fallback default on unknown code · ×2
  • Silent fallback default on unknown code MCPForUnity/Editor/Tools/Animation/ControllerBlendTrees.cs:103 — `CreateBlendTree2D` maps every unrecognised code to `BlendTreeType.SimpleDirectional2D`, one of the real values, with no log or throw — a malformed or new code silently reads as a known one. Throw on the unknown code, or log it. If that member is the correct answer for any other code, say so in a comment on the member and the row stops firing.
  • Silent fallback default on unknown code MCPForUnity/Runtime/Helpers/UnityPhysicsCompat.cs:257 — `ParseSimulationMode` maps every unrecognised code to `SimulationMode.Unknown`, one of the real values, with no log or throw — a malformed or new code silently reads as a known one. Throw on the unknown code, or log it. If that member is the correct answer for any other code, say so in a comment on the member and the row stops firing.
AX6 · Interface segregation · Fat interface · ×1
  • Fat interface: IMcpClientConfigurator (16 members) MCPForUnity/Editor/Clients/IMcpClientConfigurator.cs:9 — `IMcpClientConfigurator` declares 16 members: `Id`, `DisplayName`, `Status`, `ConfiguredTransport`, `SupportsAutoConfigure`, `IsInstalled`, `SupportedTransports`, `GetConfigureActionLabel`, `GetConfigPath`, `CheckStatus`, `Configure`, `Unregister`, `GetManualSnippet`, `GetInstallationSteps`, `SupportsSkills`, `GetSkillInstallPath`. 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.
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies — Authorization IS enforced here (by imperative guard methods that throw on violation) — this is NOT a claim that the code is unprotected. What's missing is a NAMED rule set: the guards encode the access rules inline, so the rules can't be listed, reviewed or tested apart from the call sites that apply them. Recommendation, not a defect.
C4 · Data Retention · Partial data-retention evidence · ×1
  • Partial data-retention evidence — A retention mechanism is present, but the data-lifecycle is not yet complete — missing: a scheduled purge / cleanup job (PurgeOlderThan / CleanupJob), a documented retention period / data-expiry.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 4 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (58 single-owned of 342 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 342 of the 598 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: MCPForUnity/Editor/Tools/ManageTexture.cs, MCPForUnity/Editor/Migrations/StdIoVersionMigration.cs, MCPForUnity/Editor/Clients/Configurators/CherryStudioConfigurator.cs, MCPForUnity/Editor/Migrations/LegacyServerSrcMigration.cs.
D19 · Documentation Quality · Documentation · ×1
  • Documentation: contradicts the code website/docs/contributing/releases.md — The release-checklist section describes a two-branch flow but the repo uses a different branching model (main is stable, beta is feature-only) that this contradicts. Update the branch-flow description to match the current main/beta workflow.
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/`.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 143 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: MCPForUnity/Editor/Helpers/EditorWindowScreenshotUtility.cs, MCPForUnity/Editor/Helpers/MaterialOps.cs, TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/UnityPackage/CheckProjectTemplateAssets.cs, MCPForUnity/Editor/Helpers/ParamCoercion.cs, TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Previews/Scripts/Generators/NativePreviewGenerator.cs, REDACTED, TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Validator/Scripts/Test Methods/Generic/CheckPackageNaming.cs, TestProjects/AssetStoreUploads/Packages/com.unity.asset-store-tools/Editor/Exporter/DefaultPackageExporter.cs (and 135 more) (146 orphaned of 342 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 342 of the 598 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
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.
M3 · Folder & project structure · No src/ separation · ×1
  • No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add `semgrep --config=auto` plus gitleaks for committed secrets — this tree has no MSBuild project file, so CodeQL's csharp pack (which traces a build) and NuGet security analyzers (which are referenced from a project) have nothing to attach to as a CI step. What was searched, so you can tell an absence from a miss: the 136004 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.
P4 · Deployment & Rollback · No rollback/health safety · ×1
  • No rollback/health safety — Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
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 51/90 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.
X5 · Nullable reference types · Nullable reference types not enabled everywhere · ×1
  • Nullable reference types not enabled everywhere — 0/599 C# file(s) are in a nullable-enabled context. This repository commits no project file, so nothing sets <Nullable>enable</Nullable> for it: a file is enabled only by its own `#nullable enable`, by a Unity `csc.rsp` with `-nullable:enable` for its assembly, or as a file-based app (`#:` directives) whose `#:property Nullable` does not turn it off. NRTs catch a whole class of null-deref bugs at compile time.
Minor — 11 finding(s)
D12 · Dependency Hygiene · Outdated · ×7
  • Outdated: com.unity.collab-proxy — `com.unity.collab-proxy` is resolved to 2.5.2 in the `packages-lock.json` beside `TestProjects/AssetStoreUploads/Packages/manifest.json`, but 2.12.4 is published on the Unity registry. (2.12.4 is the newest release compatible with Unity 2021.3, which is what this project targets — later releases require a newer editor.) Raise the version in `TestProjects/AssetStoreUploads/Packages/manifest.json` and commit the updated packages-lock.json.
  • Outdated: com.unity.ide.rider — `com.unity.ide.rider` is resolved to 3.0.31 in the `packages-lock.json` beside `TestProjects/AssetStoreUploads/Packages/manifest.json`, but 3.0.40 is published on the Unity registry. (3.0.40 is the newest release compatible with Unity 2021.3, which is what this project targets — later releases require a newer editor.) Raise the version in `TestProjects/AssetStoreUploads/Packages/manifest.json` and commit the updated packages-lock.json.
  • Outdated: com.unity.ide.visualstudio — `com.unity.ide.visualstudio` is resolved to 2.0.22 in the `packages-lock.json` beside `TestProjects/AssetStoreUploads/Packages/manifest.json`, but 2.0.28 is published on the Unity registry. (2.0.28 is the newest release compatible with Unity 2021.3, which is what this project targets — later releases require a newer editor.) Raise the version in `TestProjects/AssetStoreUploads/Packages/manifest.json` and commit the updated packages-lock.json.
  • Outdated: com.unity.test-framework — `com.unity.test-framework` is resolved to 1.1.33 in the `packages-lock.json` beside `TestProjects/AssetStoreUploads/Packages/manifest.json`, but 1.4.6 is published on the Unity registry. (1.4.6 is the newest release compatible with Unity 2021.3, which is what this project targets — later releases require a newer editor.) Raise the version in `TestProjects/AssetStoreUploads/Packages/manifest.json` and commit the updated packages-lock.json.
  • Outdated: com.unity.textmeshpro — `com.unity.textmeshpro` is resolved to 3.0.6 in the `packages-lock.json` beside `TestProjects/AssetStoreUploads/Packages/manifest.json`, but 3.0.9 is published on the Unity registry. (3.0.9 is the newest release compatible with Unity 2021.3, which is what this project targets — later releases require a newer editor.) Raise the version in `TestProjects/AssetStoreUploads/Packages/manifest.json` and commit the updated packages-lock.json.
  • Outdated: com.unity.timeline — `com.unity.timeline` is resolved to 1.6.5 in the `packages-lock.json` beside `TestProjects/AssetStoreUploads/Packages/manifest.json`, but 1.8.9 is published on the Unity registry. (1.8.9 is the newest release compatible with Unity 2021.3, which is what this project targets — later releases require a newer editor.) Raise the version in `TestProjects/AssetStoreUploads/Packages/manifest.json` and commit the updated packages-lock.json.
  • Outdated: com.unity.visualscripting — `com.unity.visualscripting` is resolved to 1.9.4 in the `packages-lock.json` beside `TestProjects/AssetStoreUploads/Packages/manifest.json`, but 1.9.11 is published on the Unity registry. (1.9.11 is the newest release compatible with Unity 2021.3, which is what this project targets — later releases require a newer editor.) Raise the version in `TestProjects/AssetStoreUploads/Packages/manifest.json` and commit the updated packages-lock.json.
D10 · Test Quality · Skipped (documented) · ×4
  • Skipped (documented): Summary_ContainsOnlyInstalledClients TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/ConfigureDetectedClientsTests.cs:15 — Skipped with a documented reason — a deferral, not lazy debt: Side-effect: writes real client configs on machines with MCP clients installed
  • Skipped (documented): Summary_SkippedCountTracksUninstalled TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/ConfigureDetectedClientsTests.cs:26 — Skipped with a documented reason — a deferral, not lazy debt: Side-effect: writes real client configs on machines with MCP clients installed
  • Skipped (documented): ServerManagementService_StopLocalHttpServer_PrefersPidfileBasedApproach TestProjects/UnityMCPTests/Assets/Tests/EditMode/Services/Characterization/Services_Characterization.cs:193 — Skipped with a documented reason — a deferral, not lazy debt: Stops the MCP server - kills connection
  • Skipped (documented): HandleCommand_ExecuteMenuItem_ExecutesNonBlacklistedItems TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools/Characterization/EditorTools_Characterization.cs:577 — Skipped with a documented reason — a deferral, not lazy debt: Opens Console window - steals focus

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-dc4cd6779f5245b0bf45b838fbf15436/history.json --exit-code 0 --source .0artifacts/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-dc4cd6779f5245b0bf45b838fbf15436/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 .81artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update18artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .4artifacts/raw/trivy-config.json
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. semgrep could not parse 5 file(s) — `MCPForUnity/Editor/Services/AssetGen/FalModelSchema.cs`, `MCPForUnity/Editor/Tools/Graphics/SkyboxOps.cs`, `website/src/components/HomeFeatures/index.js`, `website/src/components/HomeHero/index.js`, `website/src/components/HomeStats/index.js` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.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 Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a1678b-f80e-7943-8d7c-d6fff04d1baf · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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